| 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 "ash/mus/window_manager.h" | 5 #include "ash/mus/window_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 WmWindowMus::Get(window)->SetBounds(*bounds); | 310 WmWindowMus::Get(window)->SetBounds(*bounds); |
| 311 *bounds = window->bounds(); | 311 *bounds = window->bounds(); |
| 312 return true; | 312 return true; |
| 313 } | 313 } |
| 314 | 314 |
| 315 bool WindowManager::OnWmSetProperty( | 315 bool WindowManager::OnWmSetProperty( |
| 316 ui::Window* window, | 316 ui::Window* window, |
| 317 const std::string& name, | 317 const std::string& name, |
| 318 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 318 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 319 // TODO(sky): constrain this to set of keys we know about, and allowed values. | 319 // TODO(sky): constrain this to set of keys we know about, and allowed values. |
| 320 return name == ui::mojom::WindowManager::kShowState_Property || | 320 return name == ui::mojom::WindowManager::kAppIcon_Property || |
| 321 name == ui::mojom::WindowManager::kShowState_Property || |
| 321 name == ui::mojom::WindowManager::kPreferredSize_Property || | 322 name == ui::mojom::WindowManager::kPreferredSize_Property || |
| 322 name == ui::mojom::WindowManager::kResizeBehavior_Property || | 323 name == ui::mojom::WindowManager::kResizeBehavior_Property || |
| 323 name == ui::mojom::WindowManager::kShelfItemType_Property || | 324 name == ui::mojom::WindowManager::kShelfItemType_Property || |
| 324 name == ui::mojom::WindowManager::kWindowAppIcon_Property || | 325 name == ui::mojom::WindowManager::kWindowIcon_Property || |
| 325 name == ui::mojom::WindowManager::kWindowTitle_Property; | 326 name == ui::mojom::WindowManager::kWindowTitle_Property; |
| 326 } | 327 } |
| 327 | 328 |
| 328 ui::Window* WindowManager::OnWmCreateTopLevelWindow( | 329 ui::Window* WindowManager::OnWmCreateTopLevelWindow( |
| 329 std::map<std::string, std::vector<uint8_t>>* properties) { | 330 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 330 return NewTopLevelWindow(properties); | 331 return NewTopLevelWindow(properties); |
| 331 } | 332 } |
| 332 | 333 |
| 333 void WindowManager::OnWmClientJankinessChanged( | 334 void WindowManager::OnWmClientJankinessChanged( |
| 334 const std::set<ui::Window*>& client_windows, | 335 const std::set<ui::Window*>& client_windows, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 const ui::Event& event) { | 392 const ui::Event& event) { |
| 392 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); | 393 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); |
| 393 if (iter == accelerator_handlers_.end()) | 394 if (iter == accelerator_handlers_.end()) |
| 394 return ui::mojom::EventResult::HANDLED; | 395 return ui::mojom::EventResult::HANDLED; |
| 395 | 396 |
| 396 return iter->second->OnAccelerator(id, event); | 397 return iter->second->OnAccelerator(id, event); |
| 397 } | 398 } |
| 398 | 399 |
| 399 } // namespace mus | 400 } // namespace mus |
| 400 } // namespace ash | 401 } // namespace ash |
| OLD | NEW |