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

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

Issue 2381753002: Use mojo SystemTray interfaces for both mash and classic ash (Closed)
Patch Set: cleanup Created 4 years, 2 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
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698