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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_controller.h

Issue 2895713002: [mus+ash] Removes WmWindow from ash/wm/mru_window_tracker and overview mode (Closed)
Patch Set: Address nits, unit_tests target compiles Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/public/interfaces/touch_view.mojom.h" 11 #include "ash/public/interfaces/touch_view.mojom.h"
12 #include "ash/session/session_observer.h" 12 #include "ash/session/session_observer.h"
13 #include "ash/shell_observer.h" 13 #include "ash/shell_observer.h"
14 #include "ash/wm_display_observer.h" 14 #include "ash/wm_display_observer.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "chromeos/accelerometer/accelerometer_reader.h" 19 #include "chromeos/accelerometer/accelerometer_reader.h"
20 #include "chromeos/accelerometer/accelerometer_types.h" 20 #include "chromeos/accelerometer/accelerometer_types.h"
21 #include "chromeos/dbus/power_manager_client.h" 21 #include "chromeos/dbus/power_manager_client.h"
22 #include "mojo/public/cpp/bindings/binding_set.h" 22 #include "mojo/public/cpp/bindings/binding_set.h"
23 #include "mojo/public/cpp/bindings/interface_ptr_set.h" 23 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
24 #include "ui/gfx/geometry/vector3d_f.h" 24 #include "ui/gfx/geometry/vector3d_f.h"
25 25
26 namespace aura {
27 class Window;
28 }
29
26 namespace base { 30 namespace base {
27 class TickClock; 31 class TickClock;
28 } 32 }
29 33
30 namespace gfx { 34 namespace gfx {
31 class Vector3dF; 35 class Vector3dF;
32 } 36 }
33 37
34 namespace ash { 38 namespace ash {
35 39
36 class MaximizeModeControllerTest; 40 class MaximizeModeControllerTest;
37 class ScopedDisableInternalMouseAndKeyboard; 41 class ScopedDisableInternalMouseAndKeyboard;
38 class MaximizeModeWindowManager; 42 class MaximizeModeWindowManager;
39 class MaximizeModeWindowManagerTest; 43 class MaximizeModeWindowManagerTest;
40 class WmWindow; 44
41 namespace test { 45 namespace test {
42 class MultiUserWindowManagerChromeOSTest; 46 class MultiUserWindowManagerChromeOSTest;
43 class VirtualKeyboardControllerTest; 47 class VirtualKeyboardControllerTest;
44 } 48 }
45 49
46 // MaximizeModeController listens to accelerometer events and automatically 50 // MaximizeModeController listens to accelerometer events and automatically
47 // enters and exits maximize mode when the lid is opened beyond the triggering 51 // enters and exits maximize mode when the lid is opened beyond the triggering
48 // angle and rotates the display to match the device when in maximize mode. 52 // angle and rotates the display to match the device when in maximize mode.
49 class ASH_EXPORT MaximizeModeController 53 class ASH_EXPORT MaximizeModeController
50 : public chromeos::AccelerometerReader::Observer, 54 : public chromeos::AccelerometerReader::Observer,
(...skipping 26 matching lines...) Expand all
77 // Turn the always maximize mode window manager on or off. 81 // Turn the always maximize mode window manager on or off.
78 void EnableMaximizeModeWindowManager(bool should_enable); 82 void EnableMaximizeModeWindowManager(bool should_enable);
79 83
80 // Test if the MaximizeModeWindowManager is enabled or not. 84 // Test if the MaximizeModeWindowManager is enabled or not.
81 bool IsMaximizeModeWindowManagerEnabled() const; 85 bool IsMaximizeModeWindowManagerEnabled() const;
82 86
83 // Add a special window to the MaximizeModeWindowManager for tracking. This is 87 // Add a special window to the MaximizeModeWindowManager for tracking. This is
84 // only required for special windows which are handled by other window 88 // only required for special windows which are handled by other window
85 // managers like the |MultiUserWindowManager|. 89 // managers like the |MultiUserWindowManager|.
86 // If the maximize mode is not enabled no action will be performed. 90 // If the maximize mode is not enabled no action will be performed.
87 void AddWindow(WmWindow* window); 91 void AddWindow(aura::Window* window);
88 92
89 // Binds the mojom::TouchViewManager interface request to this object. 93 // Binds the mojom::TouchViewManager interface request to this object.
90 void BindRequest(mojom::TouchViewManagerRequest request); 94 void BindRequest(mojom::TouchViewManagerRequest request);
91 95
92 // ShellObserver: 96 // ShellObserver:
93 void OnMaximizeModeStarted() override; 97 void OnMaximizeModeStarted() override;
94 void OnMaximizeModeEnded() override; 98 void OnMaximizeModeEnded() override;
95 void OnShellInitialized() override; 99 void OnShellInitialized() override;
96 100
97 // WmDisplayObserver: 101 // WmDisplayObserver:
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 ScopedSessionObserver scoped_session_observer_; 221 ScopedSessionObserver scoped_session_observer_;
218 222
219 base::WeakPtrFactory<MaximizeModeController> weak_factory_; 223 base::WeakPtrFactory<MaximizeModeController> weak_factory_;
220 224
221 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController); 225 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
222 }; 226 };
223 227
224 } // namespace ash 228 } // namespace ash
225 229
226 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ 230 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698