| OLD | NEW |
| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/memory/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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 // Designated initializer. The controller will release itself when the bubble | 82 // Designated initializer. The controller will release itself when the bubble |
| 83 // is closed. |parentWindow| cannot be nil. |tabContents| may be nil for | 83 // is closed. |parentWindow| cannot be nil. |tabContents| may be nil for |
| 84 // testing purposes. | 84 // testing purposes. |
| 85 - (id)initWithParentWindow:(NSWindow*)parentWindow | 85 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 86 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge | 86 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge |
| 87 webContents:(content::WebContents*)webContents | 87 webContents:(content::WebContents*)webContents |
| 88 isInternalPage:(BOOL)isInternalPage; | 88 isInternalPage:(BOOL)isInternalPage; |
| 89 | 89 |
| 90 - (void)permissionValueChanged:(id)sender; | 90 // Return the default width of the window. It may be wider to fit the content. |
| 91 // This may be overriden by a subclass for testing purposes. |
| 92 - (CGFloat)defaultWindowWidth; |
| 91 | 93 |
| 92 @end | 94 @end |
| 93 | 95 |
| 94 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa | 96 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa |
| 95 // implementation in WebsiteSettingsBubbleController. | 97 // implementation in WebsiteSettingsBubbleController. |
| 96 class WebsiteSettingsUIBridge : public WebsiteSettingsUI { | 98 class WebsiteSettingsUIBridge : public WebsiteSettingsUI { |
| 97 public: | 99 public: |
| 98 WebsiteSettingsUIBridge(); | 100 WebsiteSettingsUIBridge(); |
| 99 virtual ~WebsiteSettingsUIBridge(); | 101 virtual ~WebsiteSettingsUIBridge(); |
| 100 | 102 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 119 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; | 121 virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; |
| 120 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; | 122 virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; |
| 121 virtual void SetSelectedTab(TabId tab_id) OVERRIDE; | 123 virtual void SetSelectedTab(TabId tab_id) OVERRIDE; |
| 122 | 124 |
| 123 private: | 125 private: |
| 124 // The Cocoa controller for the bubble UI. | 126 // The Cocoa controller for the bubble UI. |
| 125 WebsiteSettingsBubbleController* bubble_controller_; | 127 WebsiteSettingsBubbleController* bubble_controller_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); | 129 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); |
| 128 }; | 130 }; |
| OLD | NEW |