| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 base::MessageLoop::Dispatcher* CreateDispatcher(); | 27 base::MessageLoop::Dispatcher* CreateDispatcher(); |
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 // A singleton object that tracks general state within Aura. | 30 // A singleton object that tracks general state within Aura. |
| 31 // TODO(beng): manage RootWindows. | 31 // TODO(beng): manage RootWindows. |
| 32 class AURA_EXPORT Env : public ui::EventTarget { | 32 class AURA_EXPORT Env : public ui::EventTarget { |
| 33 public: | 33 public: |
| 34 Env(); | 34 Env(); |
| 35 virtual ~Env(); | 35 virtual ~Env(); |
| 36 | 36 |
| 37 static void CreateInstance(); |
| 37 static Env* GetInstance(); | 38 static Env* GetInstance(); |
| 38 static void DeleteInstance(); | 39 static void DeleteInstance(); |
| 39 | 40 |
| 40 void AddObserver(EnvObserver* observer); | 41 void AddObserver(EnvObserver* observer); |
| 41 void RemoveObserver(EnvObserver* observer); | 42 void RemoveObserver(EnvObserver* observer); |
| 42 | 43 |
| 43 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; } | 44 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; } |
| 44 void set_mouse_button_flags(int mouse_button_flags) { | 45 void set_mouse_button_flags(int mouse_button_flags) { |
| 45 mouse_button_flags_ = mouse_button_flags; | 46 mouse_button_flags_ = mouse_button_flags; |
| 46 } | 47 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #if defined(USE_X11) | 98 #if defined(USE_X11) |
| 98 DeviceListUpdaterAuraX11 device_list_updater_aurax11_; | 99 DeviceListUpdaterAuraX11 device_list_updater_aurax11_; |
| 99 #endif | 100 #endif |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(Env); | 102 DISALLOW_COPY_AND_ASSIGN(Env); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace aura | 105 } // namespace aura |
| 105 | 106 |
| 106 #endif // UI_AURA_ENV_H_ | 107 #endif // UI_AURA_ENV_H_ |
| OLD | NEW |