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

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

Issue 427803002: DevTools: nits: introduce a handy asBool(bool*) and use across agents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 5 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
« no previous file with comments | « Source/core/inspector/InspectorHeapProfilerAgent.cpp ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorInputAgent.cpp
diff --git a/Source/core/inspector/InspectorInputAgent.cpp b/Source/core/inspector/InspectorInputAgent.cpp
index 66c62de005eb414475915a6f32ec8c1b685ee036..8927f1ce040c947bc44518fc7a5add41a0c7b319 100644
--- a/Source/core/inspector/InspectorInputAgent.cpp
+++ b/Source/core/inspector/InspectorInputAgent.cpp
@@ -122,9 +122,9 @@ void InspectorInputAgent::dispatchKeyEvent(ErrorString* error, const String& typ
keyIdentifier ? *keyIdentifier : "",
windowsVirtualKeyCode ? *windowsVirtualKeyCode : 0,
nativeVirtualKeyCode ? *nativeVirtualKeyCode : 0,
- autoRepeat ? *autoRepeat : false,
- isKeypad ? *isKeypad : false,
- isSystemKey ? *isSystemKey : false,
+ asBool(autoRepeat),
+ asBool(isKeypad),
+ asBool(isSystemKey),
static_cast<PlatformEvent::Modifiers>(modifiers ? *modifiers : 0),
timestamp ? *timestamp : currentTime());
m_client->dispatchKeyEvent(event);
@@ -132,7 +132,7 @@ void InspectorInputAgent::dispatchKeyEvent(ErrorString* error, const String& typ
void InspectorInputAgent::dispatchMouseEvent(ErrorString* error, const String& type, int x, int y, const int* modifiers, const double* timestamp, const String* button, const int* clickCount, const bool* deviceSpace)
{
- if (deviceSpace && *deviceSpace) {
+ if (asBool(deviceSpace)) {
*error = "Internal error: events with device coordinates should be processed on the embedder level.";
return;
}
« no previous file with comments | « Source/core/inspector/InspectorHeapProfilerAgent.cpp ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698