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

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

Issue 9402018: Experimental Extension Keybinding (first cut). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/ui/views/dropdown_bar_host.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_host.cc
===================================================================
--- chrome/browser/ui/views/find_bar_host.cc (revision 123221)
+++ chrome/browser/ui/views/find_bar_host.cc (working copy)
@@ -176,16 +176,18 @@
if (key == ui::VKEY_RETURN && accelerator.IsCtrlDown()) {
// Ctrl+Enter closes the Find session and navigates any link that is active.
find_bar_controller_->EndFindSession(FindBarController::kActivateSelection);
+ return true;
} else if (key == ui::VKEY_ESCAPE) {
// This will end the Find session and hide the window, causing it to loose
// focus and in the process unregister us as the handler for the Escape
// accelerator through the OnWillChangeFocus event.
find_bar_controller_->EndFindSession(FindBarController::kKeepSelection);
+ return true;
} else {
NOTREACHED() << "Unknown accelerator";
}
- return true;
+ return false;
}
bool FindBarHost::CanHandleAccelerators() const {
@@ -308,7 +310,8 @@
// Register for Ctrl+Return.
ui::Accelerator escape(ui::VKEY_RETURN, false, true, false);
- focus_manager()->RegisterAccelerator(escape, this);
+ focus_manager()->RegisterAccelerator(
+ escape, ui::AcceleratorManager::kNormalPriority, this);
}
void FindBarHost::UnregisterAccelerators() {
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.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