| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 autofill_external_delegate_.get()); | 126 autofill_external_delegate_.get()); |
| 127 } | 127 } |
| 128 BlockedContentTabHelper::CreateForWebContents(contents); | 128 BlockedContentTabHelper::CreateForWebContents(contents); |
| 129 BookmarkTabHelper::CreateForWebContents(contents); | 129 BookmarkTabHelper::CreateForWebContents(contents); |
| 130 chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents(contents); | 130 chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents(contents); |
| 131 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); | 131 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); |
| 132 CoreTabHelper::CreateForWebContents(contents); | 132 CoreTabHelper::CreateForWebContents(contents); |
| 133 extensions::TabHelper::CreateForWebContents(contents); | 133 extensions::TabHelper::CreateForWebContents(contents); |
| 134 extensions::WebNavigationTabObserver::CreateForWebContents(contents); | 134 extensions::WebNavigationTabObserver::CreateForWebContents(contents); |
| 135 ExternalProtocolObserver::CreateForWebContents(contents); | 135 ExternalProtocolObserver::CreateForWebContents(contents); |
| 136 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); | 136 FaviconTabHelper::CreateForWebContents(contents); |
| 137 FindTabHelper::CreateForWebContents(contents); | 137 FindTabHelper::CreateForWebContents(contents); |
| 138 HistoryTabHelper::CreateForWebContents(contents); | 138 HistoryTabHelper::CreateForWebContents(contents); |
| 139 HungPluginTabHelper::CreateForWebContents(contents); | 139 HungPluginTabHelper::CreateForWebContents(contents); |
| 140 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); | 140 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); |
| 141 MetroPinTabHelper::CreateForWebContents(contents); | 141 MetroPinTabHelper::CreateForWebContents(contents); |
| 142 NavigationMetricsRecorder::CreateForWebContents(contents); | 142 NavigationMetricsRecorder::CreateForWebContents(contents); |
| 143 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); | 143 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); |
| 144 password_manager_.reset( | 144 password_manager_.reset( |
| 145 new PasswordManager(contents, password_manager_delegate_.get())); | 145 new PasswordManager(contents, password_manager_delegate_.get())); |
| 146 PepperBrokerObserver::CreateForWebContents(contents); | 146 PepperBrokerObserver::CreateForWebContents(contents); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 //////////////////////////////////////////////////////////////////////////////// | 240 //////////////////////////////////////////////////////////////////////////////// |
| 241 // WebContentsObserver overrides | 241 // WebContentsObserver overrides |
| 242 | 242 |
| 243 void TabContents::WebContentsDestroyed(WebContents* tab) { | 243 void TabContents::WebContentsDestroyed(WebContents* tab) { |
| 244 // Destruction of the WebContents should only be done by us from our | 244 // Destruction of the WebContents should only be done by us from our |
| 245 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 245 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
| 246 // will attempt to access the WebContents and we'll crash. | 246 // will attempt to access the WebContents and we'll crash. |
| 247 DCHECK(in_destructor_); | 247 DCHECK(in_destructor_); |
| 248 } | 248 } |
| OLD | NEW |