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