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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 } else { | 649 } else { |
650 [NSApp cancelUserAttentionRequest:attention_request_id_]; | 650 [NSApp cancelUserAttentionRequest:attention_request_id_]; |
651 attention_request_id_ = 0; | 651 attention_request_id_ = 0; |
652 } | 652 } |
653 } | 653 } |
654 | 654 |
655 bool ShellWindowCocoa::IsAlwaysOnTop() const { | 655 bool ShellWindowCocoa::IsAlwaysOnTop() const { |
656 return false; | 656 return false; |
657 } | 657 } |
658 | 658 |
| 659 gfx::Rect ShellWindowCocoa::ContentBoundsForWindowBounds( |
| 660 const gfx::Rect& window_bounds) const { |
| 661 // TODO(jeremya): implement. |
| 662 return window_bounds; |
| 663 } |
| 664 |
| 665 gfx::Rect ShellWindowCocoa::WindowBoundsForContentBounds( |
| 666 const gfx::Rect& content_bounds) const { |
| 667 // TODO(jeremya): implement. |
| 668 return content_bounds; |
| 669 } |
| 670 |
659 void ShellWindowCocoa::WindowWillClose() { | 671 void ShellWindowCocoa::WindowWillClose() { |
660 [window_controller_ setShellWindow:NULL]; | 672 [window_controller_ setShellWindow:NULL]; |
661 shell_window_->SaveWindowPosition(); | 673 shell_window_->SaveWindowPosition(); |
662 shell_window_->OnNativeClose(); | 674 shell_window_->OnNativeClose(); |
663 } | 675 } |
664 | 676 |
665 void ShellWindowCocoa::WindowDidBecomeKey() { | 677 void ShellWindowCocoa::WindowDidBecomeKey() { |
666 content::RenderWidgetHostView* rwhv = | 678 content::RenderWidgetHostView* rwhv = |
667 web_contents()->GetRenderWidgetHostView(); | 679 web_contents()->GetRenderWidgetHostView(); |
668 if (rwhv) | 680 if (rwhv) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 NSWindow* window = [window_controller_ window]; | 730 NSWindow* window = [window_controller_ window]; |
719 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); | 731 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); |
720 return static_cast<ShellNSWindow*>(window); | 732 return static_cast<ShellNSWindow*>(window); |
721 } | 733 } |
722 | 734 |
723 // static | 735 // static |
724 NativeShellWindow* NativeShellWindow::Create( | 736 NativeShellWindow* NativeShellWindow::Create( |
725 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 737 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
726 return new ShellWindowCocoa(shell_window, params); | 738 return new ShellWindowCocoa(shell_window, params); |
727 } | 739 } |
OLD | NEW |