| Index: ui/aura/window_tree_host_ozone.cc
|
| diff --git a/ui/aura/window_tree_host_ozone.cc b/ui/aura/window_tree_host_ozone.cc
|
| index 5b8be534b98dbfcf65f5677730dd2c29858cd717..2b1e9cdb1dd2df29504e20b57370e5bdd3407342 100644
|
| --- a/ui/aura/window_tree_host_ozone.cc
|
| +++ b/ui/aura/window_tree_host_ozone.cc
|
| @@ -7,7 +7,6 @@
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/base/cursor/ozone/cursor_factory_ozone.h"
|
| #include "ui/events/ozone/event_factory_ozone.h"
|
| -#include "ui/events/platform/platform_event_source.h"
|
| #include "ui/gfx/ozone/surface_factory_ozone.h"
|
|
|
| namespace aura {
|
| @@ -17,33 +16,16 @@ WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
|
| bounds_(bounds) {
|
| gfx::SurfaceFactoryOzone* surface_factory =
|
| gfx::SurfaceFactoryOzone::GetInstance();
|
| - widget_ = surface_factory->GetAcceleratedWidget();
|
| + widget_ = surface_factory->CreatePlatformWindow(this);
|
|
|
| - ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
|
| CreateCompositor(GetAcceleratedWidget());
|
| }
|
|
|
| WindowTreeHostOzone::~WindowTreeHostOzone() {
|
| - ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
| DestroyCompositor();
|
| DestroyDispatcher();
|
| }
|
|
|
| -bool WindowTreeHostOzone::CanDispatchEvent(const ui::PlatformEvent& ne) {
|
| - CHECK(ne);
|
| - ui::Event* event = static_cast<ui::Event*>(ne);
|
| - if (event->IsMouseEvent() || event->IsScrollEvent())
|
| - return ui::CursorFactoryOzone::GetInstance()->GetCursorWindow() == widget_;
|
| -
|
| - return true;
|
| -}
|
| -
|
| -uint32_t WindowTreeHostOzone::DispatchEvent(const ui::PlatformEvent& ne) {
|
| - ui::Event* event = static_cast<ui::Event*>(ne);
|
| - ui::EventDispatchDetails details ALLOW_UNUSED = SendEventToProcessor(event);
|
| - return ui::POST_DISPATCH_STOP_PROPAGATION;
|
| -}
|
| -
|
| ui::EventSource* WindowTreeHostOzone::GetEventSource() {
|
| return this;
|
| }
|
| @@ -104,6 +86,29 @@ ui::EventProcessor* WindowTreeHostOzone::GetEventProcessor() {
|
| return dispatcher();
|
| }
|
|
|
| +void WindowTreeHostOzone::OnBoundsChanged(const gfx::Rect& new_bounds) {
|
| +}
|
| +
|
| +void WindowTreeHostOzone::OnDamageRect(const gfx::Rect& damaged_region) {
|
| +}
|
| +
|
| +void WindowTreeHostOzone::DispatchEvent(ui::Event* event) {
|
| + ignore_result(SendEventToProcessor(event));
|
| +}
|
| +
|
| +void WindowTreeHostOzone::OnCloseRequest() {
|
| +}
|
| +
|
| +void WindowTreeHostOzone::OnClosed() {
|
| +}
|
| +
|
| +void WindowTreeHostOzone::OnWindowStateChanged(
|
| + ui::PlatformWindowState new_state) {
|
| +}
|
| +
|
| +void WindowTreeHostOzone::OnLostCapture() {
|
| +}
|
| +
|
| // static
|
| WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
|
| return new WindowTreeHostOzone(bounds);
|
|
|