Chromium Code Reviews| Index: ui/views/widget/native_widget_mac.mm |
| diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm |
| index 10a1c9f7475a336beebc5d09e4fb5849a64a3520..940f17e92a492863ffbde064aedbb5939304a0b1 100644 |
| --- a/ui/views/widget/native_widget_mac.mm |
| +++ b/ui/views/widget/native_widget_mac.mm |
| @@ -12,6 +12,7 @@ |
| #import "ui/base/cocoa/window_size_constants.h" |
| #include "ui/gfx/font_list.h" |
| #import "ui/gfx/mac/coordinate_conversion.h" |
| +#import "ui/gfx/mac/nswindow_frame_controls.h" |
| #include "ui/native_theme/native_theme.h" |
| #import "ui/views/cocoa/bridged_content_view.h" |
| #import "ui/views/cocoa/bridged_native_widget.h" |
| @@ -83,6 +84,8 @@ void NativeWidgetMac::InitNativeWidget(const Widget::InitParams& params) { |
| [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. |
| bridge_->Init(window, params); |
| + SetAlwaysOnTop(params.keep_on_top); |
|
tapted
2015/05/12 04:05:35
I think... only call this when params.keep_on_top
jackhou1
2015/05/12 05:44:19
Done.
|
| + |
| delegate_->OnNativeWidgetCreated(true); |
| bridge_->SetFocusManager(GetWidget()->GetFocusManager()); |
| @@ -377,16 +380,15 @@ bool NativeWidgetMac::IsActive() const { |
| } |
| void NativeWidgetMac::SetAlwaysOnTop(bool always_on_top) { |
| - NOTIMPLEMENTED(); |
| + gfx::SetNSWindowAlwaysOnTop(GetNativeWindow(), always_on_top); |
| } |
| bool NativeWidgetMac::IsAlwaysOnTop() const { |
| - NOTIMPLEMENTED(); |
| - return false; |
| + return gfx::IsNSWindowAlwaysOnTop(GetNativeWindow()); |
| } |
| void NativeWidgetMac::SetVisibleOnAllWorkspaces(bool always_visible) { |
| - NOTIMPLEMENTED(); |
| + gfx::SetNSWindowVisibleOnAllWorkspaces(GetNativeWindow(), always_visible); |
| } |
| void NativeWidgetMac::Maximize() { |