Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

Issue 7322004: DevTools: devtools manager should know nothing about DevToolsWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/extensions/extension_host.h" 9 #include "chrome/browser/extensions/extension_host.h"
10 #include "chrome/browser/extensions/extension_process_manager.h" 10 #include "chrome/browser/extensions/extension_process_manager.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" 13 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
14 #import "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" 14 #import "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
15 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 15 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
16 #include "content/browser/debugger/devtools_manager.h" 16 #include "content/browser/debugger/devtools_window.h"
17 #include "content/common/notification_details.h" 17 #include "content/common/notification_details.h"
18 #include "content/common/notification_registrar.h" 18 #include "content/common/notification_registrar.h"
19 #include "content/common/notification_source.h" 19 #include "content/common/notification_source.h"
20 20
21 namespace { 21 namespace {
22 // The duration for any animations that might be invoked by this controller. 22 // The duration for any animations that might be invoked by this controller.
23 const NSTimeInterval kAnimationDuration = 0.2; 23 const NSTimeInterval kAnimationDuration = 0.2;
24 24
25 // There should only be one extension popup showing at one time. Keep a 25 // There should only be one extension popup showing at one time. Keep a
26 // reference to it here. 26 // reference to it here.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 NotificationType::DEVTOOLS_WINDOW_CLOSING, 134 NotificationType::DEVTOOLS_WINDOW_CLOSING,
135 Source<Profile>(host->profile())); 135 Source<Profile>(host->profile()));
136 registrar_->Add(notificationBridge_.get(), 136 registrar_->Add(notificationBridge_.get(),
137 NotificationType::EXTENSION_HOST_DID_STOP_LOADING, 137 NotificationType::EXTENSION_HOST_DID_STOP_LOADING,
138 Source<Profile>(host->profile())); 138 Source<Profile>(host->profile()));
139 } 139 }
140 return self; 140 return self;
141 } 141 }
142 142
143 - (void)showDevTools { 143 - (void)showDevTools {
144 DevToolsManager::GetInstance()->OpenDevToolsWindow(host_->render_view_host()); 144 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host());
145 } 145 }
146 146
147 - (void)dealloc { 147 - (void)dealloc {
148 [[NSNotificationCenter defaultCenter] removeObserver:self]; 148 [[NSNotificationCenter defaultCenter] removeObserver:self];
149 [super dealloc]; 149 [super dealloc];
150 } 150 }
151 151
152 - (void)parentWindowWillClose:(NSNotification*)notification { 152 - (void)parentWindowWillClose:(NSNotification*)notification {
153 [self close]; 153 [self close];
154 } 154 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return minSize; 329 return minSize;
330 } 330 }
331 331
332 // Private (TestingAPI) 332 // Private (TestingAPI)
333 + (NSSize)maxPopupSize { 333 + (NSSize)maxPopupSize {
334 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; 334 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight};
335 return maxSize; 335 return maxSize;
336 } 336 }
337 337
338 @end 338 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698