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

Unified Diff: chrome/browser/views/find_bar_win.cc

Issue 62129: Find should allow keyboard scrolling while Find bar has focus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « chrome/browser/views/find_bar_win.h ('k') | chrome/browser/views/input_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/find_bar_win.cc
===================================================================
--- chrome/browser/views/find_bar_win.cc (revision 13375)
+++ chrome/browser/views/find_bar_win.cc (working copy)
@@ -232,6 +232,24 @@
view_->SchedulePaint();
}
+void FindBarWin::ForwardKeystrokeToWebpage(TCHAR key) {
+ WebContents* contents = find_bar_controller_->web_contents();
+ if (!contents)
+ return;
+
+ RenderViewHost* render_view_host = contents->render_view_host();
+
+ // 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->ClearFocusedNode();
+
+ HWND hwnd = contents->GetContentNativeView();
+ render_view_host->ForwardKeyboardEvent(
+ NativeWebKeyboardEvent(hwnd, WM_KEYDOWN, key, 0));
+ render_view_host->ForwardKeyboardEvent(
+ NativeWebKeyboardEvent(hwnd, WM_KEYUP, key, 0));
+}
+
////////////////////////////////////////////////////////////////////////////////
// FindBarWin, views::WidgetWin implementation:
« no previous file with comments | « chrome/browser/views/find_bar_win.h ('k') | chrome/browser/views/input_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698