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

Unified Diff: views/widget/native_widget_wayland.cc

Issue 8378005: wayland: define base:NativeEvent for Wayland (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create a new wayland namespace in base and define WaylandEvent there. Created 9 years, 1 month 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: views/widget/native_widget_wayland.cc
diff --git a/views/widget/native_widget_wayland.cc b/views/widget/native_widget_wayland.cc
index 2be625ab699e4ac9fd7a95a32a535d009aebf7e4..cae95f70cdb68c3ec63ec31088e3e08794921085 100644
--- a/views/widget/native_widget_wayland.cc
+++ b/views/widget/native_widget_wayland.cc
@@ -15,12 +15,12 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
+#include "base/wayland/wayland_event.h"
#include "ui/base/view_prop.h"
#include "ui/gfx/canvas_skia_paint.h"
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/gl/gl_surface.h"
#include "ui/gfx/gl/gl_surface_egl.h"
-#include "ui/wayland/events/wayland_event.h"
#include "ui/wayland/wayland_display.h"
#include "ui/wayland/wayland_input_device.h"
#include "ui/wayland/wayland_screen.h"
@@ -33,6 +33,8 @@
using ui::ViewProp;
+using base::wayland::WaylandEvent;
+
namespace views {
namespace {
@@ -549,12 +551,12 @@ void NativeWidgetWayland::OnPaint(gfx::Rect damage_area) {
}
}
-void NativeWidgetWayland::OnMotionNotify(ui::WaylandEvent event) {
+void NativeWidgetWayland::OnMotionNotify(WaylandEvent event) {
MouseEvent mouse_event(&event);
delegate_->OnMouseEvent(mouse_event);
}
-void NativeWidgetWayland::OnButtonNotify(ui::WaylandEvent event) {
+void NativeWidgetWayland::OnButtonNotify(WaylandEvent event) {
if (event.button.button == ui::SCROLL_UP ||
event.button.button == ui::SCROLL_DOWN) {
MouseWheelEvent mouse_event(&event);
@@ -565,7 +567,7 @@ void NativeWidgetWayland::OnButtonNotify(ui::WaylandEvent event) {
}
}
-void NativeWidgetWayland::OnKeyNotify(ui::WaylandEvent event) {
+void NativeWidgetWayland::OnKeyNotify(WaylandEvent event) {
KeyEvent key_event(&event);
InputMethod* input_method = GetWidget()->GetInputMethodDirect();
if (input_method)
@@ -574,12 +576,12 @@ void NativeWidgetWayland::OnKeyNotify(ui::WaylandEvent event) {
DispatchKeyEventPostIME(key_event);
}
-void NativeWidgetWayland::OnPointerFocus(ui::WaylandEvent event) {
+void NativeWidgetWayland::OnPointerFocus(WaylandEvent event) {
MouseEvent mouse_event(&event);
delegate_->OnMouseEvent(mouse_event);
}
-void NativeWidgetWayland::OnKeyboardFocus(ui::WaylandEvent event) {
+void NativeWidgetWayland::OnKeyboardFocus(WaylandEvent event) {
InputMethod* input_method = GetWidget()->GetInputMethodDirect();
if (input_method) {
if (event.keyboard_focus.state)
@@ -589,7 +591,7 @@ void NativeWidgetWayland::OnKeyboardFocus(ui::WaylandEvent event) {
}
}
-void NativeWidgetWayland::OnGeometryChange(ui::WaylandEvent event) {
+void NativeWidgetWayland::OnGeometryChange(WaylandEvent event) {
SetSize(gfx::Size(event.geometry_change.width,
event.geometry_change.height));
}

Powered by Google App Engine
This is Rietveld 408576698