| OLD | NEW |
| 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" | 18 #include "base/optional.h" |
| 19 #include "ui/base/cursor/cursor_data.h" | 19 #include "ui/base/cursor/cursor_data.h" |
| 20 #include "ui/base/ui_base_types.h" | 20 #include "ui/base/ui_base_types.h" |
| 21 #include "ui/compositor/layer_type.h" | 21 #include "ui/compositor/layer_type.h" |
| 22 #include "ui/wm/public/activation_change_observer.h" | 22 #include "ui/wm/public/activation_change_observer.h" |
| 23 #include "ui/wm/public/window_types.h" | 23 #include "ui/wm/public/window_types.h" |
| 24 | 24 |
| 25 namespace display { | 25 namespace display { |
| 26 class Display; | 26 class Display; |
| 27 class ManagedDisplayInfo; | 27 class ManagedDisplayInfo; |
| 28 class NativeDisplayDelegate; | 28 class NativeDisplayDelegate; |
| 29 class TouchTransformSetter; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace gfx { | 32 namespace gfx { |
| 32 class Insets; | 33 class Insets; |
| 33 class Point; | 34 class Point; |
| 34 } | 35 } |
| 35 | 36 |
| 36 namespace views { | 37 namespace views { |
| 37 class PointerWatcher; | 38 class PointerWatcher; |
| 38 enum class PointerWatcherEventTypes; | 39 enum class PointerWatcherEventTypes; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 bool IsSystemModalWindowOpen(); | 119 bool IsSystemModalWindowOpen(); |
| 119 | 120 |
| 120 // Creates a modal background (a partially-opaque fullscreen window) on all | 121 // Creates a modal background (a partially-opaque fullscreen window) on all |
| 121 // displays for |window|. | 122 // displays for |window|. |
| 122 void CreateModalBackground(aura::Window* window); | 123 void CreateModalBackground(aura::Window* window); |
| 123 | 124 |
| 124 // Called when a modal window is removed. It will activate another modal | 125 // Called when a modal window is removed. It will activate another modal |
| 125 // window if any, or remove modal screens on all displays. | 126 // window if any, or remove modal screens on all displays. |
| 126 void OnModalWindowRemoved(aura::Window* removed); | 127 void OnModalWindowRemoved(aura::Window* removed); |
| 127 | 128 |
| 129 // The return value from this is supplied to AshTouchTransformController; see |
| 130 // it and TouchTransformSetter for details. |
| 131 // TODO(sky): remove once simplified disable management enabled everywhere; |
| 132 // http://crbug.com/718860. |
| 133 virtual std::unique_ptr<display::TouchTransformSetter> |
| 134 CreateTouchTransformDelegate() = 0; |
| 135 |
| 128 // For testing only: set simulation that a modal window is open | 136 // For testing only: set simulation that a modal window is open |
| 129 void SimulateModalWindowOpenForTesting(bool modal_window_open) { | 137 void SimulateModalWindowOpenForTesting(bool modal_window_open) { |
| 130 simulate_modal_window_open_for_testing_ = modal_window_open; | 138 simulate_modal_window_open_for_testing_ = modal_window_open; |
| 131 } | 139 } |
| 132 | 140 |
| 133 // See aura::client::CursorClient for details on these. | 141 // See aura::client::CursorClient for details on these. |
| 134 virtual void LockCursor() = 0; | 142 virtual void LockCursor() = 0; |
| 135 virtual void UnlockCursor() = 0; | 143 virtual void UnlockCursor() = 0; |
| 136 virtual void ShowCursor() = 0; | 144 virtual void ShowCursor() = 0; |
| 137 virtual void HideCursor() = 0; | 145 virtual void HideCursor() = 0; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 static ShellPort* instance_; | 249 static ShellPort* instance_; |
| 242 | 250 |
| 243 base::ObserverList<LockStateObserver> lock_state_observers_; | 251 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 244 | 252 |
| 245 bool simulate_modal_window_open_for_testing_ = false; | 253 bool simulate_modal_window_open_for_testing_ = false; |
| 246 }; | 254 }; |
| 247 | 255 |
| 248 } // namespace ash | 256 } // namespace ash |
| 249 | 257 |
| 250 #endif // ASH_SHELL_PORT_H_ | 258 #endif // ASH_SHELL_PORT_H_ |
| OLD | NEW |