diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 17:59:10 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 17:59:10 +0000 |
commit | ebdda909a0b5d22e7e8ec4546a05751336385ab9 (patch) | |
tree | 8fb60d463815b6ba0be14ee9638b04b22d102462 /chrome/browser | |
parent | a44dd4b92d9bce78167f8afbb7b023219e9a7c0d (diff) | |
download | chromium_src-ebdda909a0b5d22e7e8ec4546a05751336385ab9.zip chromium_src-ebdda909a0b5d22e7e8ec4546a05751336385ab9.tar.gz chromium_src-ebdda909a0b5d22e7e8ec4546a05751336385ab9.tar.bz2 |
ChromeOS: Create new tab after fullscreen is really canceled when search key is pressed.
ToggleFullscreenMode is asynchronous, so we need to wait for
next event cycle before creating new tab and set focus to omni box.
BUG=chromium-os:6591
TEST=manual: open non NTP page, go into fullscreen then hit search key. Result: omnibox should have focus.
Review URL: http://codereview.chromium.org/3956004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 85e63cc..32f7f97 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1475,8 +1475,15 @@ void Browser::Search() { } // Exit fullscreen to show omnibox. - if (window_->IsFullscreen()) + if (window_->IsFullscreen()) { ToggleFullscreenMode(); + // ToggleFullscreenMode is asynchronous, so we don't have omnibox + // visible at this point. Wait for next event cycle which toggles + // the visibility of omnibox before creating new tab. + MessageLoop::current()->PostTask( + FROM_HERE, method_factory_.NewRunnableMethod(&Browser::Search)); + return; + } // Otherwise just open it. NewTab(); |