OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mash/wm/window_manager.h" | 5 #include "mash/wm/window_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "components/mus/common/types.h" | 10 #include "components/mus/common/types.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 bool WindowManager::OnWmSetProperty( | 147 bool WindowManager::OnWmSetProperty( |
148 mus::Window* window, | 148 mus::Window* window, |
149 const std::string& name, | 149 const std::string& name, |
150 scoped_ptr<std::vector<uint8_t>>* new_data) { | 150 scoped_ptr<std::vector<uint8_t>>* new_data) { |
151 // TODO(sky): constrain this to set of keys we know about, and allowed | 151 // TODO(sky): constrain this to set of keys we know about, and allowed |
152 // values. | 152 // values. |
153 return name == mus::mojom::WindowManager::kShowState_Property || | 153 return name == mus::mojom::WindowManager::kShowState_Property || |
154 name == mus::mojom::WindowManager::kPreferredSize_Property || | 154 name == mus::mojom::WindowManager::kPreferredSize_Property || |
155 name == mus::mojom::WindowManager::kResizeBehavior_Property || | 155 name == mus::mojom::WindowManager::kResizeBehavior_Property || |
| 156 name == mus::mojom::WindowManager::kWindowAppIcon_Property || |
156 name == mus::mojom::WindowManager::kWindowTitle_Property; | 157 name == mus::mojom::WindowManager::kWindowTitle_Property; |
157 } | 158 } |
158 | 159 |
159 mus::Window* WindowManager::OnWmCreateTopLevelWindow( | 160 mus::Window* WindowManager::OnWmCreateTopLevelWindow( |
160 std::map<std::string, std::vector<uint8_t>>* properties) { | 161 std::map<std::string, std::vector<uint8_t>>* properties) { |
161 return NewTopLevelWindow(properties); | 162 return NewTopLevelWindow(properties); |
162 } | 163 } |
163 | 164 |
164 void WindowManager::OnAccelerator(uint32_t id, const ui::Event& event) { | 165 void WindowManager::OnAccelerator(uint32_t id, const ui::Event& event) { |
165 root_controller_->OnAccelerator(id, std::move(event)); | 166 root_controller_->OnAccelerator(id, std::move(event)); |
166 } | 167 } |
167 | 168 |
168 void WindowManager::ScreenlockStateChanged(bool locked) { | 169 void WindowManager::ScreenlockStateChanged(bool locked) { |
169 // Hide USER_PRIVATE windows when the screen is locked. | 170 // Hide USER_PRIVATE windows when the screen is locked. |
170 mus::Window* window = root_controller_->GetWindowForContainer( | 171 mus::Window* window = root_controller_->GetWindowForContainer( |
171 mash::wm::mojom::Container::USER_PRIVATE); | 172 mash::wm::mojom::Container::USER_PRIVATE); |
172 window->SetVisible(!locked); | 173 window->SetVisible(!locked); |
173 } | 174 } |
174 | 175 |
175 } // namespace wm | 176 } // namespace wm |
176 } // namespace mash | 177 } // namespace mash |
OLD | NEW |