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

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

Issue 2690363002: chromeos: removes mash shadows (Closed)
Patch Set: merge Created 3 years, 10 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') | no next file » | 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" 17 #include "ash/mus/bridge/wm_lookup_mus.h"
18 #include "ash/mus/bridge/wm_shell_mus.h" 18 #include "ash/mus/bridge/wm_shell_mus.h"
19 #include "ash/mus/move_event_handler.h" 19 #include "ash/mus/move_event_handler.h"
20 #include "ash/mus/non_client_frame_controller.h" 20 #include "ash/mus/non_client_frame_controller.h"
21 #include "ash/mus/property_util.h" 21 #include "ash/mus/property_util.h"
22 #include "ash/mus/screen_mus.h" 22 #include "ash/mus/screen_mus.h"
23 #include "ash/mus/shadow_controller.h"
24 #include "ash/mus/shell_delegate_mus.h" 23 #include "ash/mus/shell_delegate_mus.h"
25 #include "ash/mus/top_level_window_factory.h" 24 #include "ash/mus/top_level_window_factory.h"
26 #include "ash/mus/window_properties.h" 25 #include "ash/mus/window_properties.h"
27 #include "ash/public/cpp/shell_window_ids.h" 26 #include "ash/public/cpp/shell_window_ids.h"
28 #include "ash/public/cpp/window_properties.h" 27 #include "ash/public/cpp/window_properties.h"
29 #include "ash/root_window_controller.h" 28 #include "ash/root_window_controller.h"
30 #include "ash/root_window_settings.h" 29 #include "ash/root_window_settings.h"
31 #include "ash/shell.h" 30 #include "ash/shell.h"
32 #include "ash/shell_init_params.h" 31 #include "ash/shell_init_params.h"
33 #include "ash/wm/ash_focus_rules.h" 32 #include "ash/wm/ash_focus_rules.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (connector_) 92 if (connector_)
94 connector_->BindInterface(ui::mojom::kServiceName, &display_controller_); 93 connector_->BindInterface(ui::mojom::kServiceName, &display_controller_);
95 94
96 screen_ = base::MakeUnique<ScreenMus>(display_controller_.get()); 95 screen_ = base::MakeUnique<ScreenMus>(display_controller_.get());
97 display::Screen::SetScreenInstance(screen_.get()); 96 display::Screen::SetScreenInstance(screen_.get());
98 97
99 pointer_watcher_event_router_ = 98 pointer_watcher_event_router_ =
100 base::MakeUnique<views::PointerWatcherEventRouter>( 99 base::MakeUnique<views::PointerWatcherEventRouter>(
101 window_tree_client_.get()); 100 window_tree_client_.get());
102 101
103 shadow_controller_ = base::MakeUnique<ShadowController>();
104
105 ui::mojom::FrameDecorationValuesPtr frame_decoration_values = 102 ui::mojom::FrameDecorationValuesPtr frame_decoration_values =
106 ui::mojom::FrameDecorationValues::New(); 103 ui::mojom::FrameDecorationValues::New();
107 const gfx::Insets client_area_insets = 104 const gfx::Insets client_area_insets =
108 NonClientFrameController::GetPreferredClientAreaInsets(); 105 NonClientFrameController::GetPreferredClientAreaInsets();
109 frame_decoration_values->normal_client_area_insets = client_area_insets; 106 frame_decoration_values->normal_client_area_insets = client_area_insets;
110 frame_decoration_values->maximized_client_area_insets = client_area_insets; 107 frame_decoration_values->maximized_client_area_insets = client_area_insets;
111 frame_decoration_values->max_title_bar_button_width = 108 frame_decoration_values->max_title_bar_button_width =
112 NonClientFrameController::GetMaxTitleBarButtonWidth(); 109 NonClientFrameController::GetMaxTitleBarButtonWidth();
113 window_manager_client_->SetFrameDecorationValues( 110 window_manager_client_->SetFrameDecorationValues(
114 std::move(frame_decoration_values)); 111 std::move(frame_decoration_values));
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return; 243 return;
247 244
248 aura::client::CaptureClient* capture_client = wm_state_->capture_controller(); 245 aura::client::CaptureClient* capture_client = wm_state_->capture_controller();
249 pointer_watcher_event_router_->DetachFromCaptureClient(capture_client); 246 pointer_watcher_event_router_->DetachFromCaptureClient(capture_client);
250 window_tree_client_->capture_synchronizer()->DetachFromCaptureClient( 247 window_tree_client_->capture_synchronizer()->DetachFromCaptureClient(
251 capture_client); 248 capture_client);
252 249
253 Shell::DeleteInstance(); 250 Shell::DeleteInstance();
254 251
255 lookup_.reset(); 252 lookup_.reset();
256 shadow_controller_.reset();
257 253
258 pointer_watcher_event_router_.reset(); 254 pointer_watcher_event_router_.reset();
259 255
260 window_tree_client_.reset(); 256 window_tree_client_.reset();
261 window_manager_client_ = nullptr; 257 window_manager_client_ = nullptr;
262 } 258 }
263 259
264 RootWindowController* WindowManager::GetPrimaryRootWindowController() { 260 RootWindowController* WindowManager::GetPrimaryRootWindowController() {
265 return RootWindowController::ForWindow(WmShell::Get() 261 return RootWindowController::ForWindow(WmShell::Get()
266 ->GetPrimaryRootWindowController() 262 ->GetPrimaryRootWindowController()
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 bool WindowManager::IsWindowActive(aura::Window* window) { 459 bool WindowManager::IsWindowActive(aura::Window* window) {
464 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; 460 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window;
465 } 461 }
466 462
467 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 463 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
468 Shell::GetInstance()->activation_client()->DeactivateWindow(window); 464 Shell::GetInstance()->activation_client()->DeactivateWindow(window);
469 } 465 }
470 466
471 } // namespace mus 467 } // namespace mus
472 } // namespace ash 468 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698