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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |