| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); |
| 168 SadTabHelper::CreateForWebContents(contents); | 168 SadTabHelper::CreateForWebContents(contents); |
| 169 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); | 169 WebIntentPickerController::CreateForWebContents(contents); |
| 170 #endif | 170 #endif |
| 171 | 171 |
| 172 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); | 172 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); |
| 173 navigation_metrics_recorder_.reset(new NavigationMetricsRecorder(contents)); | 173 navigation_metrics_recorder_.reset(new NavigationMetricsRecorder(contents)); |
| 174 pepper_broker_observer_.reset(new PepperBrokerObserver(contents)); | 174 pepper_broker_observer_.reset(new PepperBrokerObserver(contents)); |
| 175 safe_browsing_tab_observer_.reset( | 175 safe_browsing_tab_observer_.reset( |
| 176 new safe_browsing::SafeBrowsingTabObserver(this)); | 176 new safe_browsing::SafeBrowsingTabObserver(this)); |
| 177 | 177 |
| 178 #if defined(ENABLE_PRINTING) | 178 #if defined(ENABLE_PRINTING) |
| 179 printing::PrintPreviewMessageHandler::CreateForWebContents(contents); | 179 printing::PrintPreviewMessageHandler::CreateForWebContents(contents); |
| (...skipping 61 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 |