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

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents.cc

Issue 10909282: Switch SnapshotTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/tab_contents/tab_contents.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "chrome/browser/autofill/autocomplete_history_manager.h" 9 #include "chrome/browser/autofill/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_external_delegate.h" 10 #include "chrome/browser/autofill/autofill_external_delegate.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); 148 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this));
149 password_manager_.reset( 149 password_manager_.reset(
150 new PasswordManager(contents, password_manager_delegate_.get())); 150 new PasswordManager(contents, password_manager_delegate_.get()));
151 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); 151 prefs_tab_helper_.reset(new PrefsTabHelper(contents));
152 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); 152 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this));
153 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); 153 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents));
154 bool is_search_enabled = 154 bool is_search_enabled =
155 chrome::search::IsInstantExtendedAPIEnabled(profile()); 155 chrome::search::IsInstantExtendedAPIEnabled(profile());
156 search_tab_helper_.reset( 156 search_tab_helper_.reset(
157 new chrome::search::SearchTabHelper(this, is_search_enabled)); 157 new chrome::search::SearchTabHelper(this, is_search_enabled));
158 snapshot_tab_helper_.reset(new SnapshotTabHelper(contents)); 158 SnapshotTabHelper::CreateForWebContents(contents);
159 ssl_helper_.reset(new TabContentsSSLHelper(this)); 159 ssl_helper_.reset(new TabContentsSSLHelper(this));
160 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); 160 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this));
161 content_settings_.reset(new TabSpecificContentSettings(contents)); 161 content_settings_.reset(new TabSpecificContentSettings(contents));
162 translate_tab_helper_.reset(new TranslateTabHelper(contents)); 162 translate_tab_helper_.reset(new TranslateTabHelper(contents));
163 zoom_controller_.reset(new ZoomController(this)); 163 zoom_controller_.reset(new ZoomController(this));
164 164
165 #if !defined(OS_ANDROID) 165 #if !defined(OS_ANDROID)
166 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); 166 web_intent_picker_controller_.reset(new WebIntentPickerController(this));
167 sad_tab_helper_.reset(new SadTabHelper(contents)); 167 sad_tab_helper_.reset(new SadTabHelper(contents));
168 #endif 168 #endif
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 //////////////////////////////////////////////////////////////////////////////// 252 ////////////////////////////////////////////////////////////////////////////////
253 // WebContentsObserver overrides 253 // WebContentsObserver overrides
254 254
255 void TabContents::WebContentsDestroyed(WebContents* tab) { 255 void TabContents::WebContentsDestroyed(WebContents* tab) {
256 // Destruction of the WebContents should only be done by us from our 256 // Destruction of the WebContents should only be done by us from our
257 // destructor. Otherwise it's very likely we (or one of the helpers we own) 257 // destructor. Otherwise it's very likely we (or one of the helpers we own)
258 // will attempt to access the WebContents and we'll crash. 258 // will attempt to access the WebContents and we'll crash.
259 DCHECK(in_destructor_); 259 DCHECK(in_destructor_);
260 } 260 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698