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

Side by Side Diff: chrome/browser/ui/gtk/collected_cookies_gtk.h

Issue 12851002: Remove ConstrainedWindowGtkDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This is the Gtk implementation of the collected Cookies dialog. 5 // This is the Gtk implementation of the collected Cookies dialog.
6 6
7 #ifndef CHROME_BROWSER_UI_GTK_COLLECTED_COOKIES_GTK_H_ 7 #ifndef CHROME_BROWSER_UI_GTK_COLLECTED_COOKIES_GTK_H_
8 #define CHROME_BROWSER_UI_GTK_COLLECTED_COOKIES_GTK_H_ 8 #define CHROME_BROWSER_UI_GTK_COLLECTED_COOKIES_GTK_H_
9 9
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 11 matching lines...) Expand all
22 22
23 namespace content { 23 namespace content {
24 class WebContents; 24 class WebContents;
25 } 25 }
26 26
27 // CollectedCookiesGtk is a dialog that displays the allowed and blocked 27 // CollectedCookiesGtk is a dialog that displays the allowed and blocked
28 // cookies of the current tab contents. To display the dialog, invoke 28 // cookies of the current tab contents. To display the dialog, invoke
29 // ShowCollectedCookiesDialog() on the delegate of the web contents's 29 // ShowCollectedCookiesDialog() on the delegate of the web contents's
30 // content settings tab helper. 30 // content settings tab helper.
31 31
32 class CollectedCookiesGtk : public ConstrainedWindowGtkDelegate, 32 class CollectedCookiesGtk : public gtk_tree::TreeAdapter::Delegate,
33 public gtk_tree::TreeAdapter::Delegate,
34 public content::NotificationObserver { 33 public content::NotificationObserver {
35 public: 34 public:
36 CollectedCookiesGtk(GtkWindow* parent, content::WebContents* web_contents); 35 CollectedCookiesGtk(GtkWindow* parent, content::WebContents* web_contents);
37 36
38 // ConstrainedWindowGtkDelegate methods.
39 virtual GtkWidget* GetWidgetRoot() OVERRIDE;
40 virtual GtkWidget* GetFocusWidget() OVERRIDE;
41 virtual void DeleteDelegate() OVERRIDE;
42
43 private: 37 private:
44 virtual ~CollectedCookiesGtk(); 38 virtual ~CollectedCookiesGtk();
45 39
46 // Initialize all widgets of this dialog. 40 // Initialize all widgets of this dialog.
47 void Init(); 41 void Init();
48 42
49 // True if the selection contains at least one host node. 43 // True if the selection contains at least one host node.
50 bool SelectionContainsHostNode(GtkTreeSelection* selection, 44 bool SelectionContainsHostNode(GtkTreeSelection* selection,
51 gtk_tree::TreeAdapter* adapter); 45 gtk_tree::TreeAdapter* adapter);
52 46
(...skipping 24 matching lines...) Expand all
77 CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnTreeViewRowExpanded, 71 CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnTreeViewRowExpanded,
78 GtkTreeIter*, GtkTreePath*); 72 GtkTreeIter*, GtkTreePath*);
79 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnTreeViewSelectionChange); 73 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnTreeViewSelectionChange);
80 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnClose); 74 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnClose);
81 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnBlockAllowedButtonClicked); 75 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnBlockAllowedButtonClicked);
82 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnAllowBlockedButtonClicked); 76 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnAllowBlockedButtonClicked);
83 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, 77 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void,
84 OnForSessionBlockedButtonClicked); 78 OnForSessionBlockedButtonClicked);
85 CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnSwitchPage, 79 CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnSwitchPage,
86 gpointer, guint); 80 gpointer, guint);
81 CHROMEGTK_CALLBACK_0(CollectedCookiesGtk, void, OnDestroy);
87 82
88 content::NotificationRegistrar registrar_; 83 content::NotificationRegistrar registrar_;
89 84
90 GtkWidget* window_; 85 GtkWidget* window_;
91 86
92 // Widgets of the dialog. 87 // Widgets of the dialog.
93 GtkWidget* dialog_; 88 GtkWidget* dialog_;
94 89
95 GtkWidget* allowed_description_label_; 90 GtkWidget* allowed_description_label_;
96 GtkWidget* blocked_description_label_; 91 GtkWidget* blocked_description_label_;
(...skipping 27 matching lines...) Expand all
124 // The Cookies Table model. 119 // The Cookies Table model.
125 scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_; 120 scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_;
126 scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_; 121 scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_;
127 scoped_ptr<gtk_tree::TreeAdapter> allowed_cookies_tree_adapter_; 122 scoped_ptr<gtk_tree::TreeAdapter> allowed_cookies_tree_adapter_;
128 scoped_ptr<gtk_tree::TreeAdapter> blocked_cookies_tree_adapter_; 123 scoped_ptr<gtk_tree::TreeAdapter> blocked_cookies_tree_adapter_;
129 124
130 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesGtk); 125 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesGtk);
131 }; 126 };
132 127
133 #endif // CHROME_BROWSER_UI_GTK_COLLECTED_COOKIES_GTK_H_ 128 #endif // CHROME_BROWSER_UI_GTK_COLLECTED_COOKIES_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698