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

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

Issue 12803011: Add BaseWindow::GetContentBounds() and use in WindowController::CreateWindowValue() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix osx build Created 7 years, 9 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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 NSRect frame = [controller_ regularWindowFrame]; 313 NSRect frame = [controller_ regularWindowFrame];
314 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame)); 314 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame));
315 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame)); 315 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame));
316 return bounds; 316 return bounds;
317 } 317 }
318 318
319 gfx::Rect BrowserWindowCocoa::GetBounds() const { 319 gfx::Rect BrowserWindowCocoa::GetBounds() const {
320 return GetRestoredBounds(); 320 return GetRestoredBounds();
321 } 321 }
322 322
323 gfx::Rect BrowserWindowCocoa::GetContentBounds() const {
324 // TODO(stevenjb): Correct
325 return GetRestoredBounds();
326 }
327
323 bool BrowserWindowCocoa::IsMaximized() const { 328 bool BrowserWindowCocoa::IsMaximized() const {
324 return [window() isZoomed]; 329 return [window() isZoomed];
325 } 330 }
326 331
327 bool BrowserWindowCocoa::IsMinimized() const { 332 bool BrowserWindowCocoa::IsMinimized() const {
328 return [window() isMiniaturized]; 333 return [window() isMiniaturized];
329 } 334 }
330 335
331 void BrowserWindowCocoa::Maximize() { 336 void BrowserWindowCocoa::Maximize() {
332 // Zoom toggles so only call if not already maximized. 337 // Zoom toggles so only call if not already maximized.
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 PasswordGenerationBubbleController* controller = 709 PasswordGenerationBubbleController* controller =
705 [[PasswordGenerationBubbleController alloc] 710 [[PasswordGenerationBubbleController alloc]
706 initWithWindow:browser_->window()->GetNativeWindow() 711 initWithWindow:browser_->window()->GetNativeWindow()
707 anchoredAt:point 712 anchoredAt:point
708 renderViewHost:web_contents->GetRenderViewHost() 713 renderViewHost:web_contents->GetRenderViewHost()
709 passwordManager:PasswordManager::FromWebContents(web_contents) 714 passwordManager:PasswordManager::FromWebContents(web_contents)
710 usingGenerator:password_generator 715 usingGenerator:password_generator
711 forForm:form]; 716 forForm:form];
712 [controller showWindow:nil]; 717 [controller showWindow:nil];
713 } 718 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698