summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/local_storage_info_view.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 10:19:33 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 10:19:33 +0000
commit458788376076d57d182ca22060b335d2e5f2e18f (patch)
treeb9f36ebc08eb4b3b2e2ca921c73859c636cd11e5 /chrome/browser/views/local_storage_info_view.h
parent6bcbadfe623f6d273a8cc7fc78ce25c1e91dd10b (diff)
downloadchromium_src-458788376076d57d182ca22060b335d2e5f2e18f.zip
chromium_src-458788376076d57d182ca22060b335d2e5f2e18f.tar.gz
chromium_src-458788376076d57d182ca22060b335d2e5f2e18f.tar.bz2
Modified cookie alert prompt window to suport displaying of local storage info as well.
Original patch by Zelidrag Hornung, r=me, tweaked. BUG=32719 TEST=none Review URL: http://codereview.chromium.org/563007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/local_storage_info_view.h')
-rwxr-xr-xchrome/browser/views/local_storage_info_view.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/chrome/browser/views/local_storage_info_view.h b/chrome/browser/views/local_storage_info_view.h
new file mode 100755
index 0000000..83b6155
--- /dev/null
+++ b/chrome/browser/views/local_storage_info_view.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_LOCAL_STORAGE_INFO_VIEW_H_
+#define CHROME_BROWSER_VIEWS_LOCAL_STORAGE_INFO_VIEW_H_
+
+#include <string>
+#include <vector>
+
+#include "views/view.h"
+#include "chrome/browser/browsing_data_local_storage_helper.h"
+
+namespace views {
+class Label;
+class Textfield;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// LocalStorageInfoView
+//
+// Responsible for displaying a tabular grid of Local Storage information.
+class LocalStorageInfoView : public views::View {
+ public:
+ LocalStorageInfoView();
+ virtual ~LocalStorageInfoView();
+
+ // Update the display from the specified Local Storage info.
+ void SetLocalStorageInfo(
+ const BrowsingDataLocalStorageHelper::LocalStorageInfo&
+ local_storage_info);
+
+ // Clears the cookie display to indicate that no or multiple local storages
+ // are selected.
+ void ClearLocalStorageDisplay();
+
+ // Enables or disables the local storate property text fields.
+ void EnableLocalStorageDisplay(bool enabled);
+
+ protected:
+ // views::View overrides:
+ virtual void ViewHierarchyChanged(
+ bool is_add, views::View* parent, views::View* child);
+
+ private:
+ // Set up the view layout
+ void Init();
+
+ // Individual property labels
+ views::Textfield* origin_value_field_;
+ views::Textfield* size_value_field_;
+ views::Textfield* last_modified_value_field_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalStorageInfoView);
+};
+
+
+#endif // CHROME_BROWSER_VIEWS_LOCAL_STORAGE_INFO_VIEW_H_
+