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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp

Issue 1730383003: DevTools: consistently use Maybe for optional values in the protocol generator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
index b709a77d52e9db8b31fa603b807c905b1fbbed9f..cc82320d33c5112d7315d0bc623cb3b1bdbec7cb 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
@@ -118,7 +118,7 @@ InspectorInputAgent::~InspectorInputAgent()
{
}
-void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const protocol::OptionalValue<int>& modifiers, const protocol::OptionalValue<double>& timestamp)
+void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const protocol::Maybe<int>& modifiers, const protocol::Maybe<double>& timestamp)
{
PlatformEvent::Type convertedType;
if (type == "touchStart") {
@@ -132,9 +132,9 @@ void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& t
return;
}
- unsigned convertedModifiers = GetEventModifiers(modifiers.get(0));
+ unsigned convertedModifiers = GetEventModifiers(modifiers.fromMaybe(0));
- SyntheticInspectorTouchEvent event(convertedType, convertedModifiers, timestamp.get(currentTime()));
+ SyntheticInspectorTouchEvent event(convertedType, convertedModifiers, timestamp.fromMaybe(currentTime()));
int autoId = 0;
for (size_t i = 0; i < touchPoints->length(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698