| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/services/view_manager/root_node_manager.h" | 5 #include "mojo/services/view_manager/root_node_manager.h" |
| 6 #include "mojo/services/view_manager/window_tree_host_impl.h" | 6 #include "mojo/services/view_manager/window_tree_host_impl.h" |
| 7 #include "mojo/public/c/gles2/gles2.h" | 7 #include "mojo/public/c/gles2/gles2.h" |
| 8 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" | 8 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" |
| 9 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" | 9 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" |
| 10 #include "mojo/services/view_manager/context_factory_impl.h" | 10 #include "mojo/services/view_manager/context_factory_impl.h" |
| 11 #include "ui/aura/env.h" | 11 #include "ui/aura/env.h" |
| 12 #include "ui/aura/layout_manager.h" | 12 #include "ui/aura/layout_manager.h" |
| 13 #include "ui/aura/window.h" | 13 #include "ui/aura/window.h" |
| 14 #include "ui/aura/window_event_dispatcher.h" | 14 #include "ui/aura/window_event_dispatcher.h" |
| 15 #include "ui/compositor/compositor.h" | 15 #include "ui/compositor/compositor.h" |
| 16 #include "ui/events/event.h" | 16 #include "ui/events/event.h" |
| 17 #include "ui/events/event_constants.h" | 17 #include "ui/events/event_constants.h" |
| 18 #include "ui/gfx/geometry/insets.h" | 18 #include "ui/gfx/geometry/insets.h" |
| 19 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
| 20 | 20 |
| 21 namespace mojo { | 21 namespace mojo { |
| 22 namespace view_manager { | |
| 23 namespace service { | 22 namespace service { |
| 24 | 23 |
| 25 // TODO(sky): nuke this. It shouldn't be static. | 24 // TODO(sky): nuke this. It shouldn't be static. |
| 26 // static | 25 // static |
| 27 ContextFactoryImpl* WindowTreeHostImpl::context_factory_ = NULL; | 26 ContextFactoryImpl* WindowTreeHostImpl::context_factory_ = NULL; |
| 28 | 27 |
| 29 //////////////////////////////////////////////////////////////////////////////// | 28 //////////////////////////////////////////////////////////////////////////////// |
| 30 // RootLayoutManager, layout management for the root window's (one) child | 29 // RootLayoutManager, layout management for the root window's (one) child |
| 31 | 30 |
| 32 class RootLayoutManager : public aura::LayoutManager { | 31 class RootLayoutManager : public aura::LayoutManager { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 void WindowTreeHostImpl::OnEvent(EventPtr event, | 186 void WindowTreeHostImpl::OnEvent(EventPtr event, |
| 188 const mojo::Callback<void()>& callback) { | 187 const mojo::Callback<void()>& callback) { |
| 189 scoped_ptr<ui::Event> ui_event = | 188 scoped_ptr<ui::Event> ui_event = |
| 190 TypeConverter<EventPtr, scoped_ptr<ui::Event> >::ConvertTo(event); | 189 TypeConverter<EventPtr, scoped_ptr<ui::Event> >::ConvertTo(event); |
| 191 if (ui_event) | 190 if (ui_event) |
| 192 SendEventToProcessor(ui_event.get()); | 191 SendEventToProcessor(ui_event.get()); |
| 193 callback.Run(); | 192 callback.Run(); |
| 194 }; | 193 }; |
| 195 | 194 |
| 196 } // namespace service | 195 } // namespace service |
| 197 } // namespace view_manager | |
| 198 } // namespace mojo | 196 } // namespace mojo |
| OLD | NEW |