| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
| 9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); | 656 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); |
| 657 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); | 657 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); |
| 658 | 658 |
| 659 return frame_rect.InsetsFrom(content_rect); | 659 return frame_rect.InsetsFrom(content_rect); |
| 660 } | 660 } |
| 661 | 661 |
| 662 bool NativeAppWindowCocoa::CanHaveAlphaEnabled() const { | 662 bool NativeAppWindowCocoa::CanHaveAlphaEnabled() const { |
| 663 return false; | 663 return false; |
| 664 } | 664 } |
| 665 | 665 |
| 666 void NativeAppWindowCocoa::SetActivateOnPointer(bool activate_on_pointer) { |
| 667 NOTIMPLEMENTED(); |
| 668 } |
| 669 |
| 666 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { | 670 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { |
| 667 return WebContents()->GetNativeView(); | 671 return WebContents()->GetNativeView(); |
| 668 } | 672 } |
| 669 | 673 |
| 670 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { | 674 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { |
| 671 NOTIMPLEMENTED(); | 675 NOTIMPLEMENTED(); |
| 672 return gfx::Point(); | 676 return gfx::Point(); |
| 673 } | 677 } |
| 674 | 678 |
| 675 gfx::Size NativeAppWindowCocoa::GetMaximumDialogSize() { | 679 gfx::Size NativeAppWindowCocoa::GetMaximumDialogSize() { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 } | 836 } |
| 833 | 837 |
| 834 void NativeAppWindowCocoa::UpdateRestoredBounds() { | 838 void NativeAppWindowCocoa::UpdateRestoredBounds() { |
| 835 if (IsRestored(*this)) | 839 if (IsRestored(*this)) |
| 836 restored_bounds_ = [window() frame]; | 840 restored_bounds_ = [window() frame]; |
| 837 } | 841 } |
| 838 | 842 |
| 839 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { | 843 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { |
| 840 [window() orderOut:window_controller_]; | 844 [window() orderOut:window_controller_]; |
| 841 } | 845 } |
| OLD | NEW |