| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |