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

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

Issue 11421079: Persist the Instant API to committed search result pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes 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_unload_handler.h
diff --git a/chrome/browser/instant/instant_unload_handler.h b/chrome/browser/instant/instant_unload_handler.h
index b505ab8fab20d994ab6659384f0f8fdd0230272c..89562f0bfc0c8a135a31460eb2e0d8883aa71ef2 100644
--- a/chrome/browser/instant/instant_unload_handler.h
+++ b/chrome/browser/instant/instant_unload_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,11 +9,14 @@
#include "base/memory/scoped_vector.h"
class Browser;
-class TabContents;
+
+namespace content {
+class WebContents;
+}
// InstantUnloadHandler ensures that the beforeunload and unload handlers are
// run when using Instant. When the user commits the Instant preview the
-// existing TabContents is passed to RunUnloadListenersOrDestroy(). If the tab
+// existing WebContents is passed to RunUnloadListenersOrDestroy(). If the tab
// has no beforeunload or unload listeners, the tab is deleted; otherwise the
// beforeunload and unload listeners are executed. If the beforeunload listener
// shows a dialog the tab is added back to the tabstrip at its original location
@@ -24,15 +27,17 @@ class InstantUnloadHandler {
~InstantUnloadHandler();
// See class description for details on what this does.
- void RunUnloadListenersOrDestroy(TabContents* tab_contents, int index);
+ void RunUnloadListenersOrDestroy(content::WebContents* contents, int index);
private:
class WebContentsDelegateImpl;
// Invoked if the tab is to be shown, at |index| on the tab strip. This
// happens if the before unload listener returns a string. Takes ownership of
- // |delegate| and |tab|.
- void Activate(WebContentsDelegateImpl* delegate, TabContents* tab, int index);
+ // |delegate| and |contents|.
+ void Activate(WebContentsDelegateImpl* delegate,
+ content::WebContents* contents,
+ int index);
// Destroys the old tab. This is invoked if script tries to close the page.
void Destroy(WebContentsDelegateImpl* delegate);

Powered by Google App Engine
This is Rietveld 408576698