Chromium Code Reviews| Index: chrome/browser/ui/toolbar/toolbar_model.h |
| diff --git a/chrome/browser/ui/toolbar/toolbar_model.h b/chrome/browser/ui/toolbar/toolbar_model.h |
| index c9aead57fff741cfa46fb07dc355dc6b48afb5a5..09e9277d2db3df10fc07391bda18326c5f058b91 100644 |
| --- a/chrome/browser/ui/toolbar/toolbar_model.h |
| +++ b/chrome/browser/ui/toolbar/toolbar_model.h |
| @@ -29,6 +29,20 @@ class ToolbarModel { |
| #undef DEFINE_TOOLBAR_MODEL_SECURITY_LEVEL |
| }; |
| + // If search URLs may be displayed as search terms, these are the types of |
| + // search terms that may be extracted from the URL. See comments on GetText() |
| + // and GetSearchTermsType(). |
| + enum SearchTermsType { |
| + // There are no search terms. |
| + NO_SEARCH_TERMS, |
| + // There are regular search terms. |
| + NORMAL_SEARCH_TERMS, |
| + // There are search terms that require a more prominent UI. For example, |
| + // if the search term looks like a URL then it should be clear to the user |
| + // that a search term is being displayed. |
| + URL_LIKE_SEARCH_TERMS |
|
Peter Kasting
2013/04/25 22:48:39
Tiny nit: I like leaving a trailing comma here for
sail
2013/04/25 23:39:16
Done.
|
| + }; |
| + |
| virtual ~ToolbarModel() {} |
| // Returns the text for the current page's URL. This will have been formatted |
| @@ -50,9 +64,13 @@ class ToolbarModel { |
| // Returns the URL of the current navigation entry. |
| virtual GURL GetURL() const = 0; |
| - // Returns true if a call to GetText(true) would successfully replace the URL |
| - // with search terms. |
| - virtual bool WouldReplaceSearchURLWithSearchTerms() const = 0; |
| + // This indicates the type of search terms returned by a call to |
| + // GetText(true). |
| + virtual SearchTermsType GetSearchTermsType() const = 0; |
| + |
| + // Setter for whether the UI can display a more prominent UI for search terms |
| + // that require it. |
|
Peter Kasting
2013/04/25 22:48:39
Nit: Update comment to not talk about UI
sail
2013/04/25 23:39:16
Done.
|
| + virtual void SetSupportsExtractionOfURLLikeSearchTerms(bool value) = 0; |
| // Returns the security level that the toolbar should display. |
| virtual SecurityLevel GetSecurityLevel() const = 0; |