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 "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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 @synthesize extensionId = extensionId_; | 161 @synthesize extensionId = extensionId_; |
162 | 162 |
163 - (id)initWithParentWindow:(NSWindow*)parentWindow | 163 - (id)initWithParentWindow:(NSWindow*)parentWindow |
164 anchoredAt:(NSPoint)anchoredAt | 164 anchoredAt:(NSPoint)anchoredAt |
165 arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation | 165 arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation |
166 devMode:(BOOL)devMode { | 166 devMode:(BOOL)devMode { |
167 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc] | 167 base::scoped_nsobject<InfoBubbleWindow> window([[InfoBubbleWindow alloc] |
168 initWithContentRect:ui::kWindowSizeDeterminedLater | 168 initWithContentRect:ui::kWindowSizeDeterminedLater |
169 styleMask:NSBorderlessWindowMask | 169 styleMask:NSBorderlessWindowMask |
170 backing:NSBackingStoreBuffered | 170 backing:NSBackingStoreBuffered |
171 defer:YES]); | 171 defer:NO]); |
172 if (!window.get()) | 172 if (!window.get()) |
173 return nil; | 173 return nil; |
174 | 174 |
175 anchoredAt = [parentWindow convertBaseToScreen:anchoredAt]; | 175 anchoredAt = [parentWindow convertBaseToScreen:anchoredAt]; |
176 if ((self = [super initWithWindow:window | 176 if ((self = [super initWithWindow:window |
177 parentWindow:parentWindow | 177 parentWindow:parentWindow |
178 anchoredAt:anchoredAt])) { | 178 anchoredAt:anchoredAt])) { |
179 beingInspected_ = devMode; | 179 beingInspected_ = devMode; |
180 ignoreWindowDidResignKey_ = NO; | 180 ignoreWindowDidResignKey_ = NO; |
181 [[self bubble] setArrowLocation:arrowLocation]; | 181 [[self bubble] setArrowLocation:arrowLocation]; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 return minSize; | 433 return minSize; |
434 } | 434 } |
435 | 435 |
436 // Private (TestingAPI) | 436 // Private (TestingAPI) |
437 + (NSSize)maxPopupSize { | 437 + (NSSize)maxPopupSize { |
438 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; | 438 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; |
439 return maxSize; | 439 return maxSize; |
440 } | 440 } |
441 | 441 |
442 @end | 442 @end |
OLD | NEW |