| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 MonitorManager* monitor_manager() { return monitor_manager_.get(); } | 61 MonitorManager* monitor_manager() { return monitor_manager_.get(); } |
| 62 void SetMonitorManager(MonitorManager* monitor_manager); | 62 void SetMonitorManager(MonitorManager* monitor_manager); |
| 63 | 63 |
| 64 // Env takes ownership of the EventFilter. | 64 // Env takes ownership of the EventFilter. |
| 65 EventFilter* event_filter() { return event_filter_.get(); } | 65 EventFilter* event_filter() { return event_filter_.get(); } |
| 66 void SetEventFilter(EventFilter* event_filter); | 66 void SetEventFilter(EventFilter* event_filter); |
| 67 | 67 |
| 68 CursorManager* cursor_manager() { return &cursor_manager_; } | 68 CursorManager* cursor_manager() { return &cursor_manager_; } |
| 69 | 69 |
| 70 // Returns the native event dispatcher. The result should only be passed to | 70 // Returns the native event dispatcher. The result should only be passed to |
| 71 // MessageLoopForUI::RunWithDispatcher() or | 71 // base::RunLoop(dispatcher), or used to dispatch an event by |
| 72 // MessageLoopForUI::RunAllPendingWithDispatcher(), or used to dispatch | 72 // |Dispatch(const NativeEvent&)| on it. It must never be stored. |
| 73 // an event by |Dispatch(const NativeEvent&)| on it. It must never be stored. | |
| 74 #if !defined(OS_MACOSX) | 73 #if !defined(OS_MACOSX) |
| 75 MessageLoop::Dispatcher* GetDispatcher(); | 74 MessageLoop::Dispatcher* GetDispatcher(); |
| 76 #endif | 75 #endif |
| 77 | 76 |
| 78 private: | 77 private: |
| 79 friend class Window; | 78 friend class Window; |
| 80 | 79 |
| 81 void Init(); | 80 void Init(); |
| 82 | 81 |
| 83 // Called by the Window when it is initialized. Notifies observers. | 82 // Called by the Window when it is initialized. Notifies observers. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 99 #if defined(USE_X11) | 98 #if defined(USE_X11) |
| 100 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_; | 99 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_; |
| 101 #endif | 100 #endif |
| 102 | 101 |
| 103 DISALLOW_COPY_AND_ASSIGN(Env); | 102 DISALLOW_COPY_AND_ASSIGN(Env); |
| 104 }; | 103 }; |
| 105 | 104 |
| 106 } // namespace aura | 105 } // namespace aura |
| 107 | 106 |
| 108 #endif // UI_AURA_ENV_H_ | 107 #endif // UI_AURA_ENV_H_ |
| OLD | NEW |