OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/apps/native_app_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h" |
6 | 6 |
7 #include "apps/app_shim/extension_app_shim_handler_mac.h" | 7 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect)); | 793 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect)); |
794 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect)); | 794 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect)); |
795 | 795 |
796 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect]; | 796 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect]; |
797 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); | 797 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); |
798 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); | 798 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); |
799 | 799 |
800 return frame_rect.InsetsFrom(content_rect); | 800 return frame_rect.InsetsFrom(content_rect); |
801 } | 801 } |
802 | 802 |
| 803 bool NativeAppWindowCocoa::CanHaveAlphaEnabled() const { |
| 804 return false; |
| 805 } |
| 806 |
803 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { | 807 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { |
804 NOTIMPLEMENTED(); | 808 NOTIMPLEMENTED(); |
805 return NULL; | 809 return NULL; |
806 } | 810 } |
807 | 811 |
808 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { | 812 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { |
809 NOTIMPLEMENTED(); | 813 NOTIMPLEMENTED(); |
810 return gfx::Point(); | 814 return gfx::Point(); |
811 } | 815 } |
812 | 816 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 } | 1008 } |
1005 | 1009 |
1006 void NativeAppWindowCocoa::UpdateRestoredBounds() { | 1010 void NativeAppWindowCocoa::UpdateRestoredBounds() { |
1007 if (IsRestored(*this)) | 1011 if (IsRestored(*this)) |
1008 restored_bounds_ = [window() frame]; | 1012 restored_bounds_ = [window() frame]; |
1009 } | 1013 } |
1010 | 1014 |
1011 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { | 1015 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { |
1012 [window() orderOut:window_controller_]; | 1016 [window() orderOut:window_controller_]; |
1013 } | 1017 } |
OLD | NEW |