Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3657)

Unified Diff: chrome/browser/ui/toolbar/toolbar_model.h

Issue 14259008: Instant Extended: Add prominent search term support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/test_toolbar_model.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..04017e8a671492fd0561ff37b0997ab13df5d736 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,
+ };
+
virtual ~ToolbarModel() {}
// Returns the text for the current page's URL. This will have been formatted
@@ -50,9 +64,12 @@ 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 extraction of URL like search terms is allowed.
+ virtual void SetSupportsExtractionOfURLLikeSearchTerms(bool value) = 0;
// Returns the security level that the toolbar should display.
virtual SecurityLevel GetSecurityLevel() const = 0;
« no previous file with comments | « chrome/browser/ui/toolbar/test_toolbar_model.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698