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

Unified Diff: ui/aura/window_tree_host_ozone.cc

Issue 275263002: [wip] ozonex: X11 backend for ozone. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_tree_host_ozone.h ('k') | ui/events/platform/x11/x11_event_source_libevent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ui/aura/window_tree_host_ozone.h ('k') | ui/events/platform/x11/x11_event_source_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698