Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: ash/mus/window_manager.cc

Issue 2187703003: Wires up registering accelerators from mash with the wm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 NonClientFrameController::GetPreferredClientAreaInsets(); 88 NonClientFrameController::GetPreferredClientAreaInsets();
89 frame_decoration_values->normal_client_area_insets = client_area_insets; 89 frame_decoration_values->normal_client_area_insets = client_area_insets;
90 frame_decoration_values->maximized_client_area_insets = client_area_insets; 90 frame_decoration_values->maximized_client_area_insets = client_area_insets;
91 frame_decoration_values->max_title_bar_button_width = 91 frame_decoration_values->max_title_bar_button_width =
92 NonClientFrameController::GetMaxTitleBarButtonWidth(); 92 NonClientFrameController::GetMaxTitleBarButtonWidth();
93 window_manager_client_->SetFrameDecorationValues( 93 window_manager_client_->SetFrameDecorationValues(
94 std::move(frame_decoration_values)); 94 std::move(frame_decoration_values));
95 95
96 std::unique_ptr<ShellDelegate> shell_delegate(new ShellDelegateMus( 96 std::unique_ptr<ShellDelegate> shell_delegate(new ShellDelegateMus(
97 base::MakeUnique<AppListPresenterStub>(), connector_)); 97 base::MakeUnique<AppListPresenterStub>(), connector_));
98 shell_.reset(new WmShellMus(std::move(shell_delegate), window_tree_client_)); 98 shell_.reset(new WmShellMus(std::move(shell_delegate), this));
99 shell_->Initialize(); 99 shell_->Initialize();
100 lookup_.reset(new WmLookupMus); 100 lookup_.reset(new WmLookupMus);
101 } 101 }
102 102
103 void WindowManager::SetScreenLocked(bool is_locked) { 103 void WindowManager::SetScreenLocked(bool is_locked) {
104 // TODO: screen locked state needs to be persisted for newly added displays. 104 // TODO: screen locked state needs to be persisted for newly added displays.
105 for (auto& root_window_controller : root_window_controllers_) { 105 for (auto& root_window_controller : root_window_controllers_) {
106 WmWindowMus* non_lock_screen_containers_container = 106 WmWindowMus* non_lock_screen_containers_container =
107 root_window_controller->GetWindowByShellWindowId( 107 root_window_controller->GetWindowByShellWindowId(
108 kShellWindowId_NonLockScreenContainersContainer); 108 kShellWindowId_NonLockScreenContainersContainer);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 const ui::Event& event) { 298 const ui::Event& event) {
299 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); 299 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id));
300 if (iter == accelerator_handlers_.end()) 300 if (iter == accelerator_handlers_.end())
301 return ui::mojom::EventResult::HANDLED; 301 return ui::mojom::EventResult::HANDLED;
302 302
303 return iter->second->OnAccelerator(id, event); 303 return iter->second->OnAccelerator(id, event);
304 } 304 }
305 305
306 } // namespace mus 306 } // namespace mus
307 } // namespace ash 307 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698