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..2454c3633f72ba4a9212a0218c6104a7063a9f7d 100644 |
| --- a/chrome/browser/ui/toolbar/toolbar_model.h |
| +++ b/chrome/browser/ui/toolbar/toolbar_model.h |
| @@ -29,6 +29,17 @@ class ToolbarModel { |
| #undef DEFINE_TOOLBAR_MODEL_SECURITY_LEVEL |
| }; |
| + enum SearchTermType { |
|
Peter Kasting
2013/04/25 19:42:54
Nit: Add comment above enum:
If search URLs may b
sail
2013/04/25 22:18:46
Done.
|
| + // There are no search terms. |
| + SEARCH_TERM_NONE, |
| + // There are regular search terms. |
| + SEARCH_TERM_NORMAL, |
| + // 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. |
| + SEARCH_TERM_PROMINENT, |
|
Peter Kasting
2013/04/25 19:42:54
I think these would make more sense named as:
NO_
sail
2013/04/25 22:18:46
Done.
|
| + }; |
| + |
| virtual ~ToolbarModel() {} |
| // Returns the text for the current page's URL. This will have been formatted |
| @@ -50,9 +61,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 SearchTermType GetSearchTermType() const = 0; |
|
Peter Kasting
2013/04/25 19:42:54
Tiny nit: GetSearchTermsType() seems more correct
sail
2013/04/25 22:18:46
Done.
|
| + |
| + // Setter for whether the UI can display a more prominent UI for search terms |
| + // that require it. |
| + virtual void SetIsProminentSearchTermUISupported(bool value) = 0; |
|
Peter Kasting
2013/04/25 19:42:54
With the enum naming change above, this would beco
sail
2013/04/25 22:18:46
Done.
|
| // Returns the security level that the toolbar should display. |
| virtual SecurityLevel GetSecurityLevel() const = 0; |