| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 find_tab_helper_.reset(new FindTabHelper(contents)); | 136 find_tab_helper_.reset(new FindTabHelper(contents)); |
| 137 history_tab_helper_.reset(new HistoryTabHelper(contents)); | 137 history_tab_helper_.reset(new HistoryTabHelper(contents)); |
| 138 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); | 138 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); |
| 139 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); | 139 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); |
| 140 MetroPinTabHelper::CreateForWebContents(contents); | 140 MetroPinTabHelper::CreateForWebContents(contents); |
| 141 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); | 141 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); |
| 142 password_manager_.reset( | 142 password_manager_.reset( |
| 143 new PasswordManager(contents, password_manager_delegate_.get())); | 143 new PasswordManager(contents, password_manager_delegate_.get())); |
| 144 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); | 144 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); |
| 145 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); | 145 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); |
| 146 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); | 146 SearchEngineTabHelper::CreateForWebContents(contents); |
| 147 chrome::search::SearchTabHelper::CreateForWebContents(contents); | 147 chrome::search::SearchTabHelper::CreateForWebContents(contents); |
| 148 SnapshotTabHelper::CreateForWebContents(contents); | 148 SnapshotTabHelper::CreateForWebContents(contents); |
| 149 SSLTabHelper::CreateForWebContents(contents); | 149 SSLTabHelper::CreateForWebContents(contents); |
| 150 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); | 150 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); |
| 151 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 151 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
| 152 zoom_controller_.reset(new ZoomController(this)); | 152 zoom_controller_.reset(new ZoomController(this)); |
| 153 | 153 |
| 154 #if defined(ENABLE_AUTOMATION) | 154 #if defined(ENABLE_AUTOMATION) |
| 155 automation_tab_helper_.reset(new AutomationTabHelper(contents)); | 155 automation_tab_helper_.reset(new AutomationTabHelper(contents)); |
| 156 #endif | 156 #endif |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 //////////////////////////////////////////////////////////////////////////////// | 243 //////////////////////////////////////////////////////////////////////////////// |
| 244 // WebContentsObserver overrides | 244 // WebContentsObserver overrides |
| 245 | 245 |
| 246 void TabContents::WebContentsDestroyed(WebContents* tab) { | 246 void TabContents::WebContentsDestroyed(WebContents* tab) { |
| 247 // Destruction of the WebContents should only be done by us from our | 247 // Destruction of the WebContents should only be done by us from our |
| 248 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 248 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
| 249 // will attempt to access the WebContents and we'll crash. | 249 // will attempt to access the WebContents and we'll crash. |
| 250 DCHECK(in_destructor_); | 250 DCHECK(in_destructor_); |
| 251 } | 251 } |
| OLD | NEW |