Chromium Code Reviews| 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_; |