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

Unified Diff: ui/platform_window/x11/x11_window_ozone.h

Issue 1602173005: Add PlatformWindow/Event related code for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split X11EventSource and X11Window. Created 4 years, 11 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
Index: ui/platform_window/x11/x11_window_ozone.h
diff --git a/ui/platform_window/x11/x11_window_ozone.h b/ui/platform_window/x11/x11_window_ozone.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c2d2c7f5b524f3d6a782921683746d2658657be
--- /dev/null
+++ b/ui/platform_window/x11/x11_window_ozone.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_OZONE_H_
+#define UI_PLATFORM_WINDOW_X11_X11_WINDOW_OZONE_H_
+
+#include "base/macros.h"
+#include "ui/events/platform/x11/x11_event_source_ozone.h"
+#include "ui/platform_window/x11/x11_window_base.h"
+
+namespace ui {
+
+// PlatformWindow implementation for X11 Ozone. PlatformEvents are ui::Events.
+class X11_WINDOW_EXPORT X11WindowOzone : public X11WindowBase,
+ public XEventDispatcher {
+ public:
+ explicit X11WindowOzone(PlatformWindowDelegate* delegate);
+ ~X11WindowOzone() override;
+
+ void Create();
+
+ // PlatformWindow:
+ void SetCursor(PlatformCursor cursor) override;
+
+ // XEventDispatcher:
+ bool DispatchXEvent(XEvent* event) override;
+
+ private:
+ // PlatformEventDispatcher:
+ bool CanDispatchEvent(const PlatformEvent& event) override;
+ uint32_t DispatchEvent(const PlatformEvent& event) override;
+
+ DISALLOW_COPY_AND_ASSIGN(X11WindowOzone);
+};
+
+} // namespace ui
+
+#endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_OZONE_H_

Powered by Google App Engine
This is Rietveld 408576698