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

Side by Side Diff: chrome/browser/ui/views/collected_cookies_win.h

Issue 7831051: content: Move collected cookies constrained window to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile failures for everyone\! Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_UI_VIEWS_COLLECTED_COOKIES_WIN_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_ 6 #define CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/common/content_settings.h" 10 #include "chrome/common/content_settings.h"
11 #include "content/browser/tab_contents/constrained_window.h" 11 #include "content/browser/tab_contents/constrained_window.h"
12 #include "content/common/notification_observer.h" 12 #include "content/common/notification_observer.h"
13 #include "content/common/notification_registrar.h" 13 #include "content/common/notification_registrar.h"
14 #include "views/controls/tabbed_pane/tabbed_pane_listener.h" 14 #include "views/controls/tabbed_pane/tabbed_pane_listener.h"
15 #include "views/controls/tree/tree_view.h" 15 #include "views/controls/tree/tree_view.h"
16 #include "views/window/dialog_delegate.h" 16 #include "views/window/dialog_delegate.h"
17 17
18 class ConstrainedWindow; 18 class ConstrainedWindow;
19 class CookieInfoView; 19 class CookieInfoView;
20 class CookiesTreeModel; 20 class CookiesTreeModel;
21 class InfobarView; 21 class InfobarView;
22 class TabContents; 22 class TabContents;
23 class TabContentsWrapper;
23 24
24 namespace views { 25 namespace views {
25 class Label; 26 class Label;
26 class TextButton; 27 class TextButton;
27 } 28 }
28 29
29 // This is the Views implementation of the collected cookies dialog. 30 // This is the Views implementation of the collected cookies dialog.
30 // 31 //
31 // CollectedCookiesWin is a dialog that displays the allowed and blocked 32 // CollectedCookiesWin is a dialog that displays the allowed and blocked
32 // cookies of the current tab contents. To display the dialog, invoke 33 // cookies of the current tab contents. To display the dialog, invoke
33 // ShowCollectedCookiesDialog() on the delegate of the tab contents wrapper's 34 // ShowCollectedCookiesDialog() on the delegate of the tab contents wrapper's
34 // content settings tab helper. 35 // content settings tab helper.
35 class CollectedCookiesWin : public views::DialogDelegate, 36 class CollectedCookiesWin : public views::DialogDelegate,
36 public NotificationObserver, 37 public NotificationObserver,
37 public views::ButtonListener, 38 public views::ButtonListener,
38 public views::TabbedPaneListener, 39 public views::TabbedPaneListener,
39 public views::TreeViewController, 40 public views::TreeViewController,
40 public views::View { 41 public views::View {
41 public: 42 public:
42 // Use BrowserWindow::ShowCollectedCookiesDialog to show. 43 // Use BrowserWindow::ShowCollectedCookiesDialog to show.
43 CollectedCookiesWin(gfx::NativeWindow parent_window, 44 CollectedCookiesWin(gfx::NativeWindow parent_window,
44 TabContents* tab_contents); 45 TabContentsWrapper* wrapper);
45 46
46 // views::DialogDelegate: 47 // views::DialogDelegate:
47 virtual std::wstring GetWindowTitle() const OVERRIDE; 48 virtual std::wstring GetWindowTitle() const OVERRIDE;
48 virtual int GetDialogButtons() const OVERRIDE; 49 virtual int GetDialogButtons() const OVERRIDE;
49 virtual std::wstring GetDialogButtonLabel( 50 virtual std::wstring GetDialogButtonLabel(
50 MessageBoxFlags::DialogButton button) const OVERRIDE; 51 MessageBoxFlags::DialogButton button) const OVERRIDE;
51 virtual void DeleteDelegate() OVERRIDE; 52 virtual void DeleteDelegate() OVERRIDE;
52 virtual bool Cancel() OVERRIDE; 53 virtual bool Cancel() OVERRIDE;
53 virtual views::View* GetContentsView() OVERRIDE; 54 virtual views::View* GetContentsView() OVERRIDE;
54 virtual views::Widget* GetWidget() OVERRIDE; 55 virtual views::Widget* GetWidget() OVERRIDE;
(...skipping 27 matching lines...) Expand all
82 // NotificationObserver: 83 // NotificationObserver:
83 virtual void Observe(int type, 84 virtual void Observe(int type,
84 const NotificationSource& source, 85 const NotificationSource& source,
85 const NotificationDetails& details) OVERRIDE; 86 const NotificationDetails& details) OVERRIDE;
86 87
87 NotificationRegistrar registrar_; 88 NotificationRegistrar registrar_;
88 89
89 ConstrainedWindow* window_; 90 ConstrainedWindow* window_;
90 91
91 // The tab contents. 92 // The tab contents.
92 TabContents* tab_contents_; 93 TabContentsWrapper* wrapper_;
93 94
94 // Assorted views. 95 // Assorted views.
95 views::Label* allowed_label_; 96 views::Label* allowed_label_;
96 views::Label* blocked_label_; 97 views::Label* blocked_label_;
97 98
98 views::TreeView* allowed_cookies_tree_; 99 views::TreeView* allowed_cookies_tree_;
99 views::TreeView* blocked_cookies_tree_; 100 views::TreeView* blocked_cookies_tree_;
100 101
101 views::TextButton* block_allowed_button_; 102 views::TextButton* block_allowed_button_;
102 views::TextButton* allow_blocked_button_; 103 views::TextButton* allow_blocked_button_;
103 views::TextButton* for_session_blocked_button_; 104 views::TextButton* for_session_blocked_button_;
104 105
105 scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_; 106 scoped_ptr<CookiesTreeModel> allowed_cookies_tree_model_;
106 scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_; 107 scoped_ptr<CookiesTreeModel> blocked_cookies_tree_model_;
107 108
108 CookieInfoView* cookie_info_view_; 109 CookieInfoView* cookie_info_view_;
109 110
110 InfobarView* infobar_; 111 InfobarView* infobar_;
111 112
112 bool status_changed_; 113 bool status_changed_;
113 114
114 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesWin); 115 DISALLOW_COPY_AND_ASSIGN(CollectedCookiesWin);
115 }; 116 };
116 117
117 #endif // CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_ 118 #endif // CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs.h ('k') | chrome/browser/ui/views/collected_cookies_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698