| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #endif | 130 #endif |
| 131 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); | 131 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); |
| 132 bookmark_tab_helper_.reset(new BookmarkTabHelper(this)); | 132 bookmark_tab_helper_.reset(new BookmarkTabHelper(this)); |
| 133 load_time_stats_tab_helper_.reset( | 133 load_time_stats_tab_helper_.reset( |
| 134 new chrome_browser_net::LoadTimeStatsTabHelper(this)); | 134 new chrome_browser_net::LoadTimeStatsTabHelper(this)); |
| 135 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 135 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 136 captive_portal_tab_helper_.reset( | 136 captive_portal_tab_helper_.reset( |
| 137 new captive_portal::CaptivePortalTabHelper(profile(), web_contents())); | 137 new captive_portal::CaptivePortalTabHelper(profile(), web_contents())); |
| 138 #endif | 138 #endif |
| 139 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); | 139 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); |
| 140 core_tab_helper_.reset(new CoreTabHelper(contents)); | 140 CoreTabHelper::CreateForWebContents(contents); |
| 141 extensions::TabHelper::CreateForWebContents(contents); | 141 extensions::TabHelper::CreateForWebContents(contents); |
| 142 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); | 142 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); |
| 143 find_tab_helper_.reset(new FindTabHelper(contents)); | 143 find_tab_helper_.reset(new FindTabHelper(contents)); |
| 144 history_tab_helper_.reset(new HistoryTabHelper(contents)); | 144 history_tab_helper_.reset(new HistoryTabHelper(contents)); |
| 145 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); | 145 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); |
| 146 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); | 146 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); |
| 147 MetroPinTabHelper::CreateForWebContents(contents); | 147 MetroPinTabHelper::CreateForWebContents(contents); |
| 148 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); | 148 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); |
| 149 password_manager_.reset( | 149 password_manager_.reset( |
| 150 new PasswordManager(contents, password_manager_delegate_.get())); | 150 new PasswordManager(contents, password_manager_delegate_.get())); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 //////////////////////////////////////////////////////////////////////////////// | 252 //////////////////////////////////////////////////////////////////////////////// |
| 253 // WebContentsObserver overrides | 253 // WebContentsObserver overrides |
| 254 | 254 |
| 255 void TabContents::WebContentsDestroyed(WebContents* tab) { | 255 void TabContents::WebContentsDestroyed(WebContents* tab) { |
| 256 // Destruction of the WebContents should only be done by us from our | 256 // Destruction of the WebContents should only be done by us from our |
| 257 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 257 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
| 258 // will attempt to access the WebContents and we'll crash. | 258 // will attempt to access the WebContents and we'll crash. |
| 259 DCHECK(in_destructor_); | 259 DCHECK(in_destructor_); |
| 260 } | 260 } |
| OLD | NEW |