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

Unified Diff: chrome/browser/ui/tab_contents/tab_contents.cc

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 3 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/ui/tab_contents/tab_contents.h ('k') | chrome/browser/ui/tabs/pinned_tab_codec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tab_contents/tab_contents.cc
diff --git a/chrome/browser/ui/tab_contents/tab_contents.cc b/chrome/browser/ui/tab_contents/tab_contents.cc
index 9afa0b12ee64a39f8ff30e2fcdc1dfe677298deb..b31c44560e490675fa6c2a908e73ded6ed0a9c34 100644
--- a/chrome/browser/ui/tab_contents/tab_contents.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents.cc
@@ -138,7 +138,7 @@ TabContents::TabContents(WebContents* contents)
#endif
constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this));
core_tab_helper_.reset(new CoreTabHelper(contents));
- extension_tab_helper_.reset(new extensions::TabHelper(this));
+ extensions::TabHelper::CreateForWebContents(contents);
favicon_tab_helper_.reset(new FaviconTabHelper(contents));
find_tab_helper_.reset(new FindTabHelper(contents));
history_tab_helper_.reset(new HistoryTabHelper(contents));
@@ -222,13 +222,7 @@ TabContents::~TabContents() {
TabContents* TabContents::Clone() {
WebContents* new_web_contents = web_contents()->Clone();
- TabContents* new_tab_contents = new TabContents(new_web_contents);
-
- // TODO(avi): Can we generalize this so that knowledge of the functionings of
- // the tab helpers isn't required here?
- new_tab_contents->extension_tab_helper()->CopyStateFrom(
- *extension_tab_helper_.get());
- return new_tab_contents;
+ return new TabContents(new_web_contents);
}
// static
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | chrome/browser/ui/tabs/pinned_tab_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698