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

Unified Diff: chrome/browser/ui/views/find_bar_host.cc

Issue 2641403002: [refactor] - Move IsFocusedElementEditable() and ClearFocusedElement() from RenderViewHost to WebCo… (Closed)
Patch Set: Addressed sky@'s comment Created 3 years, 11 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: chrome/browser/ui/views/find_bar_host.cc
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 3554aed1f2788d8da115bc8ec19ef235581fcc94..5f51653a171ed0718a7f118a6ce0c0960462565b 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -58,13 +58,11 @@ bool FindBarHost::MaybeForwardKeyEventToWebpage(
if (!contents)
return false;
- content::RenderViewHost* render_view_host = contents->GetRenderViewHost();
-
// Make sure we don't have a text field element interfering with keyboard
// input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom".
- render_view_host->ClearFocusedElement();
+ contents->ClearFocusedElement();
NativeWebKeyboardEvent event(key_event);
- render_view_host->GetWidget()->ForwardKeyboardEvent(event);
+ contents->GetRenderViewHost()->GetWidget()->ForwardKeyboardEvent(event);
return true;
}
« no previous file with comments | « chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698