| 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 15 matching lines...) Expand all Loading... |
| 152 base::ObserverList<EnvObserver> observers_; | 157 base::ObserverList<EnvObserver> observers_; |
| 153 | 158 |
| 154 int mouse_button_flags_; | 159 int mouse_button_flags_; |
| 155 // Location of last mouse event, in screen coordinates. | 160 // Location of last mouse event, in screen coordinates. |
| 156 mutable gfx::Point last_mouse_location_; | 161 mutable gfx::Point last_mouse_location_; |
| 157 bool is_touch_down_; | 162 bool is_touch_down_; |
| 158 bool get_last_mouse_location_from_mus_; | 163 bool get_last_mouse_location_from_mus_; |
| 159 // This may be set to true in tests to force using |last_mouse_location_| | 164 // This may be set to true in tests to force using |last_mouse_location_| |
| 160 // rather than querying WindowTreeClient. | 165 // rather than querying WindowTreeClient. |
| 161 bool always_use_last_mouse_location_ = false; | 166 bool always_use_last_mouse_location_ = false; |
| 167 // Whether we set ourselves as the OSExchangeDataProviderFactory. |
| 168 bool is_os_exchange_data_provider_factory_ = false; |
| 162 | 169 |
| 163 std::unique_ptr<InputStateLookup> input_state_lookup_; | 170 std::unique_ptr<InputStateLookup> input_state_lookup_; |
| 164 std::unique_ptr<ui::PlatformEventSource> event_source_; | 171 std::unique_ptr<ui::PlatformEventSource> event_source_; |
| 165 | 172 |
| 166 ui::ContextFactory* context_factory_; | 173 ui::ContextFactory* context_factory_; |
| 167 ui::ContextFactoryPrivate* context_factory_private_; | 174 ui::ContextFactoryPrivate* context_factory_private_; |
| 168 | 175 |
| 169 Window* active_focus_client_root_ = nullptr; | 176 Window* active_focus_client_root_ = nullptr; |
| 170 client::FocusClient* active_focus_client_ = nullptr; | 177 client::FocusClient* active_focus_client_ = nullptr; |
| 171 std::unique_ptr<ActiveFocusClientWindowObserver> | 178 std::unique_ptr<ActiveFocusClientWindowObserver> |
| 172 active_focus_client_window_observer_; | 179 active_focus_client_window_observer_; |
| 173 | 180 |
| 174 DISALLOW_COPY_AND_ASSIGN(Env); | 181 DISALLOW_COPY_AND_ASSIGN(Env); |
| 175 }; | 182 }; |
| 176 | 183 |
| 177 } // namespace aura | 184 } // namespace aura |
| 178 | 185 |
| 179 #endif // UI_AURA_ENV_H_ | 186 #endif // UI_AURA_ENV_H_ |
| OLD | NEW |