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

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

Issue 11555033: Adding local html page used in Instant Extended mode when instant is disabled or unavailable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix uninitialized variable. Created 8 years 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/browser_resources.grd ('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 440bae0a5047a15b93aa0e7818642c5b8713dc9d..3371af810eaf0c72c214fead5369d345368356a5 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -44,8 +44,14 @@ class WebContents;
// BrowserInstantController.
class InstantController {
public:
+ // The URL for the local omnibox popup.
+ static const char* kLocalOmniboxPopupURL;
+
+ // |use_local_preview_only| will force the use of kLocalOmniboxPopupURL as the
+ // instant URL and is only applicable if |extended_enabled| is true.
InstantController(chrome::BrowserInstantController* browser,
- bool extended_enabled);
+ bool extended_enabled,
+ bool use_local_preview_only);
~InstantController();
// Invoked as the user types into the omnibox. |user_text| is what the user
@@ -174,10 +180,13 @@ class InstantController {
// Creates a new loader if necessary, using the instant_url property of the
// |template_url| (for example, if the Instant URL has changed since the last
- // time the loader was created). Returns false if the |template_url| doesn't
- // have a valid Instant URL; true otherwise.
+ // time the loader was created). If |fallback_to_local| is true will use
+ // kLocalOmniboxPopupURL as the fallback url (in extended mode) in case
+ // the |template_url| doesn't have a valid Instant URL. Returns true if an
+ // instant URL could be determined.
bool ResetLoader(const TemplateURL* template_url,
- const content::WebContents* active_tab);
+ const content::WebContents* active_tab,
+ bool fallback_to_local);
// Ensures that the |loader_| uses the default Instant URL, recreating it if
// necessary, and returns true. Returns false if the Instant URL could not be
@@ -228,6 +237,9 @@ class InstantController {
const bool extended_enabled_;
bool instant_enabled_;
+ // If true, the instant URL is set to kLocalOmniboxPopupURL.
+ const bool use_local_preview_only_;
+
// The state of the preview page, i.e., the page owned by |loader_|. Ignored
// if |instant_tab_| is in use.
InstantModel model_;
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698