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 "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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 devMode:(BOOL)devMode { | 130 devMode:(BOOL)devMode { |
131 scoped_nsobject<InfoBubbleWindow> window( | 131 scoped_nsobject<InfoBubbleWindow> window( |
132 [[InfoBubbleWindow alloc] | 132 [[InfoBubbleWindow alloc] |
133 initWithContentRect:ui::kWindowSizeDeterminedLater | 133 initWithContentRect:ui::kWindowSizeDeterminedLater |
134 styleMask:NSBorderlessWindowMask | 134 styleMask:NSBorderlessWindowMask |
135 backing:NSBackingStoreBuffered | 135 backing:NSBackingStoreBuffered |
136 defer:YES]); | 136 defer:YES]); |
137 if (!window.get()) | 137 if (!window.get()) |
138 return nil; | 138 return nil; |
139 | 139 |
140 // Don't blur the extension window background. This can interfer with OpenGL | |
141 // drawing on the window. See http://openradar.appspot.com/11920246 | |
142 [window setHasBlurredBackground:NO]; | |
143 | |
144 anchoredAt = [parentWindow convertBaseToScreen:anchoredAt]; | 140 anchoredAt = [parentWindow convertBaseToScreen:anchoredAt]; |
145 if ((self = [super initWithWindow:window | 141 if ((self = [super initWithWindow:window |
146 parentWindow:parentWindow | 142 parentWindow:parentWindow |
147 anchoredAt:anchoredAt])) { | 143 anchoredAt:anchoredAt])) { |
148 host_.reset(host); | 144 host_.reset(host); |
149 beingInspected_ = devMode; | 145 beingInspected_ = devMode; |
150 | 146 |
151 InfoBubbleView* view = self.bubble; | 147 InfoBubbleView* view = self.bubble; |
152 [view setArrowLocation:arrowLocation]; | 148 [view setArrowLocation:arrowLocation]; |
153 | 149 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 return minSize; | 370 return minSize; |
375 } | 371 } |
376 | 372 |
377 // Private (TestingAPI) | 373 // Private (TestingAPI) |
378 + (NSSize)maxPopupSize { | 374 + (NSSize)maxPopupSize { |
379 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; | 375 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; |
380 return maxSize; | 376 return maxSize; |
381 } | 377 } |
382 | 378 |
383 @end | 379 @end |
OLD | NEW |