summaryrefslogtreecommitdiffstats
path: root/ui/events
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-26 16:27:37 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-26 16:27:37 +0000
commitd4bf47a5cce81c0c5db621290363720b5ebbe42c (patch)
tree577d86764ac51cc76fc27f3540c7ab673febe761 /ui/events
parentf802c349f87e7798c96b21c5da480fd8abc3e863 (diff)
downloadchromium_src-d4bf47a5cce81c0c5db621290363720b5ebbe42c.zip
chromium_src-d4bf47a5cce81c0c5db621290363720b5ebbe42c.tar.gz
chromium_src-d4bf47a5cce81c0c5db621290363720b5ebbe42c.tar.bz2
MacViews: Adds NativeWidgetMac and gets views target compiling on Mac.
This is a minimal amount to get the `views` target compiling on Mac. It adds an implementation of NativeWidgetMac that spews NOTIMPLEMENTED(). So, nothing works yet, but this gives an FYI builder something to chew on to catch regressions in things ported so far. BUG=366007 Review URL: https://codereview.chromium.org/249113002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/events')
-rw-r--r--ui/events/events.gyp1
-rw-r--r--ui/events/gestures/gesture_recognizer_impl_mac.cc64
2 files changed, 65 insertions, 0 deletions
diff --git a/ui/events/events.gyp b/ui/events/events.gyp
index f3beac5..111e17c 100644
--- a/ui/events/events.gyp
+++ b/ui/events/events.gyp
@@ -117,6 +117,7 @@
'gestures/gesture_recognizer.h',
'gestures/gesture_recognizer_impl.cc',
'gestures/gesture_recognizer_impl.h',
+ 'gestures/gesture_recognizer_impl_mac.cc',
'gestures/gesture_sequence.cc',
'gestures/gesture_sequence.h',
'gestures/gesture_types.h',
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 0000000..46dde02
--- /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