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

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

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/dispatcher_win.cc ('k') | ui/aura/remote_root_window_host_win.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 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // when backing store is not present. Default is true. 60 // when backing store is not present. Default is true.
61 // In some cases when page is using transparent background painting white 61 // In some cases when page is using transparent background painting white
62 // background before backing store is initialized causes a white splash. 62 // background before backing store is initialized causes a white splash.
63 bool render_white_bg() const { return render_white_bg_; } 63 bool render_white_bg() const { return render_white_bg_; }
64 void set_render_white_bg(bool value) { render_white_bg_ = value; } 64 void set_render_white_bg(bool value) { render_white_bg_ = value; }
65 65
66 // Returns the native event dispatcher. The result should only be passed to 66 // Returns the native event dispatcher. The result should only be passed to
67 // base::RunLoop(dispatcher), or used to dispatch an event by 67 // base::RunLoop(dispatcher), or used to dispatch an event by
68 // |Dispatch(const NativeEvent&)| on it. It must never be stored. 68 // |Dispatch(const NativeEvent&)| on it. It must never be stored.
69 #if !defined(OS_MACOSX) 69 #if !defined(OS_MACOSX)
70 MessageLoop::Dispatcher* GetDispatcher(); 70 base::MessageLoop::Dispatcher* GetDispatcher();
71 #endif 71 #endif
72 72
73 // Invoked by RootWindow when its host is activated. 73 // Invoked by RootWindow when its host is activated.
74 void RootWindowActivated(RootWindow* root_window); 74 void RootWindowActivated(RootWindow* root_window);
75 75
76 private: 76 private:
77 friend class Window; 77 friend class Window;
78 friend class RootWindow; 78 friend class RootWindow;
79 79
80 void Init(); 80 void Init();
81 81
82 // Called by the Window when it is initialized. Notifies observers. 82 // Called by the Window when it is initialized. Notifies observers.
83 void NotifyWindowInitialized(Window* window); 83 void NotifyWindowInitialized(Window* window);
84 84
85 // Called by the RootWindow when it is initialized. Notifies observers. 85 // Called by the RootWindow when it is initialized. Notifies observers.
86 void NotifyRootWindowInitialized(RootWindow* root_window); 86 void NotifyRootWindowInitialized(RootWindow* root_window);
87 87
88 // Overridden from ui::EventTarget: 88 // Overridden from ui::EventTarget:
89 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; 89 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
90 virtual ui::EventTarget* GetParentTarget() OVERRIDE; 90 virtual ui::EventTarget* GetParentTarget() OVERRIDE;
91 91
92 ObserverList<EnvObserver> observers_; 92 ObserverList<EnvObserver> observers_;
93 #if !defined(USE_X11) 93 #if !defined(USE_X11)
94 scoped_ptr<MessageLoop::Dispatcher> dispatcher_; 94 scoped_ptr<base::MessageLoop::Dispatcher> dispatcher_;
95 #endif 95 #endif
96 96
97 static Env* instance_; 97 static Env* instance_;
98 int mouse_button_flags_; 98 int mouse_button_flags_;
99 // Location of last mouse event, in screen coordinates. 99 // Location of last mouse event, in screen coordinates.
100 gfx::Point last_mouse_location_; 100 gfx::Point last_mouse_location_;
101 bool is_touch_down_; 101 bool is_touch_down_;
102 bool render_white_bg_; 102 bool render_white_bg_;
103 103
104 #if defined(USE_X11) 104 #if defined(USE_X11)
105 DeviceListUpdaterAuraX11 device_list_updater_aurax11_; 105 DeviceListUpdaterAuraX11 device_list_updater_aurax11_;
106 #endif 106 #endif
107 107
108 DISALLOW_COPY_AND_ASSIGN(Env); 108 DISALLOW_COPY_AND_ASSIGN(Env);
109 }; 109 };
110 110
111 } // namespace aura 111 } // namespace aura
112 112
113 #endif // UI_AURA_ENV_H_ 113 #endif // UI_AURA_ENV_H_
OLDNEW
« no previous file with comments | « ui/aura/dispatcher_win.cc ('k') | ui/aura/remote_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698