Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: ui/aura/env.h

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/display_observer.h ('k') | ui/aura/env.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "ui/aura/aura_export.h" 12 #include "ui/aura/aura_export.h"
13 #include "ui/aura/cursor_manager.h" 13 #include "ui/aura/cursor_manager.h"
14 #include "ui/aura/client/stacking_client.h" 14 #include "ui/aura/client/stacking_client.h"
15 15
16 namespace aura { 16 namespace aura {
17 class CursorManager; 17 class CursorManager;
18 class EnvObserver; 18 class EnvObserver;
19 class EventFilter; 19 class EventFilter;
20 class MonitorManager; 20 class DisplayManager;
21 class Window; 21 class Window;
22 22
23 namespace internal { 23 namespace internal {
24 class MonitorChangeObserverX11; 24 class DisplayChangeObserverX11;
25 } 25 }
26 26
27 #if !defined(OS_MACOSX) 27 #if !defined(OS_MACOSX)
28 // Creates a platform-specific native event dispatcher. 28 // Creates a platform-specific native event dispatcher.
29 MessageLoop::Dispatcher* CreateDispatcher(); 29 MessageLoop::Dispatcher* CreateDispatcher();
30 #endif 30 #endif
31 31
32 // A singleton object that tracks general state within Aura. 32 // A singleton object that tracks general state within Aura.
33 // TODO(beng): manage RootWindows. 33 // TODO(beng): manage RootWindows.
34 class AURA_EXPORT Env { 34 class AURA_EXPORT Env {
(...skipping 14 matching lines...) Expand all
49 49
50 // Whether any touch device is currently down. 50 // Whether any touch device is currently down.
51 bool is_touch_down() const { return is_touch_down_; } 51 bool is_touch_down() const { return is_touch_down_; }
52 void set_touch_down(bool value) { is_touch_down_ = value; } 52 void set_touch_down(bool value) { is_touch_down_ = value; }
53 53
54 client::StackingClient* stacking_client() { return stacking_client_; } 54 client::StackingClient* stacking_client() { return stacking_client_; }
55 void set_stacking_client(client::StackingClient* stacking_client) { 55 void set_stacking_client(client::StackingClient* stacking_client) {
56 stacking_client_ = stacking_client; 56 stacking_client_ = stacking_client;
57 } 57 }
58 58
59 // Gets/sets MonitorManager. The MonitorManager's ownership is 59 // Gets/sets DisplayManager. The DisplayManager's ownership is
60 // transfered. 60 // transfered.
61 MonitorManager* monitor_manager() { return monitor_manager_.get(); } 61 DisplayManager* display_manager() { return display_manager_.get(); }
62 void SetMonitorManager(MonitorManager* monitor_manager); 62 void SetDisplayManager(DisplayManager* display_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 // MessageLoopForUI::RunWithDispatcher() or
72 // MessageLoopForUI::RunAllPendingWithDispatcher(), or used to dispatch 72 // MessageLoopForUI::RunAllPendingWithDispatcher(), or used to dispatch
(...skipping 12 matching lines...) Expand all
85 85
86 ObserverList<EnvObserver> observers_; 86 ObserverList<EnvObserver> observers_;
87 #if !defined(OS_MACOSX) 87 #if !defined(OS_MACOSX)
88 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; 88 scoped_ptr<MessageLoop::Dispatcher> dispatcher_;
89 #endif 89 #endif
90 90
91 static Env* instance_; 91 static Env* instance_;
92 int mouse_button_flags_; 92 int mouse_button_flags_;
93 bool is_touch_down_; 93 bool is_touch_down_;
94 client::StackingClient* stacking_client_; 94 client::StackingClient* stacking_client_;
95 scoped_ptr<MonitorManager> monitor_manager_; 95 scoped_ptr<DisplayManager> display_manager_;
96 scoped_ptr<EventFilter> event_filter_; 96 scoped_ptr<EventFilter> event_filter_;
97 CursorManager cursor_manager_; 97 CursorManager cursor_manager_;
98 98
99 #if defined(USE_X11) 99 #if defined(USE_X11)
100 scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_; 100 scoped_ptr<internal::DisplayChangeObserverX11> display_change_observer_;
101 #endif 101 #endif
102 102
103 DISALLOW_COPY_AND_ASSIGN(Env); 103 DISALLOW_COPY_AND_ASSIGN(Env);
104 }; 104 };
105 105
106 } // namespace aura 106 } // namespace aura
107 107
108 #endif // UI_AURA_ENV_H_ 108 #endif // UI_AURA_ENV_H_
OLDNEW
« no previous file with comments | « ui/aura/display_observer.h ('k') | ui/aura/env.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698