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

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

Issue 10949011: Switch SadTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, win fix 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
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 162 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
163 captive_portal_tab_helper_.reset( 163 captive_portal_tab_helper_.reset(
164 new captive_portal::CaptivePortalTabHelper(profile(), web_contents())); 164 new captive_portal::CaptivePortalTabHelper(profile(), web_contents()));
165 #endif 165 #endif
166 166
167 #if !defined(OS_ANDROID) 167 #if !defined(OS_ANDROID)
168 if (OmniboxSearchHint::IsEnabled(profile())) 168 if (OmniboxSearchHint::IsEnabled(profile()))
169 OmniboxSearchHint::CreateForWebContents(contents); 169 OmniboxSearchHint::CreateForWebContents(contents);
170 PDFTabHelper::CreateForWebContents(contents); 170 PDFTabHelper::CreateForWebContents(contents);
171 sad_tab_helper_.reset(new SadTabHelper(contents)); 171 SadTabHelper::CreateForWebContents(contents);
172 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); 172 web_intent_picker_controller_.reset(new WebIntentPickerController(this));
173 #endif 173 #endif
174 174
175 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); 175 external_protocol_observer_.reset(new ExternalProtocolObserver(contents));
176 navigation_metrics_recorder_.reset(new NavigationMetricsRecorder(contents)); 176 navigation_metrics_recorder_.reset(new NavigationMetricsRecorder(contents));
177 pepper_broker_observer_.reset(new PepperBrokerObserver(contents)); 177 pepper_broker_observer_.reset(new PepperBrokerObserver(contents));
178 plugin_observer_.reset(new PluginObserver(this)); 178 plugin_observer_.reset(new PluginObserver(this));
179 safe_browsing_tab_observer_.reset( 179 safe_browsing_tab_observer_.reset(
180 new safe_browsing::SafeBrowsingTabObserver(this)); 180 new safe_browsing::SafeBrowsingTabObserver(this));
181 webnavigation_observer_.reset( 181 webnavigation_observer_.reset(
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 //////////////////////////////////////////////////////////////////////////////// 248 ////////////////////////////////////////////////////////////////////////////////
249 // WebContentsObserver overrides 249 // WebContentsObserver overrides
250 250
251 void TabContents::WebContentsDestroyed(WebContents* tab) { 251 void TabContents::WebContentsDestroyed(WebContents* tab) {
252 // Destruction of the WebContents should only be done by us from our 252 // Destruction of the WebContents should only be done by us from our
253 // destructor. Otherwise it's very likely we (or one of the helpers we own) 253 // destructor. Otherwise it's very likely we (or one of the helpers we own)
254 // will attempt to access the WebContents and we'll crash. 254 // will attempt to access the WebContents and we'll crash.
255 DCHECK(in_destructor_); 255 DCHECK(in_destructor_);
256 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698