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

Unified Diff: chrome/browser/instant/instant_controller.h

Issue 7210020: Added prerendering to omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 years, 6 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/autocomplete/autocomplete_edit.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index f8d4bd7475b751328aa451f3b9bc0a4892fd323b..8556e857b2485be7eff78cb97f5f72743b931ad9 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -193,6 +193,15 @@ class InstantController : public InstantLoaderDelegate {
private:
friend class InstantTest;
+ enum PreviewCondition {
+ PREVIEW_CONDITION_SUCCESS,
+ PREVIEW_CONDITION_INVALID_TEMPLATE_URL,
+ PREVIEW_CONDITION_JAVASCRIPT_SCHEME,
+ PREVIEW_CONDITION_EXTENSION_KEYWORD,
+ PREVIEW_CONDITION_BLACKLISTED,
+ PREVIEW_CONDITION_INSTANT_SEARCH_ONLY,
+ };
+
typedef std::set<std::string> HostBlacklist;
// Updates |displayable_loader_| and if necessary notifies the delegate.
@@ -228,10 +237,11 @@ class InstantController : public InstantLoaderDelegate {
bool verbatim,
string16* suggested_text);
- // Returns true if a preview should be shown for |match|. If |match| has
- // a TemplateURL that supports the instant API it is set in |template_url|.
- bool ShouldShowPreviewFor(const AutocompleteMatch& match,
- const TemplateURL** template_url);
+ // Returns a PreviewCondition indicating why we might decide not to show a
+ // preview for |match|. If |match| has a TemplateURL that supports the instant
+ // API it is set in |template_url|.
+ PreviewCondition GetPreviewConditionFor(const AutocompleteMatch& match,
+ const TemplateURL** template_url);
// Marks the specified search engine id as not supporting instant.
void BlacklistFromInstant(TemplateURLID id);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698