OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_AURA_ENV_H_ | 5 #ifndef UI_AURA_ENV_H_ |
6 #define UI_AURA_ENV_H_ | 6 #define UI_AURA_ENV_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 friend class test::EnvTestHelper; | 118 friend class test::EnvTestHelper; |
119 friend class MusMouseLocationUpdater; | 119 friend class MusMouseLocationUpdater; |
120 friend class Window; | 120 friend class Window; |
121 friend class WindowTreeHost; | 121 friend class WindowTreeHost; |
122 | 122 |
123 explicit Env(Mode mode); | 123 explicit Env(Mode mode); |
124 | 124 |
125 void Init(); | 125 void Init(); |
126 | 126 |
| 127 // After calling this method, all OSExchangeDataProvider instances will be |
| 128 // Mus instances. We can't do this work in Init(), because our mode may |
| 129 // changed via the EnvTestHelper. |
| 130 void EnableMusOSExchangeDataProvider(); |
| 131 |
127 // Called by the Window when it is initialized. Notifies observers. | 132 // Called by the Window when it is initialized. Notifies observers. |
128 void NotifyWindowInitialized(Window* window); | 133 void NotifyWindowInitialized(Window* window); |
129 | 134 |
130 // Called by the WindowTreeHost when it is initialized. Notifies observers. | 135 // Called by the WindowTreeHost when it is initialized. Notifies observers. |
131 void NotifyHostInitialized(WindowTreeHost* host); | 136 void NotifyHostInitialized(WindowTreeHost* host); |
132 | 137 |
133 // Invoked by WindowTreeHost when it is activated. Notifies observers. | 138 // Invoked by WindowTreeHost when it is activated. Notifies observers. |
134 void NotifyHostActivated(WindowTreeHost* host); | 139 void NotifyHostActivated(WindowTreeHost* host); |
135 | 140 |
136 void OnActiveFocusClientWindowDestroying(); | 141 void OnActiveFocusClientWindowDestroying(); |
(...skipping 18 matching lines...) Expand all Loading... |
155 base::ObserverList<EnvObserver> observers_; | 160 base::ObserverList<EnvObserver> observers_; |
156 | 161 |
157 int mouse_button_flags_; | 162 int mouse_button_flags_; |
158 // Location of last mouse event, in screen coordinates. | 163 // Location of last mouse event, in screen coordinates. |
159 mutable gfx::Point last_mouse_location_; | 164 mutable gfx::Point last_mouse_location_; |
160 bool is_touch_down_; | 165 bool is_touch_down_; |
161 bool get_last_mouse_location_from_mus_; | 166 bool get_last_mouse_location_from_mus_; |
162 // This may be set to true in tests to force using |last_mouse_location_| | 167 // This may be set to true in tests to force using |last_mouse_location_| |
163 // rather than querying WindowTreeClient. | 168 // rather than querying WindowTreeClient. |
164 bool always_use_last_mouse_location_ = false; | 169 bool always_use_last_mouse_location_ = false; |
| 170 // Whether we set ourselves as the OSExchangeDataProviderFactory. |
| 171 bool is_os_exchange_data_provider_factory_ = false; |
165 | 172 |
166 std::unique_ptr<InputStateLookup> input_state_lookup_; | 173 std::unique_ptr<InputStateLookup> input_state_lookup_; |
167 std::unique_ptr<ui::PlatformEventSource> event_source_; | 174 std::unique_ptr<ui::PlatformEventSource> event_source_; |
168 | 175 |
169 ui::ContextFactory* context_factory_; | 176 ui::ContextFactory* context_factory_; |
170 ui::ContextFactoryPrivate* context_factory_private_; | 177 ui::ContextFactoryPrivate* context_factory_private_; |
171 | 178 |
172 Window* active_focus_client_root_ = nullptr; | 179 Window* active_focus_client_root_ = nullptr; |
173 client::FocusClient* active_focus_client_ = nullptr; | 180 client::FocusClient* active_focus_client_ = nullptr; |
174 std::unique_ptr<ActiveFocusClientWindowObserver> | 181 std::unique_ptr<ActiveFocusClientWindowObserver> |
175 active_focus_client_window_observer_; | 182 active_focus_client_window_observer_; |
176 | 183 |
177 DISALLOW_COPY_AND_ASSIGN(Env); | 184 DISALLOW_COPY_AND_ASSIGN(Env); |
178 }; | 185 }; |
179 | 186 |
180 } // namespace aura | 187 } // namespace aura |
181 | 188 |
182 #endif // UI_AURA_ENV_H_ | 189 #endif // UI_AURA_ENV_H_ |
OLD | NEW |