diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 00:19:18 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 00:19:18 +0000 |
commit | 66ee443252fd759c5e20cb93be1e90a732da0ebe (patch) | |
tree | 5ee39c6ee0c62c8feba5103836a36d28203b7b54 /chrome/browser/profile.h | |
parent | cbadedd7a2cdc20a745ff8b51922b2533169f7b0 (diff) | |
download | chromium_src-66ee443252fd759c5e20cb93be1e90a732da0ebe.zip chromium_src-66ee443252fd759c5e20cb93be1e90a732da0ebe.tar.gz chromium_src-66ee443252fd759c5e20cb93be1e90a732da0ebe.tar.bz2 |
Show the location bar icon (almost) all the time, and have its contents match what the user is doing.
There are a couple major moving parts here:
* Change AutocompletePopupModel::URLsForCurrentText() to InfoForCurrentText() and have it return an AutocompleteMatch, which callers can use to parse out whatever they want. I needed to get at the match type for the current text and found the proliferation of arguments here ridiculous. This had major ripple effects throughout the codebase, including changing the name and location of SearchVersusNavigateClassifier as it no longer had an "is_search" parameter directly, so the name became misleading and too narrow. I also ended up adding a null constructor for AutocompleteMatch because it was too cumbersome otherwise.
* Change the name of the "SecurityImageView" (or similar) to reflect its broader purpose, and plumb it to the edit to get an icon instead of to the toolbar model.
* Add an AutocompleteMatch::Type to icon mapping function, and use it not only in the new code but also to simplify showing the popup contents.
BUG=27570,39725
TEST=An icon should appear next to the address at all times. It should be a globe on non-secure pages, a magnifying glass on the NTP, and a match for whatever the user is typing as he types.
Review URL: http://codereview.chromium.org/1457002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.h')
-rw-r--r-- | chrome/browser/profile.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h index 9db5374..91faad0 100644 --- a/chrome/browser/profile.h +++ b/chrome/browser/profile.h @@ -30,6 +30,7 @@ namespace webkit_database { class DatabaseTracker; } +class AutocompleteClassifier; class Blacklist; class BookmarkModel; class BrowserThemeProvider; @@ -54,7 +55,6 @@ class PinnedTabService; class PrefService; class ProfileSyncService; class ProfileSyncFactory; -class SearchVersusNavigateClassifier; class SessionService; class SpellCheckHost; class SSLConfigServiceManager; @@ -215,11 +215,10 @@ class Profile { // doesn't already exist. virtual HistoryService* GetHistoryServiceWithoutCreating() = 0; - // Retrieves a pointer to the SearchVersusNavigateClassifier associated with - // this profile. The SearchVersusNavigateClassifier is lazily created the - // first time that this method is called. - virtual SearchVersusNavigateClassifier* - GetSearchVersusNavigateClassifier() = 0; + // Retrieves a pointer to the AutocompleteClassifier associated with this + // profile. The AutocompleteClassifier is lazily created the first time that + // this method is called. + virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; // Returns the WebDataService for this profile. This is owned by // the Profile. Callers that outlive the life of this profile need to be @@ -452,7 +451,7 @@ class ProfileImpl : public Profile, virtual FaviconService* GetFaviconService(ServiceAccessType sat); virtual HistoryService* GetHistoryService(ServiceAccessType sat); virtual HistoryService* GetHistoryServiceWithoutCreating(); - virtual SearchVersusNavigateClassifier* GetSearchVersusNavigateClassifier(); + virtual AutocompleteClassifier* GetAutocompleteClassifier(); virtual WebDataService* GetWebDataService(ServiceAccessType sat); virtual WebDataService* GetWebDataServiceWithoutCreating(); virtual PasswordStore* GetPasswordStore(ServiceAccessType sat); @@ -570,7 +569,7 @@ class ProfileImpl : public Profile, scoped_refptr<DownloadManager> download_manager_; scoped_refptr<HistoryService> history_service_; scoped_refptr<FaviconService> favicon_service_; - scoped_ptr<SearchVersusNavigateClassifier> search_versus_navigate_classifier_; + scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; scoped_refptr<WebDataService> web_data_service_; scoped_refptr<PasswordStore> password_store_; scoped_refptr<SessionService> session_service_; |