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

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

Issue 1539043002: Pull SecurityStateModel out into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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/macros.h" 9 #include "base/macros.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/ssl/security_state_model.h"
14 #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"
15 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 14 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
15 #include "components/security_state/security_state_model.h"
16 #include "content/public/browser/web_contents_observer.h" 16 #include "content/public/browser/web_contents_observer.h"
17 #include "ui/views/bubble/bubble_delegate.h" 17 #include "ui/views/bubble/bubble_delegate.h"
18 #include "ui/views/controls/button/button.h" 18 #include "ui/views/controls/button/button.h"
19 #include "ui/views/controls/link_listener.h" 19 #include "ui/views/controls/link_listener.h"
20 #include "ui/views/controls/styled_label_listener.h" 20 #include "ui/views/controls/styled_label_listener.h"
21 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 21 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
22 22
23 class GURL; 23 class GURL;
24 class PopupHeaderView; 24 class PopupHeaderView;
25 class Profile; 25 class Profile;
(...skipping 19 matching lines...) Expand all
45 public views::BubbleDelegateView, 45 public views::BubbleDelegateView,
46 public views::ButtonListener, 46 public views::ButtonListener,
47 public views::LinkListener, 47 public views::LinkListener,
48 public views::StyledLabelListener, 48 public views::StyledLabelListener,
49 public views::TabbedPaneListener, 49 public views::TabbedPaneListener,
50 public WebsiteSettingsUI { 50 public WebsiteSettingsUI {
51 public: 51 public:
52 ~WebsiteSettingsPopupView() override; 52 ~WebsiteSettingsPopupView() override;
53 53
54 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble. 54 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble.
55 static void ShowPopup(views::View* anchor_view, 55 static void ShowPopup(
56 const gfx::Rect& anchor_rect, 56 views::View* anchor_view,
57 Profile* profile, 57 const gfx::Rect& anchor_rect,
58 content::WebContents* web_contents, 58 Profile* profile,
59 const GURL& url, 59 content::WebContents* web_contents,
60 const SecurityStateModel::SecurityInfo& security_info); 60 const GURL& url,
61 const security_state::SecurityStateModel::SecurityInfo& security_info);
61 62
62 static bool IsPopupShowing(); 63 static bool IsPopupShowing();
63 64
64 private: 65 private:
65 friend class test::WebsiteSettingsPopupViewTestApi; 66 friend class test::WebsiteSettingsPopupViewTestApi;
66 67
67 WebsiteSettingsPopupView( 68 WebsiteSettingsPopupView(
68 views::View* anchor_view, 69 views::View* anchor_view,
69 gfx::NativeView parent_window, 70 gfx::NativeView parent_window,
70 Profile* profile, 71 Profile* profile,
71 content::WebContents* web_contents, 72 content::WebContents* web_contents,
72 const GURL& url, 73 const GURL& url,
73 const SecurityStateModel::SecurityInfo& security_info); 74 const security_state::SecurityStateModel::SecurityInfo& security_info);
74 75
75 // WebContentsObserver implementation. 76 // WebContentsObserver implementation.
76 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; 77 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
77 78
78 // PermissionSelectorViewObserver implementation. 79 // PermissionSelectorViewObserver implementation.
79 void OnPermissionChanged( 80 void OnPermissionChanged(
80 const WebsiteSettingsUI::PermissionInfo& permission) override; 81 const WebsiteSettingsUI::PermissionInfo& permission) override;
81 82
82 // views::BubbleDelegateView implementation. 83 // views::BubbleDelegateView implementation.
83 void OnWidgetDestroying(views::Widget* widget) override; 84 void OnWidgetDestroying(views::Widget* widget) override;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 views::Link* site_settings_link_; 193 views::Link* site_settings_link_;
193 194
194 views::View* connection_info_content_; 195 views::View* connection_info_content_;
195 196
196 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_; 197 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_;
197 198
198 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 199 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
199 }; 200 };
200 201
201 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ 202 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698