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

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

Issue 110283005: Make aura_demo work on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorprate review feedback, fix builds Created 6 years, 11 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
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 #include "ui/aura/env.h" 5 #include "ui/aura/env.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_pump_dispatcher.h"
8 #include "ui/aura/env_observer.h" 9 #include "ui/aura/env_observer.h"
9 #include "ui/aura/input_state_lookup.h" 10 #include "ui/aura/input_state_lookup.h"
10 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
11 #include "ui/compositor/compositor.h" 12 #include "ui/compositor/compositor.h"
12 #include "ui/compositor/compositor_switches.h" 13 #include "ui/compositor/compositor_switches.h"
13 #include "ui/events/event_target_iterator.h" 14 #include "ui/events/event_target_iterator.h"
14 15
15 #if defined(USE_X11) 16 #if defined(USE_X11)
16 #include "base/message_loop/message_pump_x11.h" 17 #include "base/message_loop/message_pump_x11.h"
17 #endif 18 #endif
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 69
69 void Env::RemoveObserver(EnvObserver* observer) { 70 void Env::RemoveObserver(EnvObserver* observer) {
70 observers_.RemoveObserver(observer); 71 observers_.RemoveObserver(observer);
71 } 72 }
72 73
73 bool Env::IsMouseButtonDown() const { 74 bool Env::IsMouseButtonDown() const {
74 return input_state_lookup_.get() ? input_state_lookup_->IsMouseButtonDown() : 75 return input_state_lookup_.get() ? input_state_lookup_->IsMouseButtonDown() :
75 mouse_button_flags_ != 0; 76 mouse_button_flags_ != 0;
76 } 77 }
77 78
78 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ 79 #if defined(USE_AURA)
79 !defined(USE_GTK_MESSAGE_PUMP)
80 base::MessageLoop::Dispatcher* Env::GetDispatcher() { 80 base::MessageLoop::Dispatcher* Env::GetDispatcher() {
81 #if defined(USE_X11) 81 #if defined(USE_X11)
82 return base::MessagePumpX11::Current(); 82 return base::MessagePumpX11::Current();
83 #else 83 #else
84 return dispatcher_.get(); 84 return dispatcher_.get();
85 #endif 85 #endif
86 } 86 }
87 #endif 87 #endif
88 88
89 void Env::RootWindowActivated(RootWindow* root_window) { 89 void Env::RootWindowActivated(RootWindow* root_window) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 scoped_ptr<ui::EventTargetIterator> Env::GetChildIterator() const { 132 scoped_ptr<ui::EventTargetIterator> Env::GetChildIterator() const {
133 return scoped_ptr<ui::EventTargetIterator>(); 133 return scoped_ptr<ui::EventTargetIterator>();
134 } 134 }
135 135
136 ui::EventTargeter* Env::GetEventTargeter() { 136 ui::EventTargeter* Env::GetEventTargeter() {
137 NOTREACHED(); 137 NOTREACHED();
138 return NULL; 138 return NULL;
139 } 139 }
140 140
141 } // namespace aura 141 } // namespace aura
OLDNEW
« ui/aura/env.h ('K') | « ui/aura/env.h ('k') | ui/aura/root_window_host_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698