summaryrefslogtreecommitdiffstats
path: root/chrome/views/focus_manager.h
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 03:14:11 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 03:14:11 +0000
commite5d478012a5ee0765d35fd62e5090d07f5ae7dde (patch)
treecd5a7a4113961f155df38cafae9f807707ba5886 /chrome/views/focus_manager.h
parente7b055b2192125a85b07bcacca312d01357f9e96 (diff)
downloadchromium_src-e5d478012a5ee0765d35fd62e5090d07f5ae7dde.zip
chromium_src-e5d478012a5ee0765d35fd62e5090d07f5ae7dde.tar.gz
chromium_src-e5d478012a5ee0765d35fd62e5090d07f5ae7dde.tar.bz2
Fix 1303709: Crash: Switching between tabs with a Find box open on both tabs nulls the Esc handler
This is a temporary fix until we fix this properly: http://b/issue?id=1307173 This change makes sure that when we Register as the Esc handler, we store who was registered at the time the Find box was opened for the first time (as opposed to always restoring to what RegisterAccelerator tells us was registered before us). Also, if we have already been unregistered, we don't restore the old value. This prevents us from restoring to another tab's handler when the tab registering gets focus notification before the tab *un*registering receives blur notification (through FocusWillChange). BUG=1303709 TEST=Manually perform the steps listed in the bug and make sure it doesn't crash. Also make sure that the browser's Esc handler still works after closing the Find box. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/focus_manager.h')
-rw-r--r--chrome/views/focus_manager.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/views/focus_manager.h b/chrome/views/focus_manager.h
index 0537e5c..4b99420 100644
--- a/chrome/views/focus_manager.h
+++ b/chrome/views/focus_manager.h
@@ -292,6 +292,13 @@ class FocusManager : public NotificationObserver {
void AddFocusChangeListener(FocusChangeListener* listener);
void RemoveFocusChangeListener(FocusChangeListener* listener);
+ // Returns the AcceleratorTarget that should be activated for the specified
+ // keyboard accelerator, or NULL if no view is registered for that keyboard
+ // accelerator.
+ // TODO(finnur): http://b/1307173 Make this private once the bug is fixed.
+ AcceleratorTarget* GetTargetForAccelerator(
+ const Accelerator& accelerator) const;
+
private:
explicit FocusManager(HWND root, RootView* root_view);
~FocusManager();
@@ -311,12 +318,6 @@ class FocusManager : public NotificationObserver {
bool reverse,
bool dont_loop);
- // Returns the AcceleratorTarget that should be activated for the specified
- // keyboard accelerator, or NULL if no view is registered for that keyboard
- // accelerator.
- AcceleratorTarget* GetTargetForAccelerator(
- const Accelerator& accelerator) const;
-
// The RootView of the window associated with this FocusManager.
RootView* top_root_view_;