Chromium Code Reviews

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

Issue 11833043: Instant Extended: Fallback to local preview if the remote instant page is not ready on user input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: Fixing tests. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/instant/instant_loader.h
diff --git a/chrome/browser/instant/instant_loader.h b/chrome/browser/instant/instant_loader.h
index 185d2ff53e9317c3b7838c66ac3adf826f2e5c61..4e999af969d4f28d2f34488d575e8ded2289218d 100644
--- a/chrome/browser/instant/instant_loader.h
+++ b/chrome/browser/instant/instant_loader.h
@@ -82,6 +82,10 @@ class InstantLoader : public InstantClient::Delegate,
return last_navigation_;
}
+ // Tells the loader that it is in fallback mode.
+ void set_is_in_fallback_mode();
+ bool is_in_fallback_mode() const { return is_in_fallback_mode_; }
+
// Called by the history tab helper with information that it would have added
// to the history service had this WebContents not been used for Instant.
void DidNavigate(const history::HistoryAddPageArgs& add_page_args);
@@ -99,6 +103,7 @@ class InstantLoader : public InstantClient::Delegate,
void Cancel(const string16& text);
void SetPopupBounds(const gfx::Rect& bounds);
void SetMarginSize(int start, int end);
+ void InitializeFonts();
void SendAutocompleteResults(
const std::vector<InstantAutocompleteResult>& results);
void UpOrDownKeyPressed(int count);
@@ -124,6 +129,7 @@ class InstantLoader : public InstantClient::Delegate,
virtual void AboutToNavigateMainFrame(const GURL& url) OVERRIDE;
virtual void NavigateToURL(const GURL& url,
content::PageTransition transition) OVERRIDE;
+ virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE;
// Overridden from content::NotificationObserver:
virtual void Observe(int type,
@@ -148,6 +154,10 @@ class InstantLoader : public InstantClient::Delegate,
bool is_pointer_down_from_activate_;
history::HistoryAddPageArgs last_navigation_;
+ // Indicates if this loader is running as a fallback loader using the local
+ // preview because the actual instant page was too slow to load.
+ bool is_in_fallback_mode_;
+
// Used to get notifications about renderers coming and going.
content::NotificationRegistrar registrar_;

Powered by Google App Engine