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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm

Issue 17378003: [WIN]Save work area of window and adjust bounds to ensure it fit on screen before show. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
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/strings/sys_string_conversions.h" 8 #include "base/strings/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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect)); 707 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect));
708 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect)); 708 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect));
709 709
710 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect]; 710 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect];
711 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); 711 gfx::Rect content_rect(NSRectToCGRect(content_nsrect));
712 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); 712 content_rect.set_y(screen_height - NSMaxY(content_nsrect));
713 713
714 return frame_rect.InsetsFrom(content_rect); 714 return frame_rect.InsetsFrom(content_rect);
715 } 715 }
716 716
717 gfx::Rect NativeAppWindowCocoa::GetWindowWorkArea() const {
718 NOTIMPLEMENTED();
scheib 2013/06/18 21:52:06 I'd like to be able to land your patch (giving you
zhchbin 2013/06/20 06:35:50 Done.
719 return gfx::Rect();
720 }
721
717 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { 722 gfx::NativeView NativeAppWindowCocoa::GetHostView() const {
718 NOTIMPLEMENTED(); 723 NOTIMPLEMENTED();
719 return NULL; 724 return NULL;
720 } 725 }
721 726
722 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { 727 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) {
723 NOTIMPLEMENTED(); 728 NOTIMPLEMENTED();
724 return gfx::Point(); 729 return gfx::Point();
725 } 730 }
726 731
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); 826 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]);
822 return static_cast<ShellNSWindow*>(window); 827 return static_cast<ShellNSWindow*>(window);
823 } 828 }
824 829
825 // static 830 // static
826 NativeAppWindow* NativeAppWindow::Create( 831 NativeAppWindow* NativeAppWindow::Create(
827 ShellWindow* shell_window, 832 ShellWindow* shell_window,
828 const ShellWindow::CreateParams& params) { 833 const ShellWindow::CreateParams& params) {
829 return new NativeAppWindowCocoa(shell_window, params); 834 return new NativeAppWindowCocoa(shell_window, params);
830 } 835 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698