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

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

Issue 10946011: Switch CaptivePortalTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 SSLTabHelper::CreateForWebContents(contents); 149 SSLTabHelper::CreateForWebContents(contents);
150 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); 150 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this));
151 translate_tab_helper_.reset(new TranslateTabHelper(contents)); 151 translate_tab_helper_.reset(new TranslateTabHelper(contents));
152 zoom_controller_.reset(new ZoomController(this)); 152 zoom_controller_.reset(new ZoomController(this));
153 153
154 #if defined(ENABLE_AUTOMATION) 154 #if defined(ENABLE_AUTOMATION)
155 automation_tab_helper_.reset(new AutomationTabHelper(contents)); 155 automation_tab_helper_.reset(new AutomationTabHelper(contents));
156 #endif 156 #endif
157 157
158 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 158 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
159 captive_portal_tab_helper_.reset( 159 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents);
160 new captive_portal::CaptivePortalTabHelper(profile(), web_contents()));
161 #endif 160 #endif
162 161
163 #if !defined(OS_ANDROID) 162 #if !defined(OS_ANDROID)
164 if (OmniboxSearchHint::IsEnabled(profile())) 163 if (OmniboxSearchHint::IsEnabled(profile()))
165 OmniboxSearchHint::CreateForWebContents(contents); 164 OmniboxSearchHint::CreateForWebContents(contents);
166 PDFTabHelper::CreateForWebContents(contents); 165 PDFTabHelper::CreateForWebContents(contents);
167 SadTabHelper::CreateForWebContents(contents); 166 SadTabHelper::CreateForWebContents(contents);
168 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); 167 web_intent_picker_controller_.reset(new WebIntentPickerController(this));
169 #endif 168 #endif
170 169
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 242
244 //////////////////////////////////////////////////////////////////////////////// 243 ////////////////////////////////////////////////////////////////////////////////
245 // WebContentsObserver overrides 244 // WebContentsObserver overrides
246 245
247 void TabContents::WebContentsDestroyed(WebContents* tab) { 246 void TabContents::WebContentsDestroyed(WebContents* tab) {
248 // Destruction of the WebContents should only be done by us from our 247 // Destruction of the WebContents should only be done by us from our
249 // destructor. Otherwise it's very likely we (or one of the helpers we own) 248 // destructor. Otherwise it's very likely we (or one of the helpers we own)
250 // will attempt to access the WebContents and we'll crash. 249 // will attempt to access the WebContents and we'll crash.
251 DCHECK(in_destructor_); 250 DCHECK(in_destructor_);
252 } 251 }
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