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

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

Issue 8865004: Create CoreTabHelper, move remaining core TCW functionality into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lots of helpers now Created 9 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_loader.cc
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 96017dc51a86c6b4a74bce025fb5317265e01857..767dad6f6ddbce0f582c203f47317180f19b2081 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -25,8 +25,9 @@
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
#include "chrome/browser/ui/constrained_window_tab_helper.h"
#include "chrome/browser/ui/constrained_window_tab_helper_delegate.h"
+#include "chrome/browser/ui/tab_contents/core_tab_helper.h"
+#include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
@@ -163,7 +164,7 @@ void InstantLoader::FrameLoadObserver::Observe(
class InstantLoader::TabContentsDelegateImpl
: public TabContentsDelegate,
- public TabContentsWrapperDelegate,
+ public CoreTabHelperDelegate,
public ConstrainedWindowTabHelperDelegate,
public content::NotificationObserver,
public TabContentsObserver {
@@ -222,7 +223,7 @@ class InstantLoader::TabContentsDelegateImpl
const history::HistoryAddPageArgs& add_page_args,
content::NavigationType navigation_type) OVERRIDE;
- // TabContentsWrapperDelegate:
+ // CoreTabHelperDelegate:
virtual void SwapTabContents(TabContentsWrapper* old_tc,
TabContentsWrapper* new_tc) OVERRIDE;
@@ -980,8 +981,8 @@ void InstantLoader::ReplacePreviewContents(TabContentsWrapper* old_tc,
// Cleanup the old preview contents.
old_tc->constrained_window_tab_helper()->set_delegate(NULL);
+ old_tc->core_tab_helper()->set_delegate(NULL);
old_tc->tab_contents()->set_delegate(NULL);
- old_tc->set_delegate(NULL);
#if defined(OS_MACOSX)
registrar_.Remove(
@@ -1002,12 +1003,13 @@ void InstantLoader::ReplacePreviewContents(TabContentsWrapper* old_tc,
}
void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
- preview_contents_->set_delegate(preview_tab_contents_delegate_.get());
preview_contents_->tab_contents()->set_delegate(
preview_tab_contents_delegate_.get());
preview_contents_->blocked_content_tab_helper()->SetAllContentsBlocked(true);
preview_contents_->constrained_window_tab_helper()->set_delegate(
preview_tab_contents_delegate_.get());
+ preview_contents_->core_tab_helper()->set_delegate(
+ preview_tab_contents_delegate_.get());
// Propagate the max page id. That way if we end up merging the two
// NavigationControllers (which happens if we commit) none of the page ids

Powered by Google App Engine
This is Rietveld 408576698