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

Side by Side Diff: content/browser/renderer_host/input/synthetic_pointer_driver.cc

Issue 2478423002: Rename SyntheticPointer to SyntheticPointerDriver (Closed)
Patch Set: rename Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/input/synthetic_pointer.h" 5 #include "content/browser/renderer_host/input/synthetic_pointer_driver.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/browser/renderer_host/input/synthetic_mouse_pointer.h" 8 #include "content/browser/renderer_host/input/synthetic_mouse_driver.h"
9 #include "content/browser/renderer_host/input/synthetic_touch_pointer.h" 9 #include "content/browser/renderer_host/input/synthetic_touch_driver.h"
10 #include "third_party/WebKit/public/platform/WebInputEvent.h"
11 10
12 namespace content { 11 namespace content {
13 12
14 SyntheticPointer::SyntheticPointer() {} 13 SyntheticPointerDriver::SyntheticPointerDriver() {}
15 SyntheticPointer::~SyntheticPointer() {} 14 SyntheticPointerDriver::~SyntheticPointerDriver() {}
16 15
17 // static 16 // static
18 std::unique_ptr<SyntheticPointer> SyntheticPointer::Create( 17 std::unique_ptr<SyntheticPointerDriver> SyntheticPointerDriver::Create(
19 SyntheticGestureParams::GestureSourceType gesture_source_type) { 18 SyntheticGestureParams::GestureSourceType gesture_source_type) {
20 if (gesture_source_type == SyntheticGestureParams::TOUCH_INPUT) { 19 if (gesture_source_type == SyntheticGestureParams::TOUCH_INPUT) {
21 return base::MakeUnique<SyntheticTouchPointer>(); 20 return base::MakeUnique<SyntheticTouchDriver>();
22 } else if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { 21 } else if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) {
23 return base::MakeUnique<SyntheticMousePointer>(); 22 return base::MakeUnique<SyntheticMouseDriver>();
24 } else { 23 } else {
25 NOTREACHED() << "Invalid gesture source type"; 24 NOTREACHED() << "Invalid gesture source type";
26 return std::unique_ptr<SyntheticPointer>(); 25 return std::unique_ptr<SyntheticPointerDriver>();
27 } 26 }
28 } 27 }
29 28
30 // static 29 // static
31 double SyntheticPointer::ConvertTimestampToSeconds( 30 double SyntheticPointerDriver::ConvertTimestampToSeconds(
32 const base::TimeTicks& timestamp) { 31 const base::TimeTicks& timestamp) {
33 return (timestamp - base::TimeTicks()).InSecondsF(); 32 return (timestamp - base::TimeTicks()).InSecondsF();
34 } 33 }
35 34
36 } // namespace content 35 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698