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

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

Issue 11416187: Commit instant loader when the instant page navigates away from instant URL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing commit for cross process navigation. 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 5661ba1cac97046f4c2e227e8beee17abb1e9a1d..2a55a38eaea3fee08941a2acd8e37e654ea66719 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -77,11 +77,12 @@ class InstantController {
// The preview WebContents. May be NULL. InstantController retains ownership.
content::WebContents* GetPreviewContents() const;
- // Returns true if the Instant preview can be committed now.
- bool IsCurrent() const;
+ // Returns true if the Instant preview is in search mode and can be committed.
+ bool IsCurrentSearch() const;
- // If the preview is showing search results, commits the preview, calling
- // CommitInstant() on the browser, and returns true. Else, returns false.
+ // If the preview is showing search results, or navigating, commits the
+ // preview, calling CommitInstant() on the browser, and returns true. Else,
+ // returns false.
bool CommitIfCurrent(InstantCommitType type);
// The omnibox has lost focus. Commit or discard the preview accordingly.
@@ -145,6 +146,9 @@ class InstantController {
// Invoked by the InstantLoader when its RenderView crashes.
void InstantLoaderRenderViewGone();
+ // Invoked by InstantLoader when the instant page is about to navigate.
+ void InstantLoaderAboutToNavigateMainFrame(const GURL& url);
+
private:
FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant);
FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider);

Powered by Google App Engine
This is Rietveld 408576698