From 2c1c8458b74fc397776533f1a1212db5513fbd96 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Fri, 12 Feb 2010 23:11:42 +0000 Subject: Fix the problem where accelerator key was not working in compact navbar. * Explicitly set the focus ownership to FocusManager when AutocompleteEditView gets focus. * Close the compact location bar on ESC key press, or when new page is opened. * Apply the same fix to main menu's AutocompleteEditView * Adjust layout of compact location bar. BUG=32853 TEST=none Review URL: http://codereview.chromium.org/593071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38970 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/dropdown_bar_host.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'chrome/browser/views') diff --git a/chrome/browser/views/dropdown_bar_host.h b/chrome/browser/views/dropdown_bar_host.h index 8b71b12..160e091 100644 --- a/chrome/browser/views/dropdown_bar_host.h +++ b/chrome/browser/views/dropdown_bar_host.h @@ -88,6 +88,14 @@ 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(); + + // When we loose focus, we unregister the handler for Escape. See + // also: SetFocusChangeListener(). + void UnregisterEscAccelerator(); + protected: // Returns the dropdown bar view. DropdownBarView* view() const { return view_; } @@ -125,14 +133,6 @@ class DropdownBarHost : public views::AcceleratorTarget, // truncated to prevent from drawing onto Chrome's window border. void UpdateWindowEdges(const gfx::Rect& new_pos); - // Registers this class as the handler for when Escape is pressed. We will - // unregister once we loose focus. See also: SetFocusChangeListener(). - void RegisterEscAccelerator(); - - // When we loose focus, we unregister the handler for Escape. See - // also: SetFocusChangeListener(). - void UnregisterEscAccelerator(); - // Creates and returns the native Widget. views::Widget* CreateHost(); -- cgit v1.1