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

Side by Side 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: respond to comments, provide a stub for GestureRecognizer 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/macros.h"
6 #include "ui/events/gestures/gesture_recognizer.h"
7
8 namespace ui {
9
10 namespace {
11
12 // Stub implementation of GestureRecognizer for Mac. Currently only serves to
13 // provide a no-op implementation of TransferEventsTo().
14 class GestureRecognizerImplMac : public GestureRecognizer {
15 public:
16 GestureRecognizerImplMac() {}
17 virtual ~GestureRecognizerImplMac() {}
18
19 private:
20 virtual Gestures* ProcessTouchEventForGesture(
21 const TouchEvent& event,
22 ui::EventResult result,
23 GestureConsumer* consumer) OVERRIDE {
24 return NULL;
25 }
26 virtual bool CleanupStateForConsumer(GestureConsumer* consumer) OVERRIDE {
27 return false;
28 }
29 virtual GestureConsumer* GetTouchLockedTarget(
30 const TouchEvent& event) OVERRIDE {
31 return NULL;
32 }
33 virtual GestureConsumer* GetTargetForGestureEvent(
34 const GestureEvent& event) OVERRIDE {
35 return NULL;
36 }
37 virtual GestureConsumer* GetTargetForLocation(const gfx::PointF& location,
38 int source_device_id) OVERRIDE {
39 return NULL;
40 }
41 virtual void TransferEventsTo(GestureConsumer* current_consumer,
42 GestureConsumer* new_consumer) OVERRIDE {}
43 virtual bool GetLastTouchPointForTarget(GestureConsumer* consumer,
44 gfx::PointF* point) OVERRIDE {
45 return false;
46 }
47 virtual bool CancelActiveTouches(GestureConsumer* consumer) OVERRIDE {
48 return false;
49 }
50 virtual void AddGestureEventHelper(GestureEventHelper* helper) OVERRIDE {}
51 virtual void RemoveGestureEventHelper(GestureEventHelper* helper) OVERRIDE {}
52
53 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMac);
54 };
55
56 } // namespace
57
58 // static
59 GestureRecognizer* GestureRecognizer::Get() {
60 CR_DEFINE_STATIC_LOCAL(GestureRecognizerImplMac, instance, ());
61 return &instance;
62 }
63
64 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/events.gyp ('k') | ui/gfx/native_widget_types.h » ('j') | ui/views/views.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698