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

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

Issue 506069: [Mac] Port browser action popup test to mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/extensions/extension_popup_controller.h" 5 #import "chrome/browser/cocoa/extensions/extension_popup_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #import "chrome/browser/cocoa/browser_window_cocoa.h" 10 #import "chrome/browser/cocoa/browser_window_cocoa.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // We want this to be a child of a browser window. addChildWindow: (called from 183 // We want this to be a child of a browser window. addChildWindow: (called from
184 // this function) will bring the window on-screen; unfortunately, 184 // this function) will bring the window on-screen; unfortunately,
185 // [NSWindowController showWindow:] will also bring it on-screen (but will cause 185 // [NSWindowController showWindow:] will also bring it on-screen (but will cause
186 // unexpected changes to the window's position). We cannot have an 186 // unexpected changes to the window's position). We cannot have an
187 // addChildWindow: and a subsequent showWindow:. Thus, we have our own version. 187 // addChildWindow: and a subsequent showWindow:. Thus, we have our own version.
188 - (void)showWindow:(id)sender { 188 - (void)showWindow:(id)sender {
189 [parentWindow_ addChildWindow:[self window] ordered:NSWindowAbove]; 189 [parentWindow_ addChildWindow:[self window] ordered:NSWindowAbove];
190 [[self window] makeKeyAndOrderFront:self]; 190 [[self window] makeKeyAndOrderFront:self];
191 } 191 }
192 192
193 // Private (TestingAPI)
194 - (NSView*)view {
195 return extensionView_;
196 }
197
198 // Private (TestingAPI)
199 + (NSSize)minPopupSize {
200 NSSize minSize = {kMinWidth, kMinHeight};
201 return minSize;
202 }
203
204 // Private (TestingAPI)
205 + (NSSize)maxPopupSize {
206 NSSize maxSize = {kMaxWidth, kMaxHeight};
207 return maxSize;
208 }
209
193 @end 210 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/extensions/extension_popup_controller.h ('k') | chrome/browser/extensions/browser_action_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698