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