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

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

Issue 2775553002: Adds the ability for WebContentsDelegate to decide if event should be updated (Closed)
Patch Set: Fix compile Created 3 years, 9 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: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 391cc672798b32d3a790ecfc6083fc76802e2543..987e54227236641a9d2ec1cdfd8e19f5b8801b8b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1230,7 +1230,8 @@ void RenderWidgetHostViewAura::InsertChar(const ui::KeyEvent& event) {
if (host_ && (event_handler_->accept_return_character() ||
event.GetCharacter() != ui::VKEY_RETURN)) {
// Send a blink::WebInputEvent::Char event to |host_|.
- ForwardKeyboardEvent(NativeWebKeyboardEvent(event, event.GetCharacter()));
+ ForwardKeyboardEvent(NativeWebKeyboardEvent(event, event.GetCharacter()),
+ nullptr);
}
}
@@ -2223,7 +2224,8 @@ void RenderWidgetHostViewAura::DetachFromInputMethod() {
}
void RenderWidgetHostViewAura::ForwardKeyboardEvent(
- const NativeWebKeyboardEvent& event) {
+ const NativeWebKeyboardEvent& event,
+ bool* update_event) {
RenderWidgetHostImpl* target_host = host_;
// If there are multiple widgets on the page (such as when there are
@@ -2249,12 +2251,13 @@ void RenderWidgetHostViewAura::ForwardKeyboardEvent(
it->argument()));
}
- target_host->ForwardKeyboardEventWithCommands(event, &edit_commands);
+ target_host->ForwardKeyboardEventWithCommands(event, &edit_commands,
+ update_event);
return;
}
#endif
- target_host->ForwardKeyboardEvent(event);
+ target_host->ForwardKeyboardEventWithCommands(event, nullptr, update_event);
}
void RenderWidgetHostViewAura::CreateSelectionController() {

Powered by Google App Engine
This is Rietveld 408576698