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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.h

Issue 1268243003: Remove |browser_| from WebsiteSettingsPopupView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enabledialogs
Patch Set: Created 5 years, 4 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
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 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h" 13 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h"
14 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 14 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
15 #include "ui/views/bubble/bubble_delegate.h" 15 #include "ui/views/bubble/bubble_delegate.h"
16 #include "ui/views/controls/button/button.h" 16 #include "ui/views/controls/button/button.h"
17 #include "ui/views/controls/button/label_button.h" 17 #include "ui/views/controls/button/label_button.h"
18 #include "ui/views/controls/link_listener.h" 18 #include "ui/views/controls/link_listener.h"
19 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 19 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
20 20
21 class Browser; 21 class Browser;
sky 2015/08/10 15:08:17 If you can, remove this and any unnecessary includ
jackhou1 2015/08/11 01:03:08 Done.
22 class GURL; 22 class GURL;
23 class PermissionSelectorView; 23 class PermissionSelectorView;
24 class PopupHeaderView; 24 class PopupHeaderView;
25 class Profile; 25 class Profile;
26 26
27 namespace content { 27 namespace content {
28 struct SSLStatus; 28 struct SSLStatus;
29 class WebContents; 29 class WebContents;
30 } 30 }
31 31
(...skipping 12 matching lines...) Expand all
44 public views::LinkListener, 44 public views::LinkListener,
45 public views::TabbedPaneListener, 45 public views::TabbedPaneListener,
46 public WebsiteSettingsUI { 46 public WebsiteSettingsUI {
47 public: 47 public:
48 ~WebsiteSettingsPopupView() override; 48 ~WebsiteSettingsPopupView() override;
49 49
50 static void ShowPopup(views::View* anchor_view, 50 static void ShowPopup(views::View* anchor_view,
51 Profile* profile, 51 Profile* profile,
52 content::WebContents* web_contents, 52 content::WebContents* web_contents,
53 const GURL& url, 53 const GURL& url,
54 const content::SSLStatus& ssl, 54 const content::SSLStatus& ssl);
55 Browser* browser);
56 55
57 static bool IsPopupShowing(); 56 static bool IsPopupShowing();
58 57
59 private: 58 private:
60 WebsiteSettingsPopupView(views::View* anchor_view, 59 WebsiteSettingsPopupView(views::View* anchor_view,
61 Profile* profile, 60 Profile* profile,
62 content::WebContents* web_contents, 61 content::WebContents* web_contents,
63 const GURL& url, 62 const GURL& url,
64 const content::SSLStatus& ssl, 63 const content::SSLStatus& ssl);
65 Browser* browser);
66 64
67 // PermissionSelectorViewObserver implementation. 65 // PermissionSelectorViewObserver implementation.
68 void OnPermissionChanged( 66 void OnPermissionChanged(
69 const WebsiteSettingsUI::PermissionInfo& permission) override; 67 const WebsiteSettingsUI::PermissionInfo& permission) override;
70 68
71 // views::BubbleDelegateView implementation. 69 // views::BubbleDelegateView implementation.
72 void OnWidgetDestroying(views::Widget* widget) override; 70 void OnWidgetDestroying(views::Widget* widget) override;
73 71
74 // views::ButtonListener implementation. 72 // views::ButtonListener implementation.
75 void ButtonPressed(views::Button* button, const ui::Event& event) override; 73 void ButtonPressed(views::Button* button, const ui::Event& event) override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 119
122 // Used to asynchronously handle clicks since these calls may cause the 120 // Used to asynchronously handle clicks since these calls may cause the
123 // destruction of the settings view and the base class window still needs to 121 // destruction of the settings view and the base class window still needs to
124 // be alive to finish handling the mouse or keyboard click. 122 // be alive to finish handling the mouse or keyboard click.
125 void HandleLinkClickedAsync(views::Link* source); 123 void HandleLinkClickedAsync(views::Link* source);
126 124
127 // The web contents of the current tab. The popup can't live longer than a 125 // The web contents of the current tab. The popup can't live longer than a
128 // tab. 126 // tab.
129 content::WebContents* web_contents_; 127 content::WebContents* web_contents_;
130 128
131 // The Browser is used to load the help center page.
132 Browser* browser_;
133
134 // The presenter that controls the Website Settings UI. 129 // The presenter that controls the Website Settings UI.
135 scoped_ptr<WebsiteSettings> presenter_; 130 scoped_ptr<WebsiteSettings> presenter_;
136 131
137 PopupHeaderView* header_; // Owned by views hierarchy. 132 PopupHeaderView* header_; // Owned by views hierarchy.
138 133
139 // The |TabbedPane| that contains the tabs of the Website Settings UI. 134 // The |TabbedPane| that contains the tabs of the Website Settings UI.
140 views::TabbedPane* tabbed_pane_; 135 views::TabbedPane* tabbed_pane_;
141 136
142 // The view that contains the permissions tab contents. 137 // The view that contains the permissions tab contents.
143 views::View* permissions_tab_; 138 views::View* permissions_tab_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 views::Link* site_settings_link_; 174 views::Link* site_settings_link_;
180 175
181 views::View* connection_info_content_; 176 views::View* connection_info_content_;
182 177
183 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; 178 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_;
184 179
185 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 180 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
186 }; 181 };
187 182
188 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ 183 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/website_settings/website_settings_popup_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698