From a4f857f0cafb41c3d7c3fd50c6b39c99e629b48a Mon Sep 17 00:00:00 2001 From: "backer@chromium.org" Date: Fri, 26 Aug 2011 18:14:45 +0000 Subject: Wayland support for views. views_desktop on Wayland. This CL depends on: * http://codereview.chromium.org/7457023 * http://codereview.chromium.org/7467007 * http://codereview.chromium.org/7473010 Wayland requires newer libraries than Ubuntu currently provides. I've created a list of required dependencies: https://sites.google.com/a/google.com/chrome_on_wayland/home/wayland-build-dependencies BUG= TEST=Built Chrome to verify that Wayland dependencies and changes don't interfere with the usual build. Review URL: http://codereview.chromium.org/7464027 Patch from Daniel Nicoara . git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98453 0039d316-1c4b-4281-b951-d872f2087c98 --- views/focus/accelerator_handler.h | 5 ++++- views/focus/accelerator_handler_wayland.cc | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 views/focus/accelerator_handler_wayland.cc (limited to 'views/focus') diff --git a/views/focus/accelerator_handler.h b/views/focus/accelerator_handler.h index b90bc84..9472dc7 100644 --- a/views/focus/accelerator_handler.h +++ b/views/focus/accelerator_handler.h @@ -20,7 +20,7 @@ namespace views { -#if defined(TOUCH_UI) +#if defined(TOUCH_UI) && !defined(USE_WAYLAND) // Dispatch an XEvent to the RootView. Return true if the event was dispatched // and handled, false otherwise. bool VIEWS_EXPORT DispatchXEvent(XEvent* xevent); @@ -40,6 +40,9 @@ class VIEWS_EXPORT AcceleratorHandler : public MessageLoop::Dispatcher { // focus manager #if defined(OS_WIN) virtual bool Dispatch(const MSG& msg); +#elif defined(USE_WAYLAND) + virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( + ui::WaylandEvent* ev); #elif defined(TOUCH_UI) virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev); #else diff --git a/views/focus/accelerator_handler_wayland.cc b/views/focus/accelerator_handler_wayland.cc new file mode 100644 index 0000000..1039570 --- /dev/null +++ b/views/focus/accelerator_handler_wayland.cc @@ -0,0 +1,19 @@ +// Copyright (c) 2011 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. + +#include "views/focus/accelerator_handler.h" + +#include "views/accelerator.h" +#include "views/focus/focus_manager.h" + +namespace views { + +AcceleratorHandler::AcceleratorHandler() {} + +base::MessagePumpDispatcher::DispatchStatus + AcceleratorHandler::Dispatch(ui::WaylandEvent* ev) { + return base::MessagePumpDispatcher::EVENT_IGNORED; +} + +} // namespace views -- cgit v1.1