summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_window.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 17:33:13 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 17:33:13 +0000
commit1a38062ae062156d9074bfdd90effb8f09ff6dc3 (patch)
treea9b2b36510dc612a11cf31637a234fa887f26325 /chrome/browser/browser_window.h
parent32e17a58405c129e4ad95ebd6786e24482a87394 (diff)
downloadchromium_src-1a38062ae062156d9074bfdd90effb8f09ff6dc3.zip
chromium_src-1a38062ae062156d9074bfdd90effb8f09ff6dc3.tar.gz
chromium_src-1a38062ae062156d9074bfdd90effb8f09ff6dc3.tar.bz2
When internal functions try to focus the location bar, check whether it's focusable, and clear the focus if it's not. This shouldn't kick in in any cases today (I don't think), but it will matter in fullscreen mode, where creating a new tab should not attempt to focus the (unfocusable) location bar, but should not do nothing either, since these leaves focus in a hosed state.
There are other choices here. I could make View::RequestFocus() try and clear the focus if the view is not focusable. That seems likely to cause side-effects unless I restore a lot of the calls to IsFocusable() that I previously removed. I also don't know whether sticking this on BrowserWindow was the right approach; if there's a better spot architecturally, speak up. Review URL: http://codereview.chromium.org/21368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_window.h')
-rw-r--r--chrome/browser/browser_window.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h
index 5a43bb8..7491ee0 100644
--- a/chrome/browser/browser_window.h
+++ b/chrome/browser/browser_window.h
@@ -88,6 +88,10 @@ class BrowserWindow {
// Returns the location bar.
virtual LocationBar* GetLocationBar() const = 0;
+ // Tries to focus the location bar. Clears the window focus (to avoid
+ // inconsistent state) if this fails.
+ virtual void SetFocusToLocationBar() = 0;
+
// Informs the view whether or not a load is in progress for the current tab.
// The view can use this notification to update the go/stop button.
virtual void UpdateStopGoState(bool is_loading) = 0;