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

Unified Diff: ui/events/gestures/gesture_recognizer_impl_mac.cc

Issue 249113002: MacViews: Adds NativeWidgetMac and gets views target compiling on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ash -> aura 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/events/events.gyp ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_recognizer_impl_mac.cc
diff --git a/ui/events/gestures/gesture_recognizer_impl_mac.cc b/ui/events/gestures/gesture_recognizer_impl_mac.cc
new file mode 100644
index 0000000000000000000000000000000000000000..46dde02fad982e48cd38c96e3469f10a897fed79
--- /dev/null
+++ b/ui/events/gestures/gesture_recognizer_impl_mac.cc
@@ -0,0 +1,64 @@
+// Copyright 2014 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 "base/macros.h"
+#include "ui/events/gestures/gesture_recognizer.h"
+
+namespace ui {
+
+namespace {
+
+// Stub implementation of GestureRecognizer for Mac. Currently only serves to
+// provide a no-op implementation of TransferEventsTo().
+class GestureRecognizerImplMac : public GestureRecognizer {
+ public:
+ GestureRecognizerImplMac() {}
+ virtual ~GestureRecognizerImplMac() {}
+
+ private:
+ virtual Gestures* ProcessTouchEventForGesture(
+ const TouchEvent& event,
+ ui::EventResult result,
+ GestureConsumer* consumer) OVERRIDE {
+ return NULL;
+ }
+ virtual bool CleanupStateForConsumer(GestureConsumer* consumer) OVERRIDE {
+ return false;
+ }
+ virtual GestureConsumer* GetTouchLockedTarget(
+ const TouchEvent& event) OVERRIDE {
+ return NULL;
+ }
+ virtual GestureConsumer* GetTargetForGestureEvent(
+ const GestureEvent& event) OVERRIDE {
+ return NULL;
+ }
+ virtual GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
+ int source_device_id) OVERRIDE {
+ return NULL;
+ }
+ virtual void TransferEventsTo(GestureConsumer* current_consumer,
+ GestureConsumer* new_consumer) OVERRIDE {}
+ virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer,
+ gfx::PointF* point) OVERRIDE {
+ return false;
+ }
+ virtual bool CancelActiveTouches(GestureConsumer* consumer) OVERRIDE {
+ return false;
+ }
+ virtual void AddGestureEventHelper(GestureEventHelper* helper) OVERRIDE {}
+ virtual void RemoveGestureEventHelper(GestureEventHelper* helper) OVERRIDE {}
+
+ DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMac);
+};
+
+} // namespace
+
+// static
+GestureRecognizer* GestureRecognizer::Get() {
+ CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ());
+ return &instance;
+}
+
+} // namespace ui
« no previous file with comments | « ui/events/events.gyp ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698