Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: chrome/browser/views/collected_cookies_win.h

Issue 2808053: Buttons for the collected cookies dialog to add content exceptions. (Closed)
Patch Set: compile fix Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/collected_cookies_gtk.cc ('k') | chrome/browser/views/collected_cookies_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/collected_cookies_win.h
diff --git a/chrome/browser/views/collected_cookies_win.h b/chrome/browser/views/collected_cookies_win.h
index 16b5f89714c4e4f816abae21b0cfbec0e98d9e79..fc33d3c68ba7805d21c859d5ed621b74a767143f 100644
--- a/chrome/browser/views/collected_cookies_win.h
+++ b/chrome/browser/views/collected_cookies_win.h
@@ -8,7 +8,9 @@
#define CHROME_BROWSER_VIEWS_COLLECTED_COOKIES_WIN_H_
#include "chrome/browser/tab_contents/constrained_window.h"
+#include "chrome/common/content_settings.h"
#include "chrome/common/notification_registrar.h"
+#include "views/controls/tree/tree_view.h"
#include "views/window/dialog_delegate.h"
class ConstrainedWindow;
@@ -16,7 +18,7 @@ class CookiesTreeModel;
class TabContents;
namespace views {
class Label;
-class TreeView;
+class NativeButton;
}
// CollectedCookiesWin is a dialog that displays the allowed and blocked
@@ -25,32 +27,41 @@ class TreeView;
class CollectedCookiesWin : public ConstrainedDialogDelegate,
NotificationObserver,
+ views::ButtonListener,
+ views::TreeViewController,
views::View {
public:
// Use BrowserWindow::ShowCollectedCookiesDialog to show.
CollectedCookiesWin(gfx::NativeWindow parent_window,
TabContents* tab_contents);
- // views::DialogDelegate implementation.
+ // ConstrainedDialogDelegate implementation.
virtual std::wstring GetWindowTitle() const;
virtual int GetDialogButtons() const;
virtual std::wstring GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const;
virtual void DeleteDelegate();
-
virtual bool Cancel();
-
- // views::WindowDelegate implementation.
virtual views::View* GetContentsView();
+ // views::ButtonListener implementation.
+ virtual void ButtonPressed(views::Button* sender, const views::Event& event);
+
+ // views::TreeViewController implementation.
+ virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view);
+
// views::View implementation.
- gfx::Size GetPreferredSize();
+ virtual gfx::Size GetPreferredSize();
private:
virtual ~CollectedCookiesWin();
void Init();
+ void EnableControls();
+
+ void AddContentException(views::TreeView* tree_view, ContentSetting setting);
+
// Notification Observer implementation.
void Observe(NotificationType type,
const NotificationSource& source,
@@ -70,6 +81,10 @@ class CollectedCookiesWin : public ConstrainedDialogDelegate,
views::TreeView* allowed_cookies_tree_;
views::TreeView* blocked_cookies_tree_;
+ views::NativeButton* block_allowed_button_;
+ views::NativeButton* allow_blocked_button_;
+ views::NativeButton* for_session_blocked_button_;
+
scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_;
scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_;
« no previous file with comments | « chrome/browser/gtk/collected_cookies_gtk.cc ('k') | chrome/browser/views/collected_cookies_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698