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

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

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Clean up include and modify comment. Created 3 years, 9 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/window_manager.h ('k') | ash/root_window_controller_unittest.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
11 #include "ash/common/session/session_controller.h" 11 #include "ash/common/session/session_controller.h"
12 #include "ash/common/wm/container_finder.h" 12 #include "ash/common/wm/container_finder.h"
13 #include "ash/common/wm/window_state.h" 13 #include "ash/common/wm/window_state.h"
14 #include "ash/common/wm_window.h" 14 #include "ash/common/wm_window.h"
15 #include "ash/mus/accelerators/accelerator_handler.h" 15 #include "ash/mus/accelerators/accelerator_handler.h"
16 #include "ash/mus/accelerators/accelerator_ids.h" 16 #include "ash/mus/accelerators/accelerator_ids.h"
17 #include "ash/mus/bridge/wm_lookup_mus.h"
18 #include "ash/mus/bridge/wm_shell_mus.h" 17 #include "ash/mus/bridge/wm_shell_mus.h"
19 #include "ash/mus/move_event_handler.h" 18 #include "ash/mus/move_event_handler.h"
20 #include "ash/mus/non_client_frame_controller.h" 19 #include "ash/mus/non_client_frame_controller.h"
21 #include "ash/mus/property_util.h" 20 #include "ash/mus/property_util.h"
22 #include "ash/mus/screen_mus.h" 21 #include "ash/mus/screen_mus.h"
23 #include "ash/mus/shell_delegate_mus.h" 22 #include "ash/mus/shell_delegate_mus.h"
24 #include "ash/mus/top_level_window_factory.h" 23 #include "ash/mus/top_level_window_factory.h"
25 #include "ash/mus/window_properties.h" 24 #include "ash/mus/window_properties.h"
26 #include "ash/public/cpp/shelf_types.h" 25 #include "ash/public/cpp/shelf_types.h"
27 #include "ash/public/cpp/shell_window_ids.h" 26 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ui::mojom::FrameDecorationValues::New(); 112 ui::mojom::FrameDecorationValues::New();
114 const gfx::Insets client_area_insets = 113 const gfx::Insets client_area_insets =
115 NonClientFrameController::GetPreferredClientAreaInsets(); 114 NonClientFrameController::GetPreferredClientAreaInsets();
116 frame_decoration_values->normal_client_area_insets = client_area_insets; 115 frame_decoration_values->normal_client_area_insets = client_area_insets;
117 frame_decoration_values->maximized_client_area_insets = client_area_insets; 116 frame_decoration_values->maximized_client_area_insets = client_area_insets;
118 frame_decoration_values->max_title_bar_button_width = 117 frame_decoration_values->max_title_bar_button_width =
119 NonClientFrameController::GetMaxTitleBarButtonWidth(); 118 NonClientFrameController::GetMaxTitleBarButtonWidth();
120 window_manager_client_->SetFrameDecorationValues( 119 window_manager_client_->SetFrameDecorationValues(
121 std::move(frame_decoration_values)); 120 std::move(frame_decoration_values));
122 121
123 lookup_.reset(new WmLookupMus);
124
125 // Notify PointerWatcherEventRouter and CaptureSynchronizer that the capture 122 // Notify PointerWatcherEventRouter and CaptureSynchronizer that the capture
126 // client has been set. 123 // client has been set.
127 aura::client::CaptureClient* capture_client = wm_state_->capture_controller(); 124 aura::client::CaptureClient* capture_client = wm_state_->capture_controller();
128 pointer_watcher_event_router_->AttachToCaptureClient(capture_client); 125 pointer_watcher_event_router_->AttachToCaptureClient(capture_client);
129 window_tree_client_->capture_synchronizer()->AttachToCaptureClient( 126 window_tree_client_->capture_synchronizer()->AttachToCaptureClient(
130 capture_client); 127 capture_client);
131 } 128 }
132 129
133 void WindowManager::DeleteAllRootWindowControllers() { 130 void WindowManager::DeleteAllRootWindowControllers() {
134 // Primary RootWindowController must be destroyed last. 131 // Primary RootWindowController must be destroyed last.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if (!window_tree_client_) 250 if (!window_tree_client_)
254 return; 251 return;
255 252
256 aura::client::CaptureClient* capture_client = wm_state_->capture_controller(); 253 aura::client::CaptureClient* capture_client = wm_state_->capture_controller();
257 pointer_watcher_event_router_->DetachFromCaptureClient(capture_client); 254 pointer_watcher_event_router_->DetachFromCaptureClient(capture_client);
258 window_tree_client_->capture_synchronizer()->DetachFromCaptureClient( 255 window_tree_client_->capture_synchronizer()->DetachFromCaptureClient(
259 capture_client); 256 capture_client);
260 257
261 Shell::DeleteInstance(); 258 Shell::DeleteInstance();
262 259
263 lookup_.reset();
264
265 pointer_watcher_event_router_.reset(); 260 pointer_watcher_event_router_.reset();
266 261
267 window_tree_client_.reset(); 262 window_tree_client_.reset();
268 window_manager_client_ = nullptr; 263 window_manager_client_ = nullptr;
269 } 264 }
270 265
271 RootWindowController* WindowManager::GetPrimaryRootWindowController() { 266 RootWindowController* WindowManager::GetPrimaryRootWindowController() {
272 return RootWindowController::ForWindow(WmShell::Get() 267 return RootWindowController::ForWindow(WmShell::Get()
273 ->GetPrimaryRootWindowController() 268 ->GetPrimaryRootWindowController()
274 ->GetWindow() 269 ->GetWindow()
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 bool WindowManager::IsWindowActive(aura::Window* window) { 455 bool WindowManager::IsWindowActive(aura::Window* window) {
461 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; 456 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window;
462 } 457 }
463 458
464 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 459 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
465 Shell::GetInstance()->activation_client()->DeactivateWindow(window); 460 Shell::GetInstance()->activation_client()->DeactivateWindow(window);
466 } 461 }
467 462
468 } // namespace mus 463 } // namespace mus
469 } // namespace ash 464 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698