Chromium Code Reviews| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 ui::mojom::FrameDecorationValues::New(); | 69 ui::mojom::FrameDecorationValues::New(); |
| 70 const gfx::Insets client_area_insets = | 70 const gfx::Insets client_area_insets = |
| 71 NonClientFrameController::GetPreferredClientAreaInsets(); | 71 NonClientFrameController::GetPreferredClientAreaInsets(); |
| 72 frame_decoration_values->normal_client_area_insets = client_area_insets; | 72 frame_decoration_values->normal_client_area_insets = client_area_insets; |
| 73 frame_decoration_values->maximized_client_area_insets = client_area_insets; | 73 frame_decoration_values->maximized_client_area_insets = client_area_insets; |
| 74 frame_decoration_values->max_title_bar_button_width = | 74 frame_decoration_values->max_title_bar_button_width = |
| 75 NonClientFrameController::GetMaxTitleBarButtonWidth(); | 75 NonClientFrameController::GetMaxTitleBarButtonWidth(); |
| 76 window_manager_client_->SetFrameDecorationValues( | 76 window_manager_client_->SetFrameDecorationValues( |
| 77 std::move(frame_decoration_values)); | 77 std::move(frame_decoration_values)); |
| 78 | 78 |
| 79 shell_.reset(new WmShellMus(base::MakeUnique<ShellDelegateMus>(connector_), | 79 shell_.reset(new WmShellMus(base::MakeUnique<ShellDelegateMus>(connector_), |
|
msw
2016/09/30 23:26:49
q: Would it make sense for the shell delegate to p
| |
| 80 this, pointer_watcher_event_router_.get())); | 80 this, pointer_watcher_event_router_.get())); |
| 81 shell_->Initialize(blocking_pool); | 81 shell_->Initialize(blocking_pool, connector_); |
| 82 lookup_.reset(new WmLookupMus); | 82 lookup_.reset(new WmLookupMus); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void WindowManager::SetScreenLocked(bool is_locked) { | 85 void WindowManager::SetScreenLocked(bool is_locked) { |
| 86 // TODO: screen locked state needs to be persisted for newly added displays. | 86 // TODO: screen locked state needs to be persisted for newly added displays. |
| 87 for (auto& root_window_controller : root_window_controllers_) { | 87 for (auto& root_window_controller : root_window_controllers_) { |
| 88 WmWindowMus* non_lock_screen_containers_container = | 88 WmWindowMus* non_lock_screen_containers_container = |
| 89 root_window_controller->GetWindowByShellWindowId( | 89 root_window_controller->GetWindowByShellWindowId( |
| 90 kShellWindowId_NonLockScreenContainersContainer); | 90 kShellWindowId_NonLockScreenContainersContainer); |
| 91 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); | 91 non_lock_screen_containers_container->mus_window()->SetVisible(!is_locked); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 const ui::Event& event) { | 358 const ui::Event& event) { |
| 359 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); | 359 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); |
| 360 if (iter == accelerator_handlers_.end()) | 360 if (iter == accelerator_handlers_.end()) |
| 361 return ui::mojom::EventResult::HANDLED; | 361 return ui::mojom::EventResult::HANDLED; |
| 362 | 362 |
| 363 return iter->second->OnAccelerator(id, event); | 363 return iter->second->OnAccelerator(id, event); |
| 364 } | 364 } |
| 365 | 365 |
| 366 } // namespace mus | 366 } // namespace mus |
| 367 } // namespace ash | 367 } // namespace ash |
| OLD | NEW |