| 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 "apps/app_shim/extension_app_shim_handler_mac.h" | 7 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 [[window() standardWindowButton:NSWindowZoomButton] | 980 [[window() standardWindowButton:NSWindowZoomButton] |
| 981 setEnabled:shows_fullscreen_controls_]; | 981 setEnabled:shows_fullscreen_controls_]; |
| 982 } | 982 } |
| 983 } | 983 } |
| 984 | 984 |
| 985 void NativeAppWindowCocoa::SetAlwaysOnTop(bool always_on_top) { | 985 void NativeAppWindowCocoa::SetAlwaysOnTop(bool always_on_top) { |
| 986 [window() setLevel:(always_on_top ? AlwaysOnTopWindowLevel() : | 986 [window() setLevel:(always_on_top ? AlwaysOnTopWindowLevel() : |
| 987 NSNormalWindowLevel)]; | 987 NSNormalWindowLevel)]; |
| 988 } | 988 } |
| 989 | 989 |
| 990 void NativeAppWindowCocoa::SetInterceptAllKeys(bool want_all_key) { |
| 991 // TODO(sriramsr): implement |
| 992 NOTIMPLEMENTED(); |
| 993 } |
| 994 |
| 990 NativeAppWindowCocoa::~NativeAppWindowCocoa() { | 995 NativeAppWindowCocoa::~NativeAppWindowCocoa() { |
| 991 } | 996 } |
| 992 | 997 |
| 993 ShellNSWindow* NativeAppWindowCocoa::window() const { | 998 ShellNSWindow* NativeAppWindowCocoa::window() const { |
| 994 NSWindow* window = [window_controller_ window]; | 999 NSWindow* window = [window_controller_ window]; |
| 995 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); | 1000 CHECK(!window || [window isKindOfClass:[ShellNSWindow class]]); |
| 996 return static_cast<ShellNSWindow*>(window); | 1001 return static_cast<ShellNSWindow*>(window); |
| 997 } | 1002 } |
| 998 | 1003 |
| 999 content::WebContents* NativeAppWindowCocoa::WebContents() const { | 1004 content::WebContents* NativeAppWindowCocoa::WebContents() const { |
| 1000 return app_window_->web_contents(); | 1005 return app_window_->web_contents(); |
| 1001 } | 1006 } |
| 1002 | 1007 |
| 1003 void NativeAppWindowCocoa::UpdateRestoredBounds() { | 1008 void NativeAppWindowCocoa::UpdateRestoredBounds() { |
| 1004 if (IsRestored(*this)) | 1009 if (IsRestored(*this)) |
| 1005 restored_bounds_ = [window() frame]; | 1010 restored_bounds_ = [window() frame]; |
| 1006 } | 1011 } |
| 1007 | 1012 |
| 1008 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { | 1013 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { |
| 1009 [window() orderOut:window_controller_]; | 1014 [window() orderOut:window_controller_]; |
| 1010 } | 1015 } |
| OLD | NEW |