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

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

Powered by Google App Engine
This is Rietveld 408576698