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

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

Issue 1314953009: Refactor WebsiteSettings to operate on a SecurityInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
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/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "chrome/browser/ssl/security_state_model.h"
12 #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"
13 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 14 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 #include "ui/views/bubble/bubble_delegate.h" 16 #include "ui/views/bubble/bubble_delegate.h"
16 #include "ui/views/controls/button/button.h" 17 #include "ui/views/controls/button/button.h"
17 #include "ui/views/controls/link_listener.h" 18 #include "ui/views/controls/link_listener.h"
18 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 19 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
19 20
20 class GURL; 21 class GURL;
21 class PopupHeaderView; 22 class PopupHeaderView;
22 class Profile; 23 class Profile;
23 24
24 namespace content { 25 namespace content {
25 struct SSLStatus;
26 class WebContents; 26 class WebContents;
27 } 27 }
28 28
29 namespace test { 29 namespace test {
30 class WebsiteSettingsPopupViewTestApi; 30 class WebsiteSettingsPopupViewTestApi;
31 } 31 }
32 32
33 namespace views { 33 namespace views {
34 class LabelButton; 34 class LabelButton;
35 class Link; 35 class Link;
(...skipping 11 matching lines...) Expand all
47 public WebsiteSettingsUI { 47 public WebsiteSettingsUI {
48 public: 48 public:
49 ~WebsiteSettingsPopupView() override; 49 ~WebsiteSettingsPopupView() override;
50 50
51 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. 51 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble.
52 static void ShowPopup(views::View* anchor_view, 52 static void ShowPopup(views::View* anchor_view,
53 const gfx::Rect& anchor_rect, 53 const gfx::Rect& anchor_rect,
54 Profile* profile, 54 Profile* profile,
55 content::WebContents* web_contents, 55 content::WebContents* web_contents,
56 const GURL& url, 56 const GURL& url,
57 const content::SSLStatus& ssl); 57 const SecurityStateModel::SecurityInfo& security_info);
58 58
59 static bool IsPopupShowing(); 59 static bool IsPopupShowing();
60 60
61 private: 61 private:
62 friend class test::WebsiteSettingsPopupViewTestApi; 62 friend class test::WebsiteSettingsPopupViewTestApi;
63 63
64 WebsiteSettingsPopupView(views::View* anchor_view, 64 WebsiteSettingsPopupView(
65 gfx::NativeView parent_window, 65 views::View* anchor_view,
66 Profile* profile, 66 gfx::NativeView parent_window,
67 content::WebContents* web_contents, 67 Profile* profile,
68 const GURL& url, 68 content::WebContents* web_contents,
69 const content::SSLStatus& ssl); 69 const GURL& url,
70 const SecurityStateModel::SecurityInfo& security_info);
70 71
71 // WebContentsObserver implementation. 72 // WebContentsObserver implementation.
72 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; 73 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
73 74
74 // PermissionSelectorViewObserver implementation. 75 // PermissionSelectorViewObserver implementation.
75 void OnPermissionChanged( 76 void OnPermissionChanged(
76 const WebsiteSettingsUI::PermissionInfo& permission) override; 77 const WebsiteSettingsUI::PermissionInfo& permission) override;
77 78
78 // views::BubbleDelegateView implementation. 79 // views::BubbleDelegateView implementation.
79 void OnWidgetDestroying(views::Widget* widget) override; 80 void OnWidgetDestroying(views::Widget* widget) override;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 views::Link* site_settings_link_; 184 views::Link* site_settings_link_;
184 185
185 views::View* connection_info_content_; 186 views::View* connection_info_content_;
186 187
187 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; 188 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_;
188 189
189 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 190 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
190 }; 191 };
191 192
192 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ 193 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698