| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 static void DeleteInstance(); | 38 static void DeleteInstance(); |
| 39 | 39 |
| 40 void AddObserver(EnvObserver* observer); | 40 void AddObserver(EnvObserver* observer); |
| 41 void RemoveObserver(EnvObserver* observer); | 41 void RemoveObserver(EnvObserver* observer); |
| 42 | 42 |
| 43 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; } | 43 bool is_mouse_button_down() const { return mouse_button_flags_ != 0; } |
| 44 void set_mouse_button_flags(int mouse_button_flags) { | 44 void set_mouse_button_flags(int mouse_button_flags) { |
| 45 mouse_button_flags_ = mouse_button_flags; | 45 mouse_button_flags_ = mouse_button_flags; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // Whether any touch device is currently down. |
| 49 bool is_touch_down() const { return is_touch_down_; } |
| 50 void set_touch_down(bool value) { is_touch_down_ = value; } |
| 51 |
| 48 client::StackingClient* stacking_client() { return stacking_client_; } | 52 client::StackingClient* stacking_client() { return stacking_client_; } |
| 49 void set_stacking_client(client::StackingClient* stacking_client) { | 53 void set_stacking_client(client::StackingClient* stacking_client) { |
| 50 stacking_client_ = stacking_client; | 54 stacking_client_ = stacking_client; |
| 51 } | 55 } |
| 52 | 56 |
| 53 // Gets/sets MonitorManager. The MonitorManager's ownership is | 57 // Gets/sets MonitorManager. The MonitorManager's ownership is |
| 54 // transfered. | 58 // transfered. |
| 55 MonitorManager* monitor_manager() { return monitor_manager_.get(); } | 59 MonitorManager* monitor_manager() { return monitor_manager_.get(); } |
| 56 void SetMonitorManager(MonitorManager* monitor_manager); | 60 void SetMonitorManager(MonitorManager* monitor_manager); |
| 57 | 61 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 71 // Called by the Window when it is initialized. Notifies observers. | 75 // Called by the Window when it is initialized. Notifies observers. |
| 72 void NotifyWindowInitialized(Window* window); | 76 void NotifyWindowInitialized(Window* window); |
| 73 | 77 |
| 74 ObserverList<EnvObserver> observers_; | 78 ObserverList<EnvObserver> observers_; |
| 75 #if !defined(OS_MACOSX) | 79 #if !defined(OS_MACOSX) |
| 76 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; | 80 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; |
| 77 #endif | 81 #endif |
| 78 | 82 |
| 79 static Env* instance_; | 83 static Env* instance_; |
| 80 int mouse_button_flags_; | 84 int mouse_button_flags_; |
| 85 bool is_touch_down_; |
| 81 client::StackingClient* stacking_client_; | 86 client::StackingClient* stacking_client_; |
| 82 scoped_ptr<MonitorManager> monitor_manager_; | 87 scoped_ptr<MonitorManager> monitor_manager_; |
| 83 | 88 |
| 84 #if defined(USE_X11) | 89 #if defined(USE_X11) |
| 85 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_; | 90 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_; |
| 86 #endif | 91 #endif |
| 87 | 92 |
| 88 DISALLOW_COPY_AND_ASSIGN(Env); | 93 DISALLOW_COPY_AND_ASSIGN(Env); |
| 89 }; | 94 }; |
| 90 | 95 |
| 91 } // namespace aura | 96 } // namespace aura |
| 92 | 97 |
| 93 #endif // UI_AURA_ENV_H_ | 98 #endif // UI_AURA_ENV_H_ |
| OLD | NEW |