diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-11 05:20:42 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-11 05:20:42 +0000 |
commit | 3c11b5b02cf32fb578e0854cd6403a9fb31ba119 (patch) | |
tree | 5f03a37f991ef7fee9e159c00bd131bb1b9cc4c0 /chrome/browser/autocomplete/autocomplete_edit_view.h | |
parent | b905fda80e430081c47243bdf93afaf2fa4dd1fd (diff) | |
download | chromium_src-3c11b5b02cf32fb578e0854cd6403a9fb31ba119.zip chromium_src-3c11b5b02cf32fb578e0854cd6403a9fb31ba119.tar.gz chromium_src-3c11b5b02cf32fb578e0854cd6403a9fb31ba119.tar.bz2 |
Handle FocusSearch() when in forced search mode with leading whitespace.
BUG=29593
TEST=browser_tests --gtest_filter=AutocompleteBrowserTest.FocusSearch
Review URL: http://codereview.chromium.org/3280012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59183 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view.h b/chrome/browser/autocomplete/autocomplete_edit_view.h index 7f473b2..ce9a227 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -82,7 +82,7 @@ class AutocompleteEditView { // Sets the edit to forced query mode. Practically speaking, this means that // if the edit is not in forced query mode, its text is set to "?" with the // cursor at the end, and if the edit is in forced query mode (its first - // character is '?'), the text after the '?' is selected. + // non-whitespace character is '?'), the text after the '?' is selected. // // In the future we should display the search engine UI for the default engine // rather than '?'. @@ -91,6 +91,13 @@ class AutocompleteEditView { // Returns true if all text is selected or there is no text at all. virtual bool IsSelectAll() = 0; + // Fills |start| and |end| with the indexes of the current selection's bounds. + // It is not guaranteed that |*start < *end|, as the selection can be + // directed. If there is no selection, |start| and |end| will both be equal + // to the current cursor position. + virtual void GetSelectionBounds(std::wstring::size_type* start, + std::wstring::size_type* end) = 0; + // Selects all the text in the edit. Use this in place of SetSelAll() to // avoid selecting the "phantom newline" at the end of the edit. virtual void SelectAll(bool reversed) = 0; |