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

Unified Diff: content/browser/renderer_host/web_input_event_aura.cc

Issue 789153004: Fix Chromoting under Ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DISALLOW_COPY_AND_ASSIGN Created 6 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/web_input_event_aura.cc
diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc
index 7dfbd9a184ba80ad9d188ab73f01c61fc3d05476..c4a766a8d1e3191c298ce3e329fbb64892bbec20 100644
--- a/content/browser/renderer_host/web_input_event_aura.cc
+++ b/content/browser/renderer_host/web_input_event_aura.cc
@@ -9,10 +9,7 @@
#include "ui/aura/window.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
-
-#if defined(USE_X11) || defined(USE_OZONE)
#include "ui/events/keycodes/dom4/keycode_converter.h"
-#endif
namespace content {
@@ -26,7 +23,7 @@ blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent(
blink::WebGestureEvent MakeWebGestureEventFromNativeEvent(
const base::NativeEvent& native_event);
#endif
-#if defined(USE_X11) || defined(USE_OZONE)
+
blink::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent(
const ui::KeyEvent& event) {
blink::WebKeyboardEvent webkit_event;
@@ -119,8 +116,6 @@ blink::WebGestureEvent MakeWebGestureEventFromAuraEvent(
return webkit_event;
}
-#endif
-
blink::WebMouseEvent MakeWebMouseEventFromAuraEvent(
const ui::MouseEvent& event);
blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
@@ -231,14 +226,12 @@ blink::WebKeyboardEvent MakeWebKeyboardEvent(const ui::KeyEvent& event) {
// is_char() == true. We need to pass the ui::KeyEvent to the X11 function
// to detect this case so the right event type can be constructed.
#if defined(OS_WIN)
- if (!event.HasNativeEvent())
- return blink::WebKeyboardEvent();
-
- // Key events require no translation by the aura system.
- return MakeWebKeyboardEventFromNativeEvent(event.native_event());
-#else
- return MakeWebKeyboardEventFromAuraEvent(event);
+ if (event.HasNativeEvent()) {
+ // Key events require no translation by the aura system.
+ return MakeWebKeyboardEventFromNativeEvent(event.native_event());
+ }
#endif
+ return MakeWebKeyboardEventFromAuraEvent(event);
}
blink::WebGestureEvent MakeWebGestureEvent(const ui::GestureEvent& event) {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698