| 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/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 Env(); | 32 Env(); |
| 33 virtual ~Env(); | 33 virtual ~Env(); |
| 34 | 34 |
| 35 static void CreateInstance(); | 35 static void CreateInstance(); |
| 36 static Env* GetInstance(); | 36 static Env* GetInstance(); |
| 37 static void DeleteInstance(); | 37 static void DeleteInstance(); |
| 38 | 38 |
| 39 void AddObserver(EnvObserver* observer); | 39 void AddObserver(EnvObserver* observer); |
| 40 void RemoveObserver(EnvObserver* observer); | 40 void RemoveObserver(EnvObserver* observer); |
| 41 | 41 |
| 42 const int mouse_button_flags() const { return mouse_button_flags_; } | 42 int mouse_button_flags() const { return mouse_button_flags_; } |
| 43 void set_mouse_button_flags(int mouse_button_flags) { | 43 void set_mouse_button_flags(int mouse_button_flags) { |
| 44 mouse_button_flags_ = mouse_button_flags; | 44 mouse_button_flags_ = mouse_button_flags; |
| 45 } | 45 } |
| 46 // Returns true if a mouse button is down. This may query the native OS, | 46 // Returns true if a mouse button is down. This may query the native OS, |
| 47 // otherwise it uses |mouse_button_flags_|. | 47 // otherwise it uses |mouse_button_flags_|. |
| 48 bool IsMouseButtonDown() const; | 48 bool IsMouseButtonDown() const; |
| 49 | 49 |
| 50 // Gets/sets the last mouse location seen in a mouse event in the screen | 50 // Gets/sets the last mouse location seen in a mouse event in the screen |
| 51 // coordinates. | 51 // coordinates. |
| 52 const gfx::Point& last_mouse_location() const { return last_mouse_location_; } | 52 const gfx::Point& last_mouse_location() const { return last_mouse_location_; } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 scoped_ptr<InputStateLookup> input_state_lookup_; | 91 scoped_ptr<InputStateLookup> input_state_lookup_; |
| 92 scoped_ptr<ui::PlatformEventSource> event_source_; | 92 scoped_ptr<ui::PlatformEventSource> event_source_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(Env); | 94 DISALLOW_COPY_AND_ASSIGN(Env); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace aura | 97 } // namespace aura |
| 98 | 98 |
| 99 #endif // UI_AURA_ENV_H_ | 99 #endif // UI_AURA_ENV_H_ |
| OLD | NEW |