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 20 matching lines...) Expand all Loading... |
31 #include "ash/shell_init_params.h" | 31 #include "ash/shell_init_params.h" |
32 #include "ash/wm/ash_focus_rules.h" | 32 #include "ash/wm/ash_focus_rules.h" |
33 #include "base/memory/ptr_util.h" | 33 #include "base/memory/ptr_util.h" |
34 #include "base/threading/sequenced_worker_pool.h" | 34 #include "base/threading/sequenced_worker_pool.h" |
35 #include "services/service_manager/public/cpp/connector.h" | 35 #include "services/service_manager/public/cpp/connector.h" |
36 #include "services/ui/common/accelerator_util.h" | 36 #include "services/ui/common/accelerator_util.h" |
37 #include "services/ui/common/types.h" | 37 #include "services/ui/common/types.h" |
38 #include "services/ui/public/cpp/property_type_converters.h" | 38 #include "services/ui/public/cpp/property_type_converters.h" |
39 #include "services/ui/public/interfaces/constants.mojom.h" | 39 #include "services/ui/public/interfaces/constants.mojom.h" |
40 #include "services/ui/public/interfaces/window_manager.mojom.h" | 40 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 41 #include "ui/aura/client/aura_constants.h" |
41 #include "ui/aura/client/window_parenting_client.h" | 42 #include "ui/aura/client/window_parenting_client.h" |
42 #include "ui/aura/env.h" | 43 #include "ui/aura/env.h" |
43 #include "ui/aura/mus/capture_synchronizer.h" | 44 #include "ui/aura/mus/capture_synchronizer.h" |
44 #include "ui/aura/mus/property_converter.h" | 45 #include "ui/aura/mus/property_converter.h" |
45 #include "ui/aura/mus/window_tree_client.h" | 46 #include "ui/aura/mus/window_tree_client.h" |
46 #include "ui/aura/mus/window_tree_host_mus.h" | 47 #include "ui/aura/mus/window_tree_host_mus.h" |
47 #include "ui/aura/window.h" | 48 #include "ui/aura/window.h" |
48 #include "ui/base/class_property.h" | 49 #include "ui/base/class_property.h" |
49 #include "ui/base/hit_test.h" | 50 #include "ui/base/hit_test.h" |
50 #include "ui/display/display_observer.h" | 51 #include "ui/display/display_observer.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 bool WindowManager::OnWmSetProperty( | 315 bool WindowManager::OnWmSetProperty( |
315 aura::Window* window, | 316 aura::Window* window, |
316 const std::string& name, | 317 const std::string& name, |
317 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 318 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
318 if (property_converter_->IsTransportNameRegistered(name)) | 319 if (property_converter_->IsTransportNameRegistered(name)) |
319 return true; | 320 return true; |
320 DVLOG(1) << "unknown property changed, ignoring " << name; | 321 DVLOG(1) << "unknown property changed, ignoring " << name; |
321 return false; | 322 return false; |
322 } | 323 } |
323 | 324 |
| 325 bool WindowManager::OnWmSetModalType(aura::Window* window, ui::ModalType type) { |
| 326 window->SetProperty(aura::client::kModalKey, type); |
| 327 return true; |
| 328 } |
| 329 |
324 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) { | 330 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) { |
325 NonClientFrameController* non_client_frame_controller = | 331 NonClientFrameController* non_client_frame_controller = |
326 NonClientFrameController::Get(window); | 332 NonClientFrameController::Get(window); |
327 if (non_client_frame_controller) | 333 if (non_client_frame_controller) |
328 non_client_frame_controller->set_can_activate(can_focus); | 334 non_client_frame_controller->set_can_activate(can_focus); |
329 } | 335 } |
330 | 336 |
331 aura::Window* WindowManager::OnWmCreateTopLevelWindow( | 337 aura::Window* WindowManager::OnWmCreateTopLevelWindow( |
332 ui::mojom::WindowType window_type, | 338 ui::mojom::WindowType window_type, |
333 std::map<std::string, std::vector<uint8_t>>* properties) { | 339 std::map<std::string, std::vector<uint8_t>>* properties) { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 bool WindowManager::IsWindowActive(aura::Window* window) { | 461 bool WindowManager::IsWindowActive(aura::Window* window) { |
456 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; | 462 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; |
457 } | 463 } |
458 | 464 |
459 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { | 465 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { |
460 Shell::GetInstance()->activation_client()->DeactivateWindow(window); | 466 Shell::GetInstance()->activation_client()->DeactivateWindow(window); |
461 } | 467 } |
462 | 468 |
463 } // namespace mus | 469 } // namespace mus |
464 } // namespace ash | 470 } // namespace ash |
OLD | NEW |