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

Unified Diff: mojo/converters/blink/blink_input_events_type_converters.cc

Issue 1484013003: mustash: Implement basic input event routing in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed dependency for unit test Created 5 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: mojo/converters/blink/blink_input_events_type_converters.cc
diff --git a/components/html_viewer/blink_input_events_type_converters.cc b/mojo/converters/blink/blink_input_events_type_converters.cc
similarity index 96%
rename from components/html_viewer/blink_input_events_type_converters.cc
rename to mojo/converters/blink/blink_input_events_type_converters.cc
index 5b36a77946ec21d81db0e8435c355534adec59b5..eca9face9876bfb1427c2a1996eab351338830de 100644
--- a/components/html_viewer/blink_input_events_type_converters.cc
+++ b/mojo/converters/blink/blink_input_events_type_converters.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/html_viewer/blink_input_events_type_converters.h"
+#include "mojo/converters/blink/blink_input_events_type_converters.h"
#include "base/logging.h"
#include "base/time/time.h"
@@ -117,8 +117,9 @@ scoped_ptr<blink::WebInputEvent> BuildWebKeyboardEvent(
switch (event->action) {
case mus::mojom::EVENT_TYPE_KEY_PRESSED:
- web_event->type = event->key_data->is_char ? blink::WebInputEvent::Char :
- blink::WebInputEvent::RawKeyDown;
+ web_event->type = event->key_data->is_char
+ ? blink::WebInputEvent::Char
+ : blink::WebInputEvent::RawKeyDown;
break;
case mus::mojom::EVENT_TYPE_KEY_RELEASED:
web_event->type = blink::WebInputEvent::KeyUp;
@@ -204,7 +205,8 @@ TypeConverter<scoped_ptr<blink::WebInputEvent>, mus::mojom::EventPtr>::Convert(
if (event->pointer_data &&
event->pointer_data->kind == mus::mojom::POINTER_KIND_MOUSE) {
return BuildWebMouseEventFrom(event);
- }
+ }
+ return nullptr;
case mus::mojom::EVENT_TYPE_WHEEL:
return BuildWebMouseWheelEventFrom(event);
case mus::mojom::EVENT_TYPE_KEY_PRESSED:
« no previous file with comments | « mojo/converters/blink/blink_input_events_type_converters.h ('k') | mojo/converters/blink/mojo_blink_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698