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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/native_app_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/extensions/native_app_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/cocoa/browser_window_utils.h" 10 #include "chrome/browser/ui/cocoa/browser_window_utils.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 NSRect frame = [window() frame]; 393 NSRect frame = [window() frame];
394 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame)); 394 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame));
395 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame)); 395 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame));
396 return bounds; 396 return bounds;
397 } 397 }
398 398
399 gfx::Rect NativeAppWindowCocoa::GetBounds() const { 399 gfx::Rect NativeAppWindowCocoa::GetBounds() const {
400 return GetRestoredBounds(); 400 return GetRestoredBounds();
401 } 401 }
402 402
403 gfx::Rect NativeAppWindowCocoa::GetContentBounds() const {
404 // TODO(stevenjb): Correct
405 return GetRestoredBounds();
406 }
407
403 void NativeAppWindowCocoa::Show() { 408 void NativeAppWindowCocoa::Show() {
404 [window_controller_ showWindow:nil]; 409 [window_controller_ showWindow:nil];
405 [window() makeKeyAndOrderFront:window_controller_]; 410 [window() makeKeyAndOrderFront:window_controller_];
406 } 411 }
407 412
408 void NativeAppWindowCocoa::ShowInactive() { 413 void NativeAppWindowCocoa::ShowInactive() {
409 [window() orderFront:window_controller_]; 414 [window() orderFront:window_controller_];
410 } 415 }
411 416
412 void NativeAppWindowCocoa::Hide() { 417 void NativeAppWindowCocoa::Hide() {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); 769 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]);
765 return static_cast<ShellNSWindow*>(window); 770 return static_cast<ShellNSWindow*>(window);
766 } 771 }
767 772
768 // static 773 // static
769 NativeAppWindow* NativeAppWindow::Create( 774 NativeAppWindow* NativeAppWindow::Create(
770 ShellWindow* shell_window, 775 ShellWindow* shell_window,
771 const ShellWindow::CreateParams& params) { 776 const ShellWindow::CreateParams& params) {
772 return new NativeAppWindowCocoa(shell_window, params); 777 return new NativeAppWindowCocoa(shell_window, params);
773 } 778 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.h ('k') | chrome/browser/ui/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698