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

Side by Side Diff: chrome/browser/ui/cocoa/page_info_bubble_controller.mm

Issue 10003005: Zero-sized windows are bad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: formatting Created 8 years, 8 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/page_info_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/page_info_bubble_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 @implementation PageInfoBubbleController 176 @implementation PageInfoBubbleController
177 177
178 @synthesize certID = certID_; 178 @synthesize certID = certID_;
179 179
180 - (id)initWithPageInfoModel:(PageInfoModel*)model 180 - (id)initWithPageInfoModel:(PageInfoModel*)model
181 modelObserver:(PageInfoModelObserver*)bridge 181 modelObserver:(PageInfoModelObserver*)bridge
182 parentWindow:(NSWindow*)parentWindow { 182 parentWindow:(NSWindow*)parentWindow {
183 DCHECK(parentWindow); 183 DCHECK(parentWindow);
184 184
185 // Use an arbitrary height because it will be changed by the bridge. 185 // Use an arbitrary height because it will be changed by the bridge.
186 NSRect contentRect = NSMakeRect(0, 0, kWindowWidth, 0); 186 NSRect contentRect = NSMakeRect(0, 0, kWindowWidth, 1);
187 // Create an empty window into which content is placed. 187 // Create an empty window into which content is placed.
188 scoped_nsobject<InfoBubbleWindow> window( 188 scoped_nsobject<InfoBubbleWindow> window(
189 [[InfoBubbleWindow alloc] initWithContentRect:contentRect 189 [[InfoBubbleWindow alloc] initWithContentRect:contentRect
190 styleMask:NSBorderlessWindowMask 190 styleMask:NSBorderlessWindowMask
191 backing:NSBackingStoreBuffered 191 backing:NSBackingStoreBuffered
192 defer:NO]); 192 defer:NO]);
193 193
194 if ((self = [super initWithWindow:window.get() 194 if ((self = [super initWithWindow:window.get()
195 parentWindow:parentWindow 195 parentWindow:parentWindow
196 anchoredAt:NSZeroPoint])) { 196 anchoredAt:NSZeroPoint])) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 LocationBarViewMac* locationBar = [controller locationBarBridge]; 475 LocationBarViewMac* locationBar = [controller locationBarBridge];
476 if (locationBar) { 476 if (locationBar) {
477 NSPoint bubblePoint = locationBar->GetPageInfoBubblePoint(); 477 NSPoint bubblePoint = locationBar->GetPageInfoBubblePoint();
478 origin = [parent convertBaseToScreen:bubblePoint]; 478 origin = [parent convertBaseToScreen:bubblePoint];
479 } 479 }
480 } 480 }
481 return origin; 481 return origin;
482 } 482 }
483 483
484 @end 484 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698