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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ssl/security_state_model.h"
9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 10 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
10 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 11 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
11 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
12 13
13 class WebsiteSettingsUIBridge; 14 class WebsiteSettingsUIBridge;
14 15
15 namespace content { 16 namespace content {
16 class WebContents; 17 class WebContents;
17 } 18 }
18 19
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // implementation in WebsiteSettingsBubbleController. 100 // implementation in WebsiteSettingsBubbleController.
100 class WebsiteSettingsUIBridge : public content::WebContentsObserver, 101 class WebsiteSettingsUIBridge : public content::WebContentsObserver,
101 public WebsiteSettingsUI { 102 public WebsiteSettingsUI {
102 public: 103 public:
103 explicit WebsiteSettingsUIBridge(content::WebContents* web_contents); 104 explicit WebsiteSettingsUIBridge(content::WebContents* web_contents);
104 ~WebsiteSettingsUIBridge() override; 105 ~WebsiteSettingsUIBridge() override;
105 106
106 // Creates a |WebsiteSettingsBubbleController| and displays the UI. |parent| 107 // Creates a |WebsiteSettingsBubbleController| and displays the UI. |parent|
107 // is the currently active window. |profile| points to the currently active 108 // is the currently active window. |profile| points to the currently active
108 // profile. |web_contents| points to the WebContents that wraps the currently 109 // profile. |web_contents| points to the WebContents that wraps the currently
109 // active tab. |url| is the GURL of the currently active tab. |ssl| is the 110 // active tab. |url| is the GURL of the currently active
110 // |SSLStatus| of the connection to the website in the currently active tab. 111 // tab. |security_info| is the |SecurityStateModel::SecurityInfo| of
112 // the connection to the website in the currently active tab.
111 static void Show(gfx::NativeWindow parent, 113 static void Show(gfx::NativeWindow parent,
112 Profile* profile, 114 Profile* profile,
113 content::WebContents* web_contents, 115 content::WebContents* web_contents,
114 const GURL& url, 116 const GURL& url,
115 const content::SSLStatus& ssl); 117 const SecurityStateModel::SecurityInfo& security_info);
116 118
117 void set_bubble_controller( 119 void set_bubble_controller(
118 WebsiteSettingsBubbleController* bubble_controller); 120 WebsiteSettingsBubbleController* bubble_controller);
119 121
120 // WebContentsObserver implementation. 122 // WebContentsObserver implementation.
121 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; 123 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
122 124
123 // WebsiteSettingsUI implementations. 125 // WebsiteSettingsUI implementations.
124 void SetCookieInfo(const CookieInfoList& cookie_info_list) override; 126 void SetCookieInfo(const CookieInfoList& cookie_info_list) override;
125 void SetPermissionInfo( 127 void SetPermissionInfo(
126 const PermissionInfoList& permission_info_list) override; 128 const PermissionInfoList& permission_info_list) override;
127 void SetIdentityInfo(const IdentityInfo& identity_info) override; 129 void SetIdentityInfo(const IdentityInfo& identity_info) override;
128 void SetSelectedTab(TabId tab_id) override; 130 void SetSelectedTab(TabId tab_id) override;
129 131
130 private: 132 private:
131 // The WebContents the bubble UI is attached to. 133 // The WebContents the bubble UI is attached to.
132 content::WebContents* web_contents_; 134 content::WebContents* web_contents_;
133 135
134 // The Cocoa controller for the bubble UI. 136 // The Cocoa controller for the bubble UI.
135 WebsiteSettingsBubbleController* bubble_controller_; 137 WebsiteSettingsBubbleController* bubble_controller_;
136 138
137 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); 139 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge);
138 }; 140 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698