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/shell_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/extensions/shell_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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 } else { | 647 } else { |
648 [NSApp cancelUserAttentionRequest:attention_request_id_]; | 648 [NSApp cancelUserAttentionRequest:attention_request_id_]; |
649 attention_request_id_ = 0; | 649 attention_request_id_ = 0; |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
653 bool ShellWindowCocoa::IsAlwaysOnTop() const { | 653 bool ShellWindowCocoa::IsAlwaysOnTop() const { |
654 return false; | 654 return false; |
655 } | 655 } |
656 | 656 |
| 657 gfx::Insets ShellWindowCocoa::GetFrameInsets() const { |
| 658 return gfx::Insets(); |
| 659 } |
| 660 |
657 void ShellWindowCocoa::WindowWillClose() { | 661 void ShellWindowCocoa::WindowWillClose() { |
658 [window_controller_ setShellWindow:NULL]; | 662 [window_controller_ setShellWindow:NULL]; |
659 shell_window_->SaveWindowPosition(); | 663 shell_window_->SaveWindowPosition(); |
660 shell_window_->OnNativeClose(); | 664 shell_window_->OnNativeClose(); |
661 } | 665 } |
662 | 666 |
663 void ShellWindowCocoa::WindowDidBecomeKey() { | 667 void ShellWindowCocoa::WindowDidBecomeKey() { |
664 content::RenderWidgetHostView* rwhv = | 668 content::RenderWidgetHostView* rwhv = |
665 web_contents()->GetRenderWidgetHostView(); | 669 web_contents()->GetRenderWidgetHostView(); |
666 if (rwhv) | 670 if (rwhv) |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 NSWindow* window = [window_controller_ window]; | 731 NSWindow* window = [window_controller_ window]; |
728 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); | 732 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); |
729 return static_cast<ShellNSWindow*>(window); | 733 return static_cast<ShellNSWindow*>(window); |
730 } | 734 } |
731 | 735 |
732 // static | 736 // static |
733 NativeShellWindow* NativeShellWindow::Create( | 737 NativeShellWindow* NativeShellWindow::Create( |
734 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 738 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
735 return new ShellWindowCocoa(shell_window, params); | 739 return new ShellWindowCocoa(shell_window, params); |
736 } | 740 } |
OLD | NEW |