| OLD | NEW |
| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); | 147 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); |
| 148 SearchEngineTabHelper::CreateForWebContents(contents); | 148 SearchEngineTabHelper::CreateForWebContents(contents); |
| 149 chrome::search::SearchTabHelper::CreateForWebContents(contents); | 149 chrome::search::SearchTabHelper::CreateForWebContents(contents); |
| 150 SnapshotTabHelper::CreateForWebContents(contents); | 150 SnapshotTabHelper::CreateForWebContents(contents); |
| 151 SSLTabHelper::CreateForWebContents(contents); | 151 SSLTabHelper::CreateForWebContents(contents); |
| 152 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); | 152 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); |
| 153 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 153 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
| 154 ZoomController::CreateForWebContents(contents); | 154 ZoomController::CreateForWebContents(contents); |
| 155 | 155 |
| 156 #if defined(ENABLE_AUTOMATION) | 156 #if defined(ENABLE_AUTOMATION) |
| 157 automation_tab_helper_.reset(new AutomationTabHelper(contents)); | 157 AutomationTabHelper::CreateForWebContents(contents); |
| 158 #endif | 158 #endif |
| 159 | 159 |
| 160 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 160 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 161 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents); | 161 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents); |
| 162 #endif | 162 #endif |
| 163 | 163 |
| 164 #if !defined(OS_ANDROID) | 164 #if !defined(OS_ANDROID) |
| 165 if (OmniboxSearchHint::IsEnabled(profile())) | 165 if (OmniboxSearchHint::IsEnabled(profile())) |
| 166 OmniboxSearchHint::CreateForWebContents(contents); | 166 OmniboxSearchHint::CreateForWebContents(contents); |
| 167 PDFTabHelper::CreateForWebContents(contents); | 167 PDFTabHelper::CreateForWebContents(contents); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 //////////////////////////////////////////////////////////////////////////////// | 242 //////////////////////////////////////////////////////////////////////////////// |
| 243 // WebContentsObserver overrides | 243 // WebContentsObserver overrides |
| 244 | 244 |
| 245 void TabContents::WebContentsDestroyed(WebContents* tab) { | 245 void TabContents::WebContentsDestroyed(WebContents* tab) { |
| 246 // Destruction of the WebContents should only be done by us from our | 246 // Destruction of the WebContents should only be done by us from our |
| 247 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 247 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
| 248 // will attempt to access the WebContents and we'll crash. | 248 // will attempt to access the WebContents and we'll crash. |
| 249 DCHECK(in_destructor_); | 249 DCHECK(in_destructor_); |
| 250 } | 250 } |
| OLD | NEW |