| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_LOCAL_STORAGE_INFO_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_APPCACHE_INFO_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_LOCAL_STORAGE_INFO_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_APPCACHE_INFO_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "views/view.h" | 11 #include "views/view.h" |
| 12 #include "chrome/browser/browsing_data_local_storage_helper.h" | 12 #include "chrome/browser/browsing_data_appcache_helper.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 class GridLayout; |
| 15 class Label; | 16 class Label; |
| 16 class Textfield; | 17 class Textfield; |
| 17 } | 18 } |
| 18 | 19 |
| 19 /////////////////////////////////////////////////////////////////////////////// | 20 /////////////////////////////////////////////////////////////////////////////// |
| 20 // LocalStorageInfoView | 21 // AppCacheInfoView |
| 21 // | 22 // |
| 22 // Responsible for displaying a tabular grid of Local Storage information. | 23 // Responsible for displaying a tabular grid of AppCache information. |
| 23 class LocalStorageInfoView : public views::View { | 24 class AppCacheInfoView : public views::View { |
| 24 public: | 25 public: |
| 25 LocalStorageInfoView(); | 26 AppCacheInfoView(); |
| 26 virtual ~LocalStorageInfoView(); | 27 virtual ~AppCacheInfoView(); |
| 27 | 28 |
| 28 // Update the display from the specified Local Storage info. | 29 void SetAppCacheInfo(const BrowsingDataAppCacheHelper::AppCacheInfo* info); |
| 29 void SetLocalStorageInfo( | 30 void ClearAppCacheDisplay(); |
| 30 const BrowsingDataLocalStorageHelper::LocalStorageInfo& | 31 void EnableAppCacheDisplay(bool enabled); |
| 31 local_storage_info); | |
| 32 | |
| 33 // Clears the cookie display to indicate that no or multiple local storages | |
| 34 // are selected. | |
| 35 void ClearLocalStorageDisplay(); | |
| 36 | |
| 37 // Enables or disables the local storate property text fields. | |
| 38 void EnableLocalStorageDisplay(bool enabled); | |
| 39 | 32 |
| 40 protected: | 33 protected: |
| 41 // views::View overrides: | 34 // views::View overrides: |
| 42 virtual void ViewHierarchyChanged( | 35 virtual void ViewHierarchyChanged( |
| 43 bool is_add, views::View* parent, views::View* child); | 36 bool is_add, views::View* parent, views::View* child); |
| 44 | 37 |
| 45 private: | 38 private: |
| 46 // Set up the view layout | |
| 47 void Init(); | 39 void Init(); |
| 40 void AddRow(int layout_id, views::GridLayout* layout, views::Label* label, |
| 41 views::Textfield* field, bool add_padding_row); |
| 48 | 42 |
| 49 // Individual property labels | 43 views::Textfield* manifest_url_field_; |
| 50 views::Textfield* origin_value_field_; | 44 views::Textfield* size_field_; |
| 51 views::Textfield* size_value_field_; | 45 views::Textfield* creation_date_field_; |
| 52 views::Textfield* last_modified_value_field_; | 46 views::Textfield* last_access_field_; |
| 53 | 47 |
| 54 DISALLOW_COPY_AND_ASSIGN(LocalStorageInfoView); | 48 DISALLOW_COPY_AND_ASSIGN(AppCacheInfoView); |
| 55 }; | 49 }; |
| 56 | 50 |
| 51 #endif // CHROME_BROWSER_VIEWS_APPCACHE_INFO_VIEW_H_ |
| 57 | 52 |
| 58 #endif // CHROME_BROWSER_VIEWS_LOCAL_STORAGE_INFO_VIEW_H_ | |
| 59 | |
| OLD | NEW |