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

Side by Side Diff: ash/aura/wm_shell_aura.cc

Issue 2787363002: Moves couple of WmShell methods to standalone functions (Closed)
Patch Set: feedback and fix applist Created 3 years, 8 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/aura/wm_shell_aura.h ('k') | ash/common/accelerators/accelerator_commands.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/aura/wm_shell_aura.h" 5 #include "ash/aura/wm_shell_aura.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 9 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
10 #include "ash/aura/key_event_watcher_aura.h" 10 #include "ash/aura/key_event_watcher_aura.h"
(...skipping 17 matching lines...) Expand all
28 #include "ash/shared/immersive_fullscreen_controller.h" 28 #include "ash/shared/immersive_fullscreen_controller.h"
29 #include "ash/shell.h" 29 #include "ash/shell.h"
30 #include "ash/touch/touch_uma.h" 30 #include "ash/touch/touch_uma.h"
31 #include "ash/virtual_keyboard_controller.h" 31 #include "ash/virtual_keyboard_controller.h"
32 #include "ash/wm/drag_window_resizer.h" 32 #include "ash/wm/drag_window_resizer.h"
33 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" 33 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h"
34 #include "ash/wm/window_cycle_event_filter_aura.h" 34 #include "ash/wm/window_cycle_event_filter_aura.h"
35 #include "ash/wm/window_util.h" 35 #include "ash/wm/window_util.h"
36 #include "ash/wm/workspace/workspace_event_handler_aura.h" 36 #include "ash/wm/workspace/workspace_event_handler_aura.h"
37 #include "base/memory/ptr_util.h" 37 #include "base/memory/ptr_util.h"
38 #include "ui/aura/client/capture_client.h"
39 #include "ui/aura/client/focus_client.h"
40 #include "ui/aura/env.h" 38 #include "ui/aura/env.h"
41 #include "ui/display/manager/display_manager.h" 39 #include "ui/display/manager/display_manager.h"
42 40
43 #if defined(USE_X11) 41 #if defined(USE_X11)
44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" 42 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h"
45 #endif 43 #endif
46 44
47 #if defined(USE_OZONE) 45 #if defined(USE_OZONE)
48 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone. h" 46 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone. h"
49 #endif 47 #endif
(...skipping 22 matching lines...) Expand all
72 } 70 }
73 71
74 bool WmShellAura::IsRunningInMash() const { 72 bool WmShellAura::IsRunningInMash() const {
75 return false; 73 return false;
76 } 74 }
77 75
78 Config WmShellAura::GetConfig() const { 76 Config WmShellAura::GetConfig() const {
79 return Config::CLASSIC; 77 return Config::CLASSIC;
80 } 78 }
81 79
82 WmWindow* WmShellAura::GetFocusedWindow() {
83 return WmWindow::Get(
84 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow())
85 ->GetFocusedWindow());
86 }
87
88 WmWindow* WmShellAura::GetActiveWindow() {
89 return WmWindow::Get(wm::GetActiveWindow());
90 }
91
92 WmWindow* WmShellAura::GetCaptureWindow() {
93 // Ash shares capture client among all RootWindowControllers, so we need only
94 // check the primary root.
95 return WmWindow::Get(
96 aura::client::GetCaptureWindow(Shell::GetPrimaryRootWindow()));
97 }
98
99 WmWindow* WmShellAura::GetPrimaryRootWindow() { 80 WmWindow* WmShellAura::GetPrimaryRootWindow() {
100 return WmWindow::Get( 81 return WmWindow::Get(
101 Shell::GetInstance()->window_tree_host_manager()->GetPrimaryRootWindow()); 82 Shell::GetInstance()->window_tree_host_manager()->GetPrimaryRootWindow());
102 } 83 }
103 84
104 WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) { 85 WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) {
105 return WmWindow::Get(Shell::GetInstance() 86 return WmWindow::Get(Shell::GetInstance()
106 ->window_tree_host_manager() 87 ->window_tree_host_manager()
107 ->GetRootWindowForDisplayId(display_id)); 88 ->GetRootWindowForDisplayId(display_id));
108 } 89 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 for (auto& observer : display_observers_) 271 for (auto& observer : display_observers_)
291 observer.OnDisplayConfigurationChanging(); 272 observer.OnDisplayConfigurationChanging();
292 } 273 }
293 274
294 void WmShellAura::OnDisplayConfigurationChanged() { 275 void WmShellAura::OnDisplayConfigurationChanged() {
295 for (auto& observer : display_observers_) 276 for (auto& observer : display_observers_)
296 observer.OnDisplayConfigurationChanged(); 277 observer.OnDisplayConfigurationChanged();
297 } 278 }
298 279
299 } // namespace ash 280 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/accelerators/accelerator_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698