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

Unified Diff: chrome/browser/ui/search/instant_controller.h

Issue 14043009: Fall back to local page if online NTP fails to load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix failing unittest & address comments Created 7 years, 7 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/search/search.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_controller.h
diff --git a/chrome/browser/ui/search/instant_controller.h b/chrome/browser/ui/search/instant_controller.h
index e75495bc346e5a400a1976cb939f427209774a34..b3decd6b029f4ce7550d1490ea82c3ad06231052 100644
--- a/chrome/browser/ui/search/instant_controller.h
+++ b/chrome/browser/ui/search/instant_controller.h
@@ -250,6 +250,8 @@ class InstantController : public InstantPage::Delegate,
FRIEND_TEST_ALL_PREFIXES(InstantExtendedManualTest,
MANUAL_BackspaceFromQueryToSelectedUrlAndNavigate);
FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, OnDefaultSearchProviderChanged);
+ FRIEND_TEST_ALL_PREFIXES(
+ InstantExtendedFirstTabTest, RedirectToLocalOnLoadFailure);
Profile* profile() const;
InstantOverlay* overlay() const;
@@ -288,6 +290,7 @@ class InstantController : public InstantPage::Delegate,
const GURL& url,
content::PageTransition transition,
WindowOpenDisposition disposition) OVERRIDE;
+ virtual void InstantPageLoadFailed(content::WebContents* contents) OVERRIDE;
// Invoked by the InstantLoader when the Instant page wants to delete a
// Most Visited item.
@@ -303,6 +306,10 @@ class InstantController : public InstantPage::Delegate,
// Most Visited deletions.
virtual void UndoAllMostVisitedDeletions() OVERRIDE;
+ // Helper function to navigate the given contents to the local fallback
+ // Instant URL and trim the history correctly.
+ void RedirectToLocalNTP(content::WebContents* contents);
+
// Helper for OmniboxFocusChanged. Commit or discard the overlay.
void OmniboxLostFocus(gfx::NativeView view_gaining_focus);
@@ -342,6 +349,9 @@ class InstantController : public InstantPage::Delegate,
// point to it. Else, deletes any existing |instant_tab_|.
void ResetInstantTab();
+ // Sends theme info, omnibox bounds, font info, etc. down to the Instant tab.
+ void UpdateInfoForInstantTab();
+
// Hide the overlay. Also sends an onchange event (with blank query) to the
// overlay, telling it to clear out results for any old queries.
void HideOverlay();
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698