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

Side by Side Diff: ash/shell_port.h

Issue 2857963003: Add {Lock,Unlock,Show,Hide}Cursor() to the window manager mojom. (Closed)
Patch Set: General cleanup. 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 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_SHELL_PORT_H_ 5 #ifndef ASH_SHELL_PORT_H_
6 #define ASH_SHELL_PORT_H_ 6 #define ASH_SHELL_PORT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/metrics/gesture_action_type.h" 14 #include "ash/metrics/gesture_action_type.h"
15 #include "ash/metrics/user_metrics_action.h" 15 #include "ash/metrics/user_metrics_action.h"
16 #include "ash/wm/lock_state_observer.h" 16 #include "ash/wm/lock_state_observer.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "base/optional.h"
19 #include "ui/base/cursor/cursor_data.h"
18 #include "ui/base/ui_base_types.h" 20 #include "ui/base/ui_base_types.h"
19 #include "ui/compositor/layer_type.h" 21 #include "ui/compositor/layer_type.h"
20 #include "ui/wm/public/activation_change_observer.h" 22 #include "ui/wm/public/activation_change_observer.h"
21 #include "ui/wm/public/window_types.h" 23 #include "ui/wm/public/window_types.h"
22 24
23 namespace display { 25 namespace display {
24 class Display; 26 class Display;
25 class ManagedDisplayInfo; 27 class ManagedDisplayInfo;
26 class NativeDisplayDelegate; 28 class NativeDisplayDelegate;
27 } 29 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 void OnModalWindowRemoved(aura::Window* removed); 129 void OnModalWindowRemoved(aura::Window* removed);
128 130
129 // For testing only: set simulation that a modal window is open 131 // For testing only: set simulation that a modal window is open
130 void SimulateModalWindowOpenForTesting(bool modal_window_open) { 132 void SimulateModalWindowOpenForTesting(bool modal_window_open) {
131 simulate_modal_window_open_for_testing_ = modal_window_open; 133 simulate_modal_window_open_for_testing_ = modal_window_open;
132 } 134 }
133 135
134 // See aura::client::CursorClient for details on these. 136 // See aura::client::CursorClient for details on these.
135 virtual void LockCursor() = 0; 137 virtual void LockCursor() = 0;
136 virtual void UnlockCursor() = 0; 138 virtual void UnlockCursor() = 0;
139 virtual void ShowCursor() = 0;
140 virtual void HideCursor() = 0;
141 virtual void SetGlobalOverrideCursor(
142 base::Optional<ui::CursorData> cursor) = 0;
137 virtual bool IsMouseEventsEnabled() = 0; 143 virtual bool IsMouseEventsEnabled() = 0;
138 144
139 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; 145 virtual std::vector<WmWindow*> GetAllRootWindows() = 0;
140 146
141 virtual void RecordGestureAction(GestureActionType action) = 0; 147 virtual void RecordGestureAction(GestureActionType action) = 0;
142 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0; 148 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0;
143 virtual void RecordTaskSwitchMetric(TaskSwitchSource source) = 0; 149 virtual void RecordTaskSwitchMetric(TaskSwitchSource source) = 0;
144 150
145 // Shows the context menu for the wallpaper or shelf at |location_in_screen|. 151 // Shows the context menu for the wallpaper or shelf at |location_in_screen|.
146 void ShowContextMenu(const gfx::Point& location_in_screen, 152 void ShowContextMenu(const gfx::Point& location_in_screen,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 static ShellPort* instance_; 244 static ShellPort* instance_;
239 245
240 base::ObserverList<LockStateObserver> lock_state_observers_; 246 base::ObserverList<LockStateObserver> lock_state_observers_;
241 247
242 bool simulate_modal_window_open_for_testing_ = false; 248 bool simulate_modal_window_open_for_testing_ = false;
243 }; 249 };
244 250
245 } // namespace ash 251 } // namespace ash
246 252
247 #endif // ASH_SHELL_PORT_H_ 253 #endif // ASH_SHELL_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698