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

Side by Side Diff: ash/common/wm_shell.h

Issue 2106823004: Refactors maximize mode event handling into its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 5 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 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 #ifndef ASH_COMMON_WM_SHELL_H_ 5 #ifndef ASH_COMMON_WM_SHELL_H_
6 #define ASH_COMMON_WM_SHELL_H_ 6 #define ASH_COMMON_WM_SHELL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 20 matching lines...) Expand all
31 class ShellObserver; 31 class ShellObserver;
32 class SystemTrayDelegate; 32 class SystemTrayDelegate;
33 class WindowResizer; 33 class WindowResizer;
34 class WindowSelectorController; 34 class WindowSelectorController;
35 class WmActivationObserver; 35 class WmActivationObserver;
36 class WmDisplayObserver; 36 class WmDisplayObserver;
37 class SystemTrayNotifier; 37 class SystemTrayNotifier;
38 class WmWindow; 38 class WmWindow;
39 39
40 namespace wm { 40 namespace wm {
41 class MaximizeModeEventHandler;
41 class WindowState; 42 class WindowState;
42 } 43 }
43 44
44 // Similar to ash::Shell. Eventually the two will be merged. 45 // Similar to ash::Shell. Eventually the two will be merged.
45 class ASH_EXPORT WmShell { 46 class ASH_EXPORT WmShell {
46 public: 47 public:
47 // This is necessary for a handful of places that is difficult to plumb 48 // This is necessary for a handful of places that is difficult to plumb
48 // through context. 49 // through context.
49 static void Set(WmShell* instance); 50 static void Set(WmShell* instance);
50 static WmShell* Get(); 51 static WmShell* Get();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0; 128 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0;
128 129
129 // Returns a WindowResizer to handle dragging. |next_window_resizer| is 130 // Returns a WindowResizer to handle dragging. |next_window_resizer| is
130 // the next WindowResizer in the WindowResizer chain. This may return 131 // the next WindowResizer in the WindowResizer chain. This may return
131 // |next_window_resizer|. 132 // |next_window_resizer|.
132 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer( 133 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer(
133 std::unique_ptr<WindowResizer> next_window_resizer, 134 std::unique_ptr<WindowResizer> next_window_resizer,
134 wm::WindowState* window_state) = 0; 135 wm::WindowState* window_state) = 0;
135 136
137 virtual std::unique_ptr<wm::MaximizeModeEventHandler>
138 CreateMaximizeModeEventHandler() = 0;
139
136 // Called when the overview mode is about to be started (before the windows 140 // Called when the overview mode is about to be started (before the windows
137 // get re-arranged). 141 // get re-arranged).
138 virtual void OnOverviewModeStarting() = 0; 142 virtual void OnOverviewModeStarting() = 0;
139 143
140 // Called after overview mode has ended. 144 // Called after overview mode has ended.
141 virtual void OnOverviewModeEnded() = 0; 145 virtual void OnOverviewModeEnded() = 0;
142 146
143 virtual AccessibilityDelegate* GetAccessibilityDelegate() = 0; 147 virtual AccessibilityDelegate* GetAccessibilityDelegate() = 0;
144 148
145 virtual SessionStateDelegate* GetSessionStateDelegate() = 0; 149 virtual SessionStateDelegate* GetSessionStateDelegate() = 0;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 184 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
181 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; 185 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
182 std::unique_ptr<WindowSelectorController> window_selector_controller_; 186 std::unique_ptr<WindowSelectorController> window_selector_controller_;
183 187
184 bool simulate_modal_window_open_for_testing_ = false; 188 bool simulate_modal_window_open_for_testing_ = false;
185 }; 189 };
186 190
187 } // namespace ash 191 } // namespace ash
188 192
189 #endif // ASH_COMMON_WM_SHELL_H_ 193 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698