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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const gfx::Insets client_area_insets = | 64 const gfx::Insets client_area_insets = |
65 NonClientFrameController::GetPreferredClientAreaInsets(); | 65 NonClientFrameController::GetPreferredClientAreaInsets(); |
66 frame_decoration_values->normal_client_area_insets = client_area_insets; | 66 frame_decoration_values->normal_client_area_insets = client_area_insets; |
67 frame_decoration_values->maximized_client_area_insets = client_area_insets; | 67 frame_decoration_values->maximized_client_area_insets = client_area_insets; |
68 frame_decoration_values->max_title_bar_button_width = | 68 frame_decoration_values->max_title_bar_button_width = |
69 NonClientFrameController::GetMaxTitleBarButtonWidth(); | 69 NonClientFrameController::GetMaxTitleBarButtonWidth(); |
70 window_manager_client_->SetFrameDecorationValues( | 70 window_manager_client_->SetFrameDecorationValues( |
71 std::move(frame_decoration_values)); | 71 std::move(frame_decoration_values)); |
72 | 72 |
73 // TODO(msw): Provide a valid ShellDelegate here; maybe port ShellDelegateMus? | 73 // TODO(msw): Provide a valid ShellDelegate here; maybe port ShellDelegateMus? |
74 shell_.reset(new WmShellMus(nullptr, window_tree_client_)); | 74 shell_.reset(new WmShellMus(nullptr, window_tree_client_, connector_)); |
75 lookup_.reset(new WmLookupMus); | 75 lookup_.reset(new WmLookupMus); |
76 } | 76 } |
77 | 77 |
78 void WindowManager::SetScreenLocked(bool is_locked) { | 78 void WindowManager::SetScreenLocked(bool is_locked) { |
79 // TODO: screen locked state needs to be persisted for newly added displays. | 79 // TODO: screen locked state needs to be persisted for newly added displays. |
80 for (auto& root_window_controller : root_window_controllers_) { | 80 for (auto& root_window_controller : root_window_controllers_) { |
81 WmWindowMus* non_lock_screen_containers_container = | 81 WmWindowMus* non_lock_screen_containers_container = |
82 root_window_controller->GetWindowByShellWindowId( | 82 root_window_controller->GetWindowByShellWindowId( |
83 kShellWindowId_NonLockScreenContainersContainer); | 83 kShellWindowId_NonLockScreenContainersContainer); |
84 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); | 84 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, | 269 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, |
270 OnAccelerator(id, event)); | 270 OnAccelerator(id, event)); |
271 break; | 271 break; |
272 } | 272 } |
273 | 273 |
274 return ui::mojom::EventResult::HANDLED; | 274 return ui::mojom::EventResult::HANDLED; |
275 } | 275 } |
276 | 276 |
277 } // namespace mus | 277 } // namespace mus |
278 } // namespace ash | 278 } // namespace ash |
OLD | NEW |