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

Side by Side Diff: content/browser/renderer_host/input/touch_emulator.h

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/renderer_host/input/touch_emulator_client.h" 9 #include "content/browser/renderer_host/input/touch_emulator_client.h"
10 #include "content/common/cursors/webcursor.h" 10 #include "content/common/cursors/webcursor.h"
(...skipping 12 matching lines...) Expand all
23 ~TouchEmulator() override; 23 ~TouchEmulator() override;
24 24
25 void Enable(ui::GestureProviderConfigType config_type); 25 void Enable(ui::GestureProviderConfigType config_type);
26 void Disable(); 26 void Disable();
27 27
28 // See GestureProvider::SetDoubleTapSupportForPageEnabled. 28 // See GestureProvider::SetDoubleTapSupportForPageEnabled.
29 void SetDoubleTapSupportForPageEnabled(bool enabled); 29 void SetDoubleTapSupportForPageEnabled(bool enabled);
30 30
31 // Note that TouchEmulator should always listen to touch events and their acks 31 // Note that TouchEmulator should always listen to touch events and their acks
32 // (even in disabled state) to track native stream presence. 32 // (even in disabled state) to track native stream presence.
33 bool enabled() const { return gesture_provider_; } 33 bool enabled() const { return !!gesture_provider_; }
34 34
35 // Returns |true| if the event was consumed. Consumed event should not 35 // Returns |true| if the event was consumed. Consumed event should not
36 // propagate any further. 36 // propagate any further.
37 // TODO(dgozman): maybe pass latency info together with events. 37 // TODO(dgozman): maybe pass latency info together with events.
38 bool HandleMouseEvent(const blink::WebMouseEvent& event); 38 bool HandleMouseEvent(const blink::WebMouseEvent& event);
39 bool HandleMouseWheelEvent(const blink::WebMouseWheelEvent& event); 39 bool HandleMouseWheelEvent(const blink::WebMouseWheelEvent& event);
40 bool HandleKeyboardEvent(const blink::WebKeyboardEvent& event); 40 bool HandleKeyboardEvent(const blink::WebKeyboardEvent& event);
41 bool HandleTouchEvent(const blink::WebTouchEvent& event); 41 bool HandleTouchEvent(const blink::WebTouchEvent& event);
42 42
43 // Returns |true| if the event ack was consumed. Consumed ack should not 43 // Returns |true| if the event ack was consumed. Consumed ack should not
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // The cumulative scale change from the start of pinch gesture. 113 // The cumulative scale change from the start of pinch gesture.
114 float pinch_scale_; 114 float pinch_scale_;
115 bool pinch_gesture_active_; 115 bool pinch_gesture_active_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(TouchEmulator); 117 DISALLOW_COPY_AND_ASSIGN(TouchEmulator);
118 }; 118 };
119 119
120 } // namespace content 120 } // namespace content
121 121
122 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_ 122 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698