| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 new captive_portal::CaptivePortalTabHelper(profile(), web_contents())); | 133 new captive_portal::CaptivePortalTabHelper(profile(), web_contents())); |
| 134 #endif | 134 #endif |
| 135 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); | 135 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); |
| 136 core_tab_helper_.reset(new CoreTabHelper(contents)); | 136 core_tab_helper_.reset(new CoreTabHelper(contents)); |
| 137 extension_tab_helper_.reset(new extensions::TabHelper(this)); | 137 extension_tab_helper_.reset(new extensions::TabHelper(this)); |
| 138 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); | 138 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); |
| 139 find_tab_helper_.reset(new FindTabHelper(contents)); | 139 find_tab_helper_.reset(new FindTabHelper(contents)); |
| 140 history_tab_helper_.reset(new HistoryTabHelper(contents)); | 140 history_tab_helper_.reset(new HistoryTabHelper(contents)); |
| 141 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); | 141 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); |
| 142 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); | 142 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); |
| 143 metro_pin_tab_helper_.reset(new MetroPinTabHelper(contents)); | 143 MetroPinTabHelper::CreateForWebContents(contents); |
| 144 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); | 144 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); |
| 145 password_manager_.reset( | 145 password_manager_.reset( |
| 146 new PasswordManager(contents, password_manager_delegate_.get())); | 146 new PasswordManager(contents, password_manager_delegate_.get())); |
| 147 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); | 147 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); |
| 148 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); | 148 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); |
| 149 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); | 149 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); |
| 150 bool is_search_enabled = | 150 bool is_search_enabled = |
| 151 chrome::search::IsInstantExtendedAPIEnabled(profile()); | 151 chrome::search::IsInstantExtendedAPIEnabled(profile()); |
| 152 search_tab_helper_.reset( | 152 search_tab_helper_.reset( |
| 153 new chrome::search::SearchTabHelper(this, is_search_enabled)); | 153 new chrome::search::SearchTabHelper(this, is_search_enabled)); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 //////////////////////////////////////////////////////////////////////////////// | 254 //////////////////////////////////////////////////////////////////////////////// |
| 255 // WebContentsObserver overrides | 255 // WebContentsObserver overrides |
| 256 | 256 |
| 257 void TabContents::WebContentsDestroyed(WebContents* tab) { | 257 void TabContents::WebContentsDestroyed(WebContents* tab) { |
| 258 // Destruction of the WebContents should only be done by us from our | 258 // Destruction of the WebContents should only be done by us from our |
| 259 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 259 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
| 260 // will attempt to access the WebContents and we'll crash. | 260 // will attempt to access the WebContents and we'll crash. |
| 261 DCHECK(in_destructor_); | 261 DCHECK(in_destructor_); |
| 262 } | 262 } |
| OLD | NEW |