| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/debugger/devtools_window.h" | 9 #include "chrome/browser/debugger/devtools_window.h" |
| 10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 [window setDelegate:self]; | 127 [window setDelegate:self]; |
| 128 [window setContentView:view]; | 128 [window setContentView:view]; |
| 129 self = [super initWithWindow:window]; | 129 self = [super initWithWindow:window]; |
| 130 if (beingInspected_) { | 130 if (beingInspected_) { |
| 131 // Listen for the the devtools window closing. | 131 // Listen for the the devtools window closing. |
| 132 notificationBridge_.reset(new DevtoolsNotificationBridge(self)); | 132 notificationBridge_.reset(new DevtoolsNotificationBridge(self)); |
| 133 registrar_.reset(new NotificationRegistrar); | 133 registrar_.reset(new NotificationRegistrar); |
| 134 registrar_->Add(notificationBridge_.get(), | 134 registrar_->Add(notificationBridge_.get(), |
| 135 content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, | 135 content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, |
| 136 Source<Profile>(host->profile())); | 136 Source<content::BrowserContext>(host->profile())); |
| 137 registrar_->Add(notificationBridge_.get(), | 137 registrar_->Add(notificationBridge_.get(), |
| 138 chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, | 138 chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
| 139 Source<Profile>(host->profile())); | 139 Source<Profile>(host->profile())); |
| 140 } | 140 } |
| 141 return self; | 141 return self; |
| 142 } | 142 } |
| 143 | 143 |
| 144 - (void)showDevTools { | 144 - (void)showDevTools { |
| 145 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host()); | 145 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host()); |
| 146 } | 146 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 return minSize; | 330 return minSize; |
| 331 } | 331 } |
| 332 | 332 |
| 333 // Private (TestingAPI) | 333 // Private (TestingAPI) |
| 334 + (NSSize)maxPopupSize { | 334 + (NSSize)maxPopupSize { |
| 335 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; | 335 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; |
| 336 return maxSize; | 336 return maxSize; |
| 337 } | 337 } |
| 338 | 338 |
| 339 @end | 339 @end |
| OLD | NEW |