OLD | NEW |
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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 } else { | 648 } else { |
649 [NSApp cancelUserAttentionRequest:attention_request_id_]; | 649 [NSApp cancelUserAttentionRequest:attention_request_id_]; |
650 attention_request_id_ = 0; | 650 attention_request_id_ = 0; |
651 } | 651 } |
652 } | 652 } |
653 | 653 |
654 bool NativeAppWindowCocoa::IsAlwaysOnTop() const { | 654 bool NativeAppWindowCocoa::IsAlwaysOnTop() const { |
655 return false; | 655 return false; |
656 } | 656 } |
657 | 657 |
| 658 gfx::Insets NativeAppWindowCocoa::GetFrameInsets() const { |
| 659 return gfx::Insets(); |
| 660 } |
| 661 |
658 void NativeAppWindowCocoa::WindowWillClose() { | 662 void NativeAppWindowCocoa::WindowWillClose() { |
659 [window_controller_ setAppWindow:NULL]; | 663 [window_controller_ setAppWindow:NULL]; |
660 shell_window_->OnNativeWindowChanged(); | 664 shell_window_->OnNativeWindowChanged(); |
661 shell_window_->OnNativeClose(); | 665 shell_window_->OnNativeClose(); |
662 } | 666 } |
663 | 667 |
664 void NativeAppWindowCocoa::WindowDidBecomeKey() { | 668 void NativeAppWindowCocoa::WindowDidBecomeKey() { |
665 content::RenderWidgetHostView* rwhv = | 669 content::RenderWidgetHostView* rwhv = |
666 web_contents()->GetRenderWidgetHostView(); | 670 web_contents()->GetRenderWidgetHostView(); |
667 if (rwhv) | 671 if (rwhv) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); | 733 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); |
730 return static_cast<ShellNSWindow*>(window); | 734 return static_cast<ShellNSWindow*>(window); |
731 } | 735 } |
732 | 736 |
733 // static | 737 // static |
734 NativeAppWindow* NativeAppWindow::Create( | 738 NativeAppWindow* NativeAppWindow::Create( |
735 ShellWindow* shell_window, | 739 ShellWindow* shell_window, |
736 const ShellWindow::CreateParams& params) { | 740 const ShellWindow::CreateParams& params) { |
737 return new NativeAppWindowCocoa(shell_window, params); | 741 return new NativeAppWindowCocoa(shell_window, params); |
738 } | 742 } |
OLD | NEW |