Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/bridge/wm_window_mus.h" | 5 #include "ash/mus/bridge/wm_window_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_item_types.h" | 7 #include "ash/common/shelf/shelf_item_types.h" |
| 8 #include "ash/common/wm/container_finder.h" | 8 #include "ash/common/wm/container_finder.h" |
| 9 #include "ash/common/wm/window_positioning_utils.h" | 9 #include "ash/common/wm/window_positioning_utils.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 case WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY: | 129 case WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY: |
| 130 return snap_children_to_pixel_boundary_; | 130 return snap_children_to_pixel_boundary_; |
| 131 | 131 |
| 132 default: | 132 default: |
| 133 break; | 133 break; |
| 134 } | 134 } |
| 135 | 135 |
| 136 return WmWindowAura::GetBoolProperty(key); | 136 return WmWindowAura::GetBoolProperty(key); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void WmWindowMus::SetBoolProperty(WmWindowProperty key, bool value) { | |
|
sky
2016/12/08 00:38:54
Do we really need the override? Can't we use the i
msw
2016/12/08 20:31:36
Would that work? I'm not sure it matters; isn't th
sky
2016/12/08 20:52:42
It should work, because the property is registered
msw
2016/12/08 21:00:21
I guess I'm not sure what you have in mind here, I
msw
2016/12/08 21:18:19
Done. Thanks for explaining offline that WmWindowM
| |
| 140 NOTIMPLEMENTED(); | |
| 141 } | |
| 142 | |
| 139 int WmWindowMus::GetIntProperty(WmWindowProperty key) { | 143 int WmWindowMus::GetIntProperty(WmWindowProperty key) { |
| 140 if (key == WmWindowProperty::SHELF_ITEM_TYPE) { | 144 if (key == WmWindowProperty::SHELF_ITEM_TYPE) { |
| 141 if (aura_window()->GetProperty(kShelfItemTypeKey) != TYPE_UNDEFINED) | 145 if (aura_window()->GetProperty(kShelfItemTypeKey) != TYPE_UNDEFINED) |
| 142 return aura_window()->GetProperty(kShelfItemTypeKey); | 146 return aura_window()->GetProperty(kShelfItemTypeKey); |
| 143 | 147 |
| 144 // Mash provides a default shelf item type for non-ignored windows. | 148 // Mash provides a default shelf item type for non-ignored windows. |
| 145 return GetWindowState()->ignored_by_shelf() ? TYPE_UNDEFINED : TYPE_APP; | 149 return GetWindowState()->ignored_by_shelf() ? TYPE_UNDEFINED : TYPE_APP; |
| 146 } | 150 } |
| 147 | 151 |
| 148 return WmWindowAura::GetIntProperty(key); | 152 return WmWindowAura::GetIntProperty(key); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 } | 269 } |
| 266 | 270 |
| 267 void WmWindowMus::AddLimitedPreTargetHandler(ui::EventHandler* handler) { | 271 void WmWindowMus::AddLimitedPreTargetHandler(ui::EventHandler* handler) { |
| 268 DCHECK(WmShellMus::Get()->window_tree_client()->WasCreatedByThisClient( | 272 DCHECK(WmShellMus::Get()->window_tree_client()->WasCreatedByThisClient( |
| 269 aura::WindowMus::Get(aura_window()))); | 273 aura::WindowMus::Get(aura_window()))); |
| 270 WmWindowAura::AddLimitedPreTargetHandler(handler); | 274 WmWindowAura::AddLimitedPreTargetHandler(handler); |
| 271 } | 275 } |
| 272 | 276 |
| 273 } // namespace mus | 277 } // namespace mus |
| 274 } // namespace ash | 278 } // namespace ash |
| OLD | NEW |