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

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

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 years, 11 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/content/shell_content_state.h » ('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/aura/key_event_watcher_aura.h" 9 #include "ash/aura/key_event_watcher_aura.h"
10 #include "ash/aura/pointer_watcher_adapter.h" 10 #include "ash/aura/pointer_watcher_adapter.h"
11 #include "ash/aura/wm_window_aura.h" 11 #include "ash/aura/wm_window_aura.h"
12 #include "ash/common/session/session_state_delegate.h" 12 #include "ash/common/session/session_state_delegate.h"
13 #include "ash/common/shell_delegate.h" 13 #include "ash/common/shell_delegate.h"
14 #include "ash/common/shell_observer.h" 14 #include "ash/common/shell_observer.h"
15 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard .h" 15 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard .h"
16 #include "ash/common/wm/mru_window_tracker.h" 16 #include "ash/common/wm/mru_window_tracker.h"
17 #include "ash/common/wm/overview/window_selector_controller.h" 17 #include "ash/common/wm/overview/window_selector_controller.h"
18 #include "ash/common/wm_activation_observer.h" 18 #include "ash/common/wm_activation_observer.h"
19 #include "ash/common/wm_display_observer.h" 19 #include "ash/common/wm_display_observer.h"
20 #include "ash/display/window_tree_host_manager.h" 20 #include "ash/display/window_tree_host_manager.h"
21 #include "ash/laser/laser_pointer_controller.h" 21 #include "ash/laser/laser_pointer_controller.h"
22 #include "ash/metrics/task_switch_metrics_recorder.h" 22 #include "ash/metrics/task_switch_metrics_recorder.h"
23 #include "ash/shared/immersive_fullscreen_controller.h" 23 #include "ash/shared/immersive_fullscreen_controller.h"
24 #include "ash/shell.h" 24 #include "ash/shell.h"
25 #include "ash/touch/touch_uma.h" 25 #include "ash/touch/touch_uma.h"
26 #include "ash/virtual_keyboard_controller.h"
26 #include "ash/wm/drag_window_resizer.h" 27 #include "ash/wm/drag_window_resizer.h"
27 #include "ash/wm/lock_state_controller.h" 28 #include "ash/wm/lock_state_controller.h"
28 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" 29 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h"
29 #include "ash/wm/screen_pinning_controller.h" 30 #include "ash/wm/screen_pinning_controller.h"
30 #include "ash/wm/window_cycle_event_filter_aura.h" 31 #include "ash/wm/window_cycle_event_filter_aura.h"
31 #include "ash/wm/window_util.h" 32 #include "ash/wm/window_util.h"
32 #include "ash/wm/workspace/workspace_event_handler_aura.h" 33 #include "ash/wm/workspace/workspace_event_handler_aura.h"
33 #include "base/memory/ptr_util.h" 34 #include "base/memory/ptr_util.h"
34 #include "ui/aura/client/capture_client.h" 35 #include "ui/aura/client/capture_client.h"
35 #include "ui/aura/client/focus_client.h" 36 #include "ui/aura/client/focus_client.h"
36 #include "ui/aura/env.h" 37 #include "ui/aura/env.h"
37 #include "ui/display/manager/display_manager.h" 38 #include "ui/display/manager/display_manager.h"
38 #include "ui/wm/public/activation_client.h" 39 #include "ui/wm/public/activation_client.h"
39 40
40 #if defined(OS_CHROMEOS)
41 #include "ash/virtual_keyboard_controller.h"
42 #endif
43
44 #if defined(USE_X11) 41 #if defined(USE_X11)
45 #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"
46 #endif 43 #endif
47 44
48 #if defined(USE_OZONE) 45 #if defined(USE_OZONE)
49 #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"
50 #endif 47 #endif
51 48
52 namespace ash { 49 namespace ash {
53 50
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 281 }
285 282
286 void WmShellAura::RequestShutdown() { 283 void WmShellAura::RequestShutdown() {
287 Shell::GetInstance()->lock_state_controller()->RequestShutdown(); 284 Shell::GetInstance()->lock_state_controller()->RequestShutdown();
288 } 285 }
289 286
290 bool WmShellAura::IsTouchDown() { 287 bool WmShellAura::IsTouchDown() {
291 return aura::Env::GetInstance()->is_touch_down(); 288 return aura::Env::GetInstance()->is_touch_down();
292 } 289 }
293 290
294 #if defined(OS_CHROMEOS)
295 void WmShellAura::ToggleIgnoreExternalKeyboard() { 291 void WmShellAura::ToggleIgnoreExternalKeyboard() {
296 Shell::GetInstance() 292 Shell::GetInstance()
297 ->virtual_keyboard_controller() 293 ->virtual_keyboard_controller()
298 ->ToggleIgnoreExternalKeyboard(); 294 ->ToggleIgnoreExternalKeyboard();
299 } 295 }
300 296
301 void WmShellAura::SetLaserPointerEnabled(bool enabled) { 297 void WmShellAura::SetLaserPointerEnabled(bool enabled) {
302 Shell::GetInstance()->laser_pointer_controller()->SetEnabled(enabled); 298 Shell::GetInstance()->laser_pointer_controller()->SetEnabled(enabled);
303 } 299 }
304 #endif
305 300
306 void WmShellAura::OnWindowActivated( 301 void WmShellAura::OnWindowActivated(
307 aura::client::ActivationChangeObserver::ActivationReason reason, 302 aura::client::ActivationChangeObserver::ActivationReason reason,
308 aura::Window* gained_active, 303 aura::Window* gained_active,
309 aura::Window* lost_active) { 304 aura::Window* lost_active) {
310 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active); 305 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active);
311 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active); 306 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active);
312 if (gained_active_wm) 307 if (gained_active_wm)
313 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); 308 set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
314 for (auto& observer : activation_observers_) 309 for (auto& observer : activation_observers_)
(...skipping 21 matching lines...) Expand all
336 for (auto& observer : display_observers_) 331 for (auto& observer : display_observers_)
337 observer.OnDisplayConfigurationChanging(); 332 observer.OnDisplayConfigurationChanging();
338 } 333 }
339 334
340 void WmShellAura::OnDisplayConfigurationChanged() { 335 void WmShellAura::OnDisplayConfigurationChanged() {
341 for (auto& observer : display_observers_) 336 for (auto& observer : display_observers_)
342 observer.OnDisplayConfigurationChanged(); 337 observer.OnDisplayConfigurationChanged();
343 } 338 }
344 339
345 } // namespace ash 340 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/content/shell_content_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698