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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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
OLDNEW
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 "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 "base/callback.h" 9 #include "base/callback.h"
10 #include "chrome/browser/devtools/devtools_window.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; 142 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_;
143 }; 143 };
144 144
145 @implementation ExtensionPopupController 145 @implementation ExtensionPopupController
146 146
147 - (id)initWithHost:(extensions::ExtensionHost*)host 147 - (id)initWithHost:(extensions::ExtensionHost*)host
148 parentWindow:(NSWindow*)parentWindow 148 parentWindow:(NSWindow*)parentWindow
149 anchoredAt:(NSPoint)anchoredAt 149 anchoredAt:(NSPoint)anchoredAt
150 arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation 150 arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation
151 devMode:(BOOL)devMode { 151 devMode:(BOOL)devMode {
152 scoped_nsobject<InfoBubbleWindow> window( 152 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc]
153 [[InfoBubbleWindow alloc] 153 initWithContentRect:ui::kWindowSizeDeterminedLater
154 initWithContentRect:ui::kWindowSizeDeterminedLater 154 styleMask:NSBorderlessWindowMask
155 styleMask:NSBorderlessWindowMask 155 backing:NSBackingStoreBuffered
156 backing:NSBackingStoreBuffered 156 defer:YES]);
157 defer:YES]);
158 if (!window.get()) 157 if (!window.get())
159 return nil; 158 return nil;
160 159
161 anchoredAt = [parentWindow convertBaseToScreen:anchoredAt]; 160 anchoredAt = [parentWindow convertBaseToScreen:anchoredAt];
162 if ((self = [super initWithWindow:window 161 if ((self = [super initWithWindow:window
163 parentWindow:parentWindow 162 parentWindow:parentWindow
164 anchoredAt:anchoredAt])) { 163 anchoredAt:anchoredAt])) {
165 host_.reset(host); 164 host_.reset(host);
166 beingInspected_ = devMode; 165 beingInspected_ = devMode;
167 166
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 return minSize; 378 return minSize;
380 } 379 }
381 380
382 // Private (TestingAPI) 381 // Private (TestingAPI)
383 + (NSSize)maxPopupSize { 382 + (NSSize)maxPopupSize {
384 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; 383 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight};
385 return maxSize; 384 return maxSize;
386 } 385 }
387 386
388 @end 387 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698