Chromium Code Reviews| Index: mash/wm/bridge/wm_window_mus.cc |
| diff --git a/mash/wm/bridge/wm_window_mus.cc b/mash/wm/bridge/wm_window_mus.cc |
| index 7818280d8098ae1c0de6c4d40429889d1655df2d..2e0f85157ecc20e6b2d56bacaf5f80a88655ea99 100644 |
| --- a/mash/wm/bridge/wm_window_mus.cc |
| +++ b/mash/wm/bridge/wm_window_mus.cc |
| @@ -24,6 +24,10 @@ |
| MUS_DECLARE_WINDOW_PROPERTY_TYPE(mash::wm::WmWindowMus*); |
| +// TODO(sky): fully implement this. Making DVLOG as too spammy to be useful. |
| +#undef NOTIMPLEMENTED |
| +#define NOTIMPLEMENTED() DVLOG(1) << "notimplemented" |
| + |
| namespace mash { |
| namespace wm { |
| @@ -250,13 +254,13 @@ bool WmWindowMus::IsSystemModal() const { |
| } |
| bool WmWindowMus::GetBoolProperty(ash::wm::WmWindowProperty key) { |
| - NOTIMPLEMENTED(); |
| switch (key) { |
| case ash::wm::WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUDARY: |
| + NOTIMPLEMENTED(); |
| return true; |
| case ash::wm::WmWindowProperty::ALWAYS_ON_TOP: |
| - return false; |
| + return IsAlwaysOnTop(); |
| default: |
| NOTREACHED(); |
| @@ -268,9 +272,10 @@ bool WmWindowMus::GetBoolProperty(ash::wm::WmWindowProperty key) { |
| } |
| int WmWindowMus::GetIntProperty(ash::wm::WmWindowProperty key) { |
| - NOTIMPLEMENTED(); |
| - if (key == ash::wm::WmWindowProperty::SHELF_ID) |
| + if (key == ash::wm::WmWindowProperty::SHELF_ID) { |
| + NOTIMPLEMENTED(); |
| return 0; |
| + } |
| NOTREACHED(); |
| return 0; |
| @@ -476,14 +481,11 @@ void WmWindowMus::StackChildBelow(WmWindow* child, WmWindow* target) { |
| } |
| void WmWindowMus::SetAlwaysOnTop(bool value) { |
| - // TODO(sky): need to set property on window. |
| - NOTIMPLEMENTED(); |
| + mash::wm::SetAlwaysOnTop(window_, value); |
| } |
| bool WmWindowMus::IsAlwaysOnTop() const { |
| - // TODO(sky): need to set property on window. |
| - NOTIMPLEMENTED(); |
| - return false; |
| + return mash::wm::IsAlwaysOnTop(window_); |
| } |
| void WmWindowMus::Hide() { |
| @@ -583,10 +585,17 @@ void WmWindowMus::OnWindowSharedPropertyChanged( |
| const std::string& name, |
| const std::vector<uint8_t>* old_data, |
| const std::vector<uint8_t>* new_data) { |
| - if (name == mus::mojom::WindowManager::kShowState_Property) |
| + if (name == mus::mojom::WindowManager::kShowState_Property) { |
| GetWindowState()->OnWindowShowStateChanged(); |
| + return; |
| + } else if (name == mus::mojom::WindowManager::kAlwaysOnTop_Property) { |
|
James Cook
2016/05/19 05:08:21
nit: else not needed
sky
2016/05/19 15:14:24
Done.
|
| + FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, |
| + OnWindowPropertyChanged( |
| + this, ash::wm::WmWindowProperty::ALWAYS_ON_TOP, 0u)); |
|
James Cook
2016/05/19 05:08:21
Should this be 0 instead of 0u and/or an old value
sky
2016/05/19 15:14:24
Not sure on that. I went with 0u as the type is in
James Cook
2016/05/19 15:27:46
Huh. intptr_t is signed. But I guess 0 is 0. <shru
|
| + return; |
| + } |
| - // Deal with always on top and snap. |
| + // Deal with snap to pixel. |
| NOTIMPLEMENTED(); |
| } |