diff options
author | samarth@chromium.org <samarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 00:46:26 +0000 |
---|---|---|
committer | samarth@chromium.org <samarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 00:46:26 +0000 |
commit | 0d0b4a4e77be5bcd40895f814241a1ea233f1a22 (patch) | |
tree | 9af16b951ba4b9a9b2cd72c9e1b43c0e61989f57 /chrome/browser/ui/browser_instant_controller.cc | |
parent | 41bb06f20858e038aa9fa02be5de415b757bc113 (diff) | |
download | chromium_src-0d0b4a4e77be5bcd40895f814241a1ea233f1a22.zip chromium_src-0d0b4a4e77be5bcd40895f814241a1ea233f1a22.tar.gz chromium_src-0d0b4a4e77be5bcd40895f814241a1ea233f1a22.tar.bz2 |
InstantExtended: notify Instant NTP when user input starts and ends.
BUG=248164
R=jered@chromium.org, palmer@chromium.org
Review URL: https://codereview.chromium.org/15951013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_instant_controller.cc')
-rw-r--r-- | chrome/browser/ui/browser_instant_controller.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc index cacd42f..008753e 100644 --- a/chrome/browser/ui/browser_instant_controller.cc +++ b/chrome/browser/ui/browser_instant_controller.cc @@ -211,6 +211,14 @@ void BrowserInstantController::FocusOmnibox(bool caret_visibility) { GetLocationEntry(); omnibox_view->SetFocus(); omnibox_view->model()->SetCaretVisibility(caret_visibility); + if (!caret_visibility) { + // If the user clicked on the fakebox, any text already in the omnibox + // should get cleared when they start typing. Selecting all the existing + // text is a convenient way to accomplish this. It also gives a slight + // visual cue to users who really understand selection state about what will + // happen if they start typing. + omnibox_view->SelectAll(false); + } } content::WebContents* BrowserInstantController::GetActiveWebContents() const { |