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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 frame_decoration_values->maximized_client_area_insets = client_area_insets; | 92 frame_decoration_values->maximized_client_area_insets = client_area_insets; |
93 frame_decoration_values->max_title_bar_button_width = | 93 frame_decoration_values->max_title_bar_button_width = |
94 NonClientFrameController::GetMaxTitleBarButtonWidth(); | 94 NonClientFrameController::GetMaxTitleBarButtonWidth(); |
95 window_manager_client_->SetFrameDecorationValues( | 95 window_manager_client_->SetFrameDecorationValues( |
96 std::move(frame_decoration_values)); | 96 std::move(frame_decoration_values)); |
97 | 97 |
98 std::unique_ptr<ShellDelegate> shell_delegate( | 98 std::unique_ptr<ShellDelegate> shell_delegate( |
99 new ShellDelegateMus(base::MakeUnique<AppListPresenterStub>())); | 99 new ShellDelegateMus(base::MakeUnique<AppListPresenterStub>())); |
100 shell_.reset(new WmShellMus(std::move(shell_delegate), window_tree_client_, | 100 shell_.reset(new WmShellMus(std::move(shell_delegate), window_tree_client_, |
101 connector_)); | 101 connector_)); |
| 102 shell_->Initialize(); |
102 lookup_.reset(new WmLookupMus); | 103 lookup_.reset(new WmLookupMus); |
103 } | 104 } |
104 | 105 |
105 void WindowManager::SetScreenLocked(bool is_locked) { | 106 void WindowManager::SetScreenLocked(bool is_locked) { |
106 // TODO: screen locked state needs to be persisted for newly added displays. | 107 // TODO: screen locked state needs to be persisted for newly added displays. |
107 for (auto& root_window_controller : root_window_controllers_) { | 108 for (auto& root_window_controller : root_window_controllers_) { |
108 WmWindowMus* non_lock_screen_containers_container = | 109 WmWindowMus* non_lock_screen_containers_container = |
109 root_window_controller->GetWindowByShellWindowId( | 110 root_window_controller->GetWindowByShellWindowId( |
110 kShellWindowId_NonLockScreenContainersContainer); | 111 kShellWindowId_NonLockScreenContainersContainer); |
111 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); | 112 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, | 297 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, |
297 OnAccelerator(id, event)); | 298 OnAccelerator(id, event)); |
298 break; | 299 break; |
299 } | 300 } |
300 | 301 |
301 return ui::mojom::EventResult::HANDLED; | 302 return ui::mojom::EventResult::HANDLED; |
302 } | 303 } |
303 | 304 |
304 } // namespace mus | 305 } // namespace mus |
305 } // namespace ash | 306 } // namespace ash |
OLD | NEW |