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

Unified Diff: chrome/browser/gtk/collected_cookies_gtk.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/collected_cookies_uitest.cc ('k') | chrome/browser/gtk/collected_cookies_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/collected_cookies_gtk.h
diff --git a/chrome/browser/gtk/collected_cookies_gtk.h b/chrome/browser/gtk/collected_cookies_gtk.h
index 0691d0671f530f67741c9f15ca4789db27a69a8b..2d8f2a08452f89abc04b2f4d07ebfcb5bdd8e6dc 100644
--- a/chrome/browser/gtk/collected_cookies_gtk.h
+++ b/chrome/browser/gtk/collected_cookies_gtk.h
@@ -13,6 +13,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/gtk/constrained_window_gtk.h"
#include "chrome/browser/gtk/gtk_tree.h"
+#include "chrome/common/content_settings.h"
#include "chrome/common/notification_registrar.h"
class CookiesTreeModel;
@@ -34,8 +35,21 @@ class CollectedCookiesGtk : public ConstrainedDialogDelegate,
private:
virtual ~CollectedCookiesGtk();
+ // Initialize all widgets of this dialog.
void Init();
+ // True if the selection contains at least one origin node.
+ bool SelectionContainsOriginNode(GtkTreeSelection* selection,
+ gtk_tree::TreeAdapter* adapter);
+
+ // Enable the allow/block buttons if at least one origin node is selected.
+ void EnableControls();
+
+ // Add exceptions for all origin nodes within the selection.
+ void AddExceptions(GtkTreeSelection* selection,
+ gtk_tree::TreeAdapter* adapter,
+ ContentSetting setting);
+
// Notification Observer implementation.
void Observe(NotificationType type,
const NotificationSource& source,
@@ -44,7 +58,12 @@ class CollectedCookiesGtk : public ConstrainedDialogDelegate,
// Callbacks.
CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnTreeViewRowExpanded,
GtkTreeIter*, GtkTreePath*);
+ CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnTreeViewSelectionChange);
CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnClose);
+ CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnBlockAllowedButtonClicked);
+ CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnAllowBlockedButtonClicked);
+ CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void,
+ OnForSessionBlockedButtonClicked);
NotificationRegistrar registrar_;
@@ -56,12 +75,17 @@ class CollectedCookiesGtk : public ConstrainedDialogDelegate,
GtkWidget* allowed_description_label_;
GtkWidget* blocked_description_label_;
+ GtkWidget* block_allowed_cookie_button_;
+
+ GtkWidget* allow_blocked_cookie_button_;
+ GtkWidget* for_session_blocked_cookie_button_;
+
// The table listing the cookies.
GtkWidget* allowed_tree_;
GtkWidget* blocked_tree_;
- GtkWidget* allowed_cookie_display_;
- GtkWidget* blocked_cookie_display_;
+ GtkTreeSelection* allowed_selection_;
+ GtkTreeSelection* blocked_selection_;
// The tab contents.
TabContents* tab_contents_;
« no previous file with comments | « chrome/browser/collected_cookies_uitest.cc ('k') | chrome/browser/gtk/collected_cookies_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698