From c868a5251e1251a5b555c181ffb9e6804dc3e84f Mon Sep 17 00:00:00 2001 From: "finnur@chromium.org" <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Thu, 1 Apr 2010 02:10:42 +0000 Subject: Wire up Ctrl+Enter for Find on ToolkitViews to match GTK. BUG=38366 TEST=Find a link, press Ctrl+Enter. Find box should close chrome should navigate the link. Review URL: http://codereview.chromium.org/1562006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43308 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/dropdown_bar_host.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'chrome/browser/views/dropdown_bar_host.h') diff --git a/chrome/browser/views/dropdown_bar_host.h b/chrome/browser/views/dropdown_bar_host.h index 2528e7f..e77ffa5 100644 --- a/chrome/browser/views/dropdown_bar_host.h +++ b/chrome/browser/views/dropdown_bar_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -88,13 +88,15 @@ class DropdownBarHost : public views::AcceleratorTarget, // Returns the browser view that the dropdown belongs to. BrowserView* browser_view() const { return browser_view_; } - // Registers this class as the handler for when Escape is pressed. We will - // unregister once we loose focus. See also: SetFocusChangeListener(). - void RegisterEscAccelerator(); + // Registers this class as the handler for when Escape is pressed. Once we + // loose focus we will unregister Escape and (any accelerators the derived + // classes registers by using overrides of RegisterAccelerators). See also: + // SetFocusChangeListener(). + virtual void RegisterAccelerators(); - // When we loose focus, we unregister the handler for Escape. See - // also: SetFocusChangeListener(). - void UnregisterEscAccelerator(); + // When we loose focus, we unregister all accelerator handlers. See also: + // SetFocusChangeListener(). + virtual void UnregisterAccelerators(); protected: // Returns the dropdown bar view. -- cgit v1.1