Chromium Code Reviews| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 | 99 |
| 100 // Designated initializer. The controller will release itself when the bubble | 100 // Designated initializer. The controller will release itself when the bubble |
| 101 // is closed. |parentWindow| cannot be nil. |webContents| may be nil for | 101 // is closed. |parentWindow| cannot be nil. |webContents| may be nil for |
| 102 // testing purposes. | 102 // testing purposes. |
| 103 - (id)initWithParentWindow:(NSWindow*)parentWindow | 103 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 104 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge | 104 websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge |
| 105 webContents:(content::WebContents*)webContents | 105 webContents:(content::WebContents*)webContents |
| 106 url:(const GURL&)url | 106 url:(const GURL&)url |
| 107 isDevToolsDisabled:(BOOL)isDevToolsDisabled; | 107 isDevToolsDisabled:(BOOL)isDevToolsDisabled; |
| 108 | 108 |
| 109 - (Profile*)profile; | |
|
tapted
2016/10/11 02:22:16
nit: I think this can be "private". Which you can
raymes
2016/10/11 03:50:02
Done.
| |
| 110 | |
| 109 // Return the default width of the window. It may be wider to fit the content. | 111 // Return the default width of the window. It may be wider to fit the content. |
| 110 // This may be overriden by a subclass for testing purposes. | 112 // This may be overriden by a subclass for testing purposes. |
| 111 - (CGFloat)defaultWindowWidth; | 113 - (CGFloat)defaultWindowWidth; |
| 112 | 114 |
| 113 @end | 115 @end |
| 114 | 116 |
| 115 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa | 117 // Provides a bridge between the WebSettingsUI C++ interface and the Cocoa |
| 116 // implementation in WebsiteSettingsBubbleController. | 118 // implementation in WebsiteSettingsBubbleController. |
| 117 class WebsiteSettingsUIBridge : public content::WebContentsObserver, | 119 class WebsiteSettingsUIBridge : public content::WebContentsObserver, |
| 118 public WebsiteSettingsUI { | 120 public WebsiteSettingsUI { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 | 152 |
| 151 private: | 153 private: |
| 152 // The WebContents the bubble UI is attached to. | 154 // The WebContents the bubble UI is attached to. |
| 153 content::WebContents* web_contents_; | 155 content::WebContents* web_contents_; |
| 154 | 156 |
| 155 // The Cocoa controller for the bubble UI. | 157 // The Cocoa controller for the bubble UI. |
| 156 WebsiteSettingsBubbleController* bubble_controller_; | 158 WebsiteSettingsBubbleController* bubble_controller_; |
| 157 | 159 |
| 158 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); | 160 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsUIBridge); |
| 159 }; | 161 }; |
| OLD | NEW |