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

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: 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
Index: chrome/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index 3830fa97f29b50fb744aa05a2e806255b5c06458..a5ef20acbc552481c2895b86eae950d1588af36f 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -45,7 +45,8 @@ class WebContents;
class InstantController {
public:
InstantController(chrome::BrowserInstantController* browser,
- bool extended_enabled);
+ bool extended_enabled,
+ bool incognito_mode);
dhollowa 2012/12/13 01:20:15 The notion of incognito is appropriate at the brow
Shishir 2012/12/13 22:57:58 Like we discussed, renamed to use_local_preview_on
~InstantController();
// Invoked as the user types into the omnibox. |user_text| is what the user
@@ -153,6 +154,9 @@ class InstantController {
// Invoked by InstantLoader when the instant page is about to navigate.
void InstantLoaderAboutToNavigateMainFrame(const GURL& url);
+ // The URL for the local omnibox popup.
+ static const char* kLocalOmniboxPopupURL;
dhollowa 2012/12/13 01:20:15 nit: static const data members should be declared
Shishir 2012/12/13 22:57:58 Done.
+
private:
FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant);
FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider);
@@ -163,10 +167,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 |use_fallback| 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 use_fallback);
dhollowa 2012/12/13 01:20:15 nit: use_local
Shishir 2012/12/13 22:57:58 changed to 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
@@ -217,6 +224,9 @@ class InstantController {
const bool extended_enabled_;
bool instant_enabled_;
+ // Whether the profile is in incognito mode.
+ const bool incognito_mode_;
+
// The state of the preview page, i.e., the page owned by |loader_|. Ignored
// if |instant_tab_| is in use.
InstantModel model_;

Powered by Google App Engine
This is Rietveld 408576698