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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 NonClientFrameController::GetPreferredClientAreaInsets(); | 70 NonClientFrameController::GetPreferredClientAreaInsets(); |
71 frame_decoration_values->normal_client_area_insets = client_area_insets; | 71 frame_decoration_values->normal_client_area_insets = client_area_insets; |
72 frame_decoration_values->maximized_client_area_insets = client_area_insets; | 72 frame_decoration_values->maximized_client_area_insets = client_area_insets; |
73 frame_decoration_values->max_title_bar_button_width = | 73 frame_decoration_values->max_title_bar_button_width = |
74 NonClientFrameController::GetMaxTitleBarButtonWidth(); | 74 NonClientFrameController::GetMaxTitleBarButtonWidth(); |
75 window_manager_client_->SetFrameDecorationValues( | 75 window_manager_client_->SetFrameDecorationValues( |
76 std::move(frame_decoration_values)); | 76 std::move(frame_decoration_values)); |
77 | 77 |
78 shell_.reset(new WmShellMus(base::MakeUnique<ShellDelegateMus>(connector_), | 78 shell_.reset(new WmShellMus(base::MakeUnique<ShellDelegateMus>(connector_), |
79 this, pointer_watcher_event_router_.get())); | 79 this, pointer_watcher_event_router_.get())); |
80 shell_->Initialize(blocking_pool); | 80 shell_->Initialize(blocking_pool, connector_); |
81 lookup_.reset(new WmLookupMus); | 81 lookup_.reset(new WmLookupMus); |
82 } | 82 } |
83 | 83 |
84 void WindowManager::SetScreenLocked(bool is_locked) { | 84 void WindowManager::SetScreenLocked(bool is_locked) { |
85 // TODO: screen locked state needs to be persisted for newly added displays. | 85 // TODO: screen locked state needs to be persisted for newly added displays. |
86 for (auto& root_window_controller : root_window_controllers_) { | 86 for (auto& root_window_controller : root_window_controllers_) { |
87 WmWindowMus* non_lock_screen_containers_container = | 87 WmWindowMus* non_lock_screen_containers_container = |
88 root_window_controller->GetWindowByShellWindowId( | 88 root_window_controller->GetWindowByShellWindowId( |
89 kShellWindowId_NonLockScreenContainersContainer); | 89 kShellWindowId_NonLockScreenContainersContainer); |
90 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); | 90 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 const ui::Event& event) { | 328 const ui::Event& event) { |
329 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); | 329 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); |
330 if (iter == accelerator_handlers_.end()) | 330 if (iter == accelerator_handlers_.end()) |
331 return ui::mojom::EventResult::HANDLED; | 331 return ui::mojom::EventResult::HANDLED; |
332 | 332 |
333 return iter->second->OnAccelerator(id, event); | 333 return iter->second->OnAccelerator(id, event); |
334 } | 334 } |
335 | 335 |
336 } // namespace mus | 336 } // namespace mus |
337 } // namespace ash | 337 } // namespace ash |
OLD | NEW |