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 "ui/aura/window_tree_host_ozone.h" | 5 #include "ui/aura/window_tree_host_ozone.h" |
6 | 6 |
7 #include "ui/aura/window_event_dispatcher.h" | 7 #include "ui/aura/window_event_dispatcher.h" |
8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" | 8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" |
9 #include "ui/events/ozone/event_factory_ozone.h" | 9 #include "ui/events/ozone/event_factory_ozone.h" |
10 #include "ui/events/platform/platform_event_source.h" | 10 #include "ui/events/platform/platform_event_source.h" |
11 #include "ui/gfx/ozone/surface_factory_ozone.h" | 11 #include "ui/gfx/ozone/surface_factory_ozone.h" |
12 #include "ui/ozone/ozone_platform.h" | 12 #include "ui/ozone/ozone_platform.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 | 15 |
16 WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds) | 16 WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds) |
17 : widget_(0), | 17 : widget_(0), |
18 bounds_(bounds) { | 18 bounds_(bounds) { |
19 ui::OzonePlatform::Initialize(); | 19 ui::OzonePlatform::Initialize(); |
20 | 20 |
21 // EventFactoryOzone creates converters that obtain input events from the | |
22 // underlying input system and dispatch them as |ui::Event| instances into | |
23 // Aura. | |
24 ui::EventFactoryOzone::GetInstance()->StartProcessingEvents(); | |
25 | |
26 gfx::SurfaceFactoryOzone* surface_factory = | 21 gfx::SurfaceFactoryOzone* surface_factory = |
27 gfx::SurfaceFactoryOzone::GetInstance(); | 22 gfx::SurfaceFactoryOzone::GetInstance(); |
28 widget_ = surface_factory->GetAcceleratedWidget(); | 23 widget_ = surface_factory->GetAcceleratedWidget(); |
29 | 24 |
30 ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); | 25 ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
31 CreateCompositor(GetAcceleratedWidget()); | 26 CreateCompositor(GetAcceleratedWidget()); |
32 } | 27 } |
33 | 28 |
34 WindowTreeHostOzone::~WindowTreeHostOzone() { | 29 WindowTreeHostOzone::~WindowTreeHostOzone() { |
35 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); | 30 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 return new WindowTreeHostOzone(bounds); | 112 return new WindowTreeHostOzone(bounds); |
118 } | 113 } |
119 | 114 |
120 // static | 115 // static |
121 gfx::Size WindowTreeHost::GetNativeScreenSize() { | 116 gfx::Size WindowTreeHost::GetNativeScreenSize() { |
122 NOTIMPLEMENTED(); | 117 NOTIMPLEMENTED(); |
123 return gfx::Size(); | 118 return gfx::Size(); |
124 } | 119 } |
125 | 120 |
126 } // namespace aura | 121 } // namespace aura |
OLD | NEW |