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

Unified Diff: trunk/src/content/browser/renderer_host/input/synthetic_gesture.cc

Issue 79143002: Revert 236254 "Replace old with new synthetic gesture framework." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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: trunk/src/content/browser/renderer_host/input/synthetic_gesture.cc
===================================================================
--- trunk/src/content/browser/renderer_host/input/synthetic_gesture.cc (revision 236262)
+++ trunk/src/content/browser/renderer_host/input/synthetic_gesture.cc (working copy)
@@ -1,41 +0,0 @@
-// Copyright 2013 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 "content/browser/renderer_host/input/synthetic_gesture.h"
-
-#include "content/browser/renderer_host/input/synthetic_gesture_target.h"
-#include "content/browser/renderer_host/input/synthetic_pinch_gesture.h"
-#include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h"
-
-namespace content {
-namespace {
-
-template <typename GestureType, typename GestureParamsType>
-static scoped_ptr<SyntheticGesture> CreateGesture(
- const SyntheticGestureParams& gesture_params) {
- return scoped_ptr<SyntheticGesture>(
- new GestureType(*GestureParamsType::Cast(&gesture_params)));
-}
-
-} // namespace
-
-SyntheticGesture::SyntheticGesture() {}
-
-SyntheticGesture::~SyntheticGesture() {}
-
-scoped_ptr<SyntheticGesture> SyntheticGesture::Create(
- const SyntheticGestureParams& gesture_params) {
- switch (gesture_params.GetGestureType()) {
- case SyntheticGestureParams::SMOOTH_SCROLL_GESTURE:
- return CreateGesture<SyntheticSmoothScrollGesture,
- SyntheticSmoothScrollGestureParams>(gesture_params);
- case SyntheticGestureParams::PINCH_GESTURE:
- return CreateGesture<SyntheticPinchGesture,
- SyntheticPinchGestureParams>(gesture_params);
- }
- NOTREACHED() << "Invalid synthetic gesture type";
- return scoped_ptr<SyntheticGesture>();
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698