| 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 } | 861 } |
| 862 | 862 |
| 863 void NativeAppWindowCocoa::SetAlwaysOnTop(bool always_on_top) { | 863 void NativeAppWindowCocoa::SetAlwaysOnTop(bool always_on_top) { |
| 864 gfx::SetNSWindowAlwaysOnTop(window(), always_on_top); | 864 gfx::SetNSWindowAlwaysOnTop(window(), always_on_top); |
| 865 } | 865 } |
| 866 | 866 |
| 867 void NativeAppWindowCocoa::SetVisibleOnAllWorkspaces(bool always_visible) { | 867 void NativeAppWindowCocoa::SetVisibleOnAllWorkspaces(bool always_visible) { |
| 868 gfx::SetNSWindowVisibleOnAllWorkspaces(window(), always_visible); | 868 gfx::SetNSWindowVisibleOnAllWorkspaces(window(), always_visible); |
| 869 } | 869 } |
| 870 | 870 |
| 871 void NativeAppWindowCocoa::SetInterceptAllKeys(bool want_all_key) { | |
| 872 // TODO(sriramsr): implement for OSX (http://crbug.com/166928). | |
| 873 NOTIMPLEMENTED(); | |
| 874 } | |
| 875 | |
| 876 NativeAppWindowCocoa::~NativeAppWindowCocoa() { | 871 NativeAppWindowCocoa::~NativeAppWindowCocoa() { |
| 877 } | 872 } |
| 878 | 873 |
| 879 AppNSWindow* NativeAppWindowCocoa::window() const { | 874 AppNSWindow* NativeAppWindowCocoa::window() const { |
| 880 NSWindow* window = [window_controller_ window]; | 875 NSWindow* window = [window_controller_ window]; |
| 881 CHECK(!window || [window isKindOfClass:[AppNSWindow class]]); | 876 CHECK(!window || [window isKindOfClass:[AppNSWindow class]]); |
| 882 return static_cast<AppNSWindow*>(window); | 877 return static_cast<AppNSWindow*>(window); |
| 883 } | 878 } |
| 884 | 879 |
| 885 content::WebContents* NativeAppWindowCocoa::WebContents() const { | 880 content::WebContents* NativeAppWindowCocoa::WebContents() const { |
| 886 return app_window_->web_contents(); | 881 return app_window_->web_contents(); |
| 887 } | 882 } |
| 888 | 883 |
| 889 void NativeAppWindowCocoa::UpdateRestoredBounds() { | 884 void NativeAppWindowCocoa::UpdateRestoredBounds() { |
| 890 if (IsRestored(*this)) | 885 if (IsRestored(*this)) |
| 891 restored_bounds_ = [window() frame]; | 886 restored_bounds_ = [window() frame]; |
| 892 } | 887 } |
| 893 | 888 |
| 894 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { | 889 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { |
| 895 [window() orderOut:window_controller_]; | 890 [window() orderOut:window_controller_]; |
| 896 } | 891 } |
| OLD | NEW |