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

Unified Diff: chrome/browser/cocoa/find_bar_cocoa_controller.mm

Issue 204006: [Mac] Make the pageup, Shift-pageup, and Option-Shift-pageup keys scroll the ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/find_bar_cocoa_controller.mm
===================================================================
--- chrome/browser/cocoa/find_bar_cocoa_controller.mm (revision 26244)
+++ chrome/browser/cocoa/find_bar_cocoa_controller.mm (working copy)
@@ -113,6 +113,28 @@
}
return YES;
+ } else if (command == @selector(pageUp:) ||
+ command == @selector(pageUpAndModifySelection:) ||
+ command == @selector(scrollPageUp:) ||
+ command == @selector(pageDown:) ||
+ command == @selector(pageDownAndModifySelection:) ||
+ command == @selector(scrollPageDown:)) {
+ TabContents* contents =
+ findBarBridge_->GetFindBarController()->tab_contents();
+ if (!contents)
+ return NO;
+
+ // Sanity-check to make sure we got a keyboard event.
+ NSEvent* event = [NSApp currentEvent];
+ if ([event type] != NSKeyDown && [event type] != NSKeyUp)
+ return NO;
+
+ // Forward the event to the renderer.
+ // TODO(rohitrao): Should this call -[BaseView keyEvent:]? Is there code in
+ // that function that we want to keep or avoid?
+ RenderViewHost* render_view_host = contents->render_view_host();
+ render_view_host->ForwardKeyboardEvent(NativeWebKeyboardEvent(event));
+ return YES;
}
return NO;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698