• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_UI_VIEWS_INDEXED_DB_INFO_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_INDEXED_DB_INFO_VIEW_H_
7 #pragma once
8 
9 #include "views/view.h"
10 #include "chrome/browser/browsing_data_indexed_db_helper.h"
11 
12 namespace views {
13 class Label;
14 class Textfield;
15 }
16 
17 ///////////////////////////////////////////////////////////////////////////////
18 // IndexedDBInfoView
19 //
20 //  Responsible for displaying a tabular grid of IndexedDB information.
21 class IndexedDBInfoView : public views::View {
22  public:
23   IndexedDBInfoView();
24   virtual ~IndexedDBInfoView();
25 
26   // Update the display from the specified Local Storage info.
27   void SetIndexedDBInfo(
28       const BrowsingDataIndexedDBHelper::IndexedDBInfo&
29       indexed_db_info);
30 
31   // Clears the cookie display to indicate that no or multiple local storages
32   // are selected.
33   void ClearIndexedDBDisplay();
34 
35   // Enables or disables the local storate property text fields.
36   void EnableIndexedDBDisplay(bool enabled);
37 
38  protected:
39   // views::View overrides:
40   virtual void ViewHierarchyChanged(
41       bool is_add, views::View* parent, views::View* child);
42 
43  private:
44   // Set up the view layout
45   void Init();
46 
47   // Individual property labels
48   views::Textfield* origin_value_field_;
49   views::Textfield* size_value_field_;
50   views::Textfield* last_modified_value_field_;
51 
52   DISALLOW_COPY_AND_ASSIGN(IndexedDBInfoView);
53 };
54 
55 #endif  // CHROME_BROWSER_UI_VIEWS_INDEXED_DB_INFO_VIEW_H_
56