| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 10 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 10 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // This may be overriden by a subclass for testing purposes. | 94 // This may be overriden by a subclass for testing purposes. |
| 95 - (CGFloat)defaultWindowWidth; | 95 - (CGFloat)defaultWindowWidth; |
| 96 | 96 |
| 97 @end | 97 @end |
| 98 | 98 |
| 99 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa | 99 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa |
| 100 // implementation in WebsiteSettingsBubbleController. | 100 // implementation in WebsiteSettingsBubbleController. |
| 101 class WebsiteSettingsUIBridge : public WebsiteSettingsUI { | 101 class WebsiteSettingsUIBridge : public WebsiteSettingsUI { |
| 102 public: | 102 public: |
| 103 WebsiteSettingsUIBridge(); | 103 WebsiteSettingsUIBridge(); |
| 104 virtual ~WebsiteSettingsUIBridge(); | 104 ~WebsiteSettingsUIBridge() override; |
| 105 | 105 |
| 106 // Creates a |WebsiteSettingsBubbleController| and displays the UI. |parent| | 106 // Creates a |WebsiteSettingsBubbleController| and displays the UI. |parent| |
| 107 // contains the currently active window, |profile| contains the currently | 107 // contains the currently active window, |profile| contains the currently |
| 108 // active profile and |ssl| contains the |SSLStatus| of the connection to the | 108 // active profile and |ssl| contains the |SSLStatus| of the connection to the |
| 109 // website in the currently active tab that is wrapped by the | 109 // website in the currently active tab that is wrapped by the |
| 110 // |web_contents|. | 110 // |web_contents|. |
| 111 static void Show(gfx::NativeWindow parent, | 111 static void Show(gfx::NativeWindow parent, |
| 112 Profile* profile, | 112 Profile* profile, |
| 113 content::WebContents* web_contents, | 113 content::WebContents* web_contents, |
| 114 const GURL& url, | 114 const GURL& url, |
| 115 const content::SSLStatus& ssl); | 115 const content::SSLStatus& ssl); |
| 116 | 116 |
| 117 void set_bubble_controller( | 117 void set_bubble_controller( |
| 118 WebsiteSettingsBubbleController* bubble_controller); | 118 WebsiteSettingsBubbleController* bubble_controller); |
| 119 | 119 |
| 120 // WebsiteSettingsUI implementations. | 120 // WebsiteSettingsUI implementations. |
| 121 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) override; | 121 void SetCookieInfo(const CookieInfoList& cookie_info_list) override; |
| 122 virtual void SetPermissionInfo( | 122 void SetPermissionInfo( |
| 123 const PermissionInfoList& permission_info_list) override; | 123 const PermissionInfoList& permission_info_list) override; |
| 124 virtual void SetIdentityInfo(const IdentityInfo& identity_info) override; | 124 void SetIdentityInfo(const IdentityInfo& identity_info) override; |
| 125 virtual void SetFirstVisit(const base::string16& first_visit) override; | 125 void SetFirstVisit(const base::string16& first_visit) override; |
| 126 virtual void SetSelectedTab(TabId tab_id) override; | 126 void SetSelectedTab(TabId tab_id) override; |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 // The Cocoa controller for the bubble UI. | 129 // The Cocoa controller for the bubble UI. |
| 130 WebsiteSettingsBubbleController* bubble_controller_; | 130 WebsiteSettingsBubbleController* bubble_controller_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); | 132 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); |
| 133 }; | 133 }; |
| OLD | NEW |