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

Unified Diff: components/test_runner/test_plugin.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/test_runner/test_plugin.cc
diff --git a/components/test_runner/test_plugin.cc b/components/test_runner/test_plugin.cc
index 681838447287bd8237ccdd326aa3803faf1c6308..27b0e799ccf380f53622c243025012304201fd34 100644
--- a/components/test_runner/test_plugin.cc
+++ b/components/test_runner/test_plugin.cc
@@ -79,16 +79,16 @@ void PrintTouchList(WebTestDelegate* delegate,
void PrintEventDetails(WebTestDelegate* delegate,
const blink::WebInputEvent& event) {
- if (blink::WebInputEvent::isTouchEventType(event.type)) {
+ if (blink::WebInputEvent::isTouchEventType(event.type())) {
const blink::WebTouchEvent& touch =
static_cast<const blink::WebTouchEvent&>(event);
PrintTouchList(delegate, touch.touches, touch.touchesLength);
- } else if (blink::WebInputEvent::isMouseEventType(event.type) ||
- event.type == blink::WebInputEvent::MouseWheel) {
+ } else if (blink::WebInputEvent::isMouseEventType(event.type()) ||
+ event.type() == blink::WebInputEvent::MouseWheel) {
const blink::WebMouseEvent& mouse =
static_cast<const blink::WebMouseEvent&>(event);
delegate->PrintMessage(base::StringPrintf("* %d, %d\n", mouse.x, mouse.y));
- } else if (blink::WebInputEvent::isGestureEventType(event.type)) {
+ } else if (blink::WebInputEvent::isGestureEventType(event.type())) {
const blink::WebGestureEvent& gesture =
static_cast<const blink::WebGestureEvent&>(event);
delegate->PrintMessage(
@@ -538,7 +538,7 @@ GLuint TestPlugin::LoadProgram(const std::string& vertex_source,
blink::WebInputEventResult TestPlugin::handleInputEvent(
const blink::WebInputEvent& event,
blink::WebCursorInfo& info) {
- const char* event_name = blink::WebInputEvent::GetName(event.type);
+ const char* event_name = blink::WebInputEvent::GetName(event.type());
if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined"))
event_name = "unknown";
delegate_->PrintMessage(std::string("Plugin received event: ") + event_name +

Powered by Google App Engine
This is Rietveld 408576698