Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "chrome/browser/plugins/plugin_observer.h" | 25 #include "chrome/browser/plugins/plugin_observer.h" |
| 26 #include "chrome/browser/prerender/prerender_tab_helper.h" | 26 #include "chrome/browser/prerender/prerender_tab_helper.h" |
| 27 #include "chrome/browser/printing/print_preview_message_handler.h" | 27 #include "chrome/browser/printing/print_preview_message_handler.h" |
| 28 #include "chrome/browser/printing/print_view_manager.h" | 28 #include "chrome/browser/printing/print_view_manager.h" |
| 29 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" | 29 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
| 30 #include "chrome/browser/sessions/session_tab_helper.h" | 30 #include "chrome/browser/sessions/session_tab_helper.h" |
| 31 #include "chrome/browser/ssl/ssl_tab_helper.h" | 31 #include "chrome/browser/ssl/ssl_tab_helper.h" |
| 32 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" | 32 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" |
| 33 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 33 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 34 #include "chrome/browser/translate/translate_tab_helper.h" | 34 #include "chrome/browser/translate/translate_tab_helper.h" |
| 35 #include "chrome/browser/ui/android/window_android_helper.h" | |
| 35 #include "chrome/browser/ui/alternate_error_tab_observer.h" | 36 #include "chrome/browser/ui/alternate_error_tab_observer.h" |
| 36 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" | 37 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" |
| 37 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 38 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
| 38 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 39 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 39 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 40 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
| 40 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 41 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 41 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 42 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
| 42 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" | 43 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
| 43 #include "chrome/browser/ui/metro_pin_tab_helper.h" | 44 #include "chrome/browser/ui/metro_pin_tab_helper.h" |
| 44 #include "chrome/browser/ui/pdf/pdf_tab_helper.h" | 45 #include "chrome/browser/ui/pdf/pdf_tab_helper.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 PrefsTabHelper::CreateForWebContents(contents); | 150 PrefsTabHelper::CreateForWebContents(contents); |
| 150 prerender::PrerenderTabHelper::CreateForWebContents(contents); | 151 prerender::PrerenderTabHelper::CreateForWebContents(contents); |
| 151 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(contents); | 152 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(contents); |
| 152 SearchEngineTabHelper::CreateForWebContents(contents); | 153 SearchEngineTabHelper::CreateForWebContents(contents); |
| 153 chrome::search::SearchTabHelper::CreateForWebContents(contents); | 154 chrome::search::SearchTabHelper::CreateForWebContents(contents); |
| 154 SnapshotTabHelper::CreateForWebContents(contents); | 155 SnapshotTabHelper::CreateForWebContents(contents); |
| 155 SSLTabHelper::CreateForWebContents(contents); | 156 SSLTabHelper::CreateForWebContents(contents); |
| 156 TabContentsSyncedTabDelegate::CreateForWebContents(contents); | 157 TabContentsSyncedTabDelegate::CreateForWebContents(contents); |
| 157 TabSpecificContentSettings::CreateForWebContents(contents); | 158 TabSpecificContentSettings::CreateForWebContents(contents); |
| 158 TranslateTabHelper::CreateForWebContents(contents); | 159 TranslateTabHelper::CreateForWebContents(contents); |
| 160 WindowAndroidHelper::CreateForWebContents(contents); | |
|
Avi (use Gerrit)
2012/10/09 21:30:50
No.
First, this is Android only, so why didn't yo
aurimas (slooooooooow)
2012/10/10 00:22:14
Done.
| |
| 159 ZoomController::CreateForWebContents(contents); | 161 ZoomController::CreateForWebContents(contents); |
| 160 | 162 |
| 161 #if defined(ENABLE_AUTOMATION) | 163 #if defined(ENABLE_AUTOMATION) |
| 162 AutomationTabHelper::CreateForWebContents(contents); | 164 AutomationTabHelper::CreateForWebContents(contents); |
| 163 #endif | 165 #endif |
| 164 | 166 |
| 165 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 167 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 166 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents); | 168 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents); |
| 167 #endif | 169 #endif |
| 168 | 170 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 | 239 |
| 238 //////////////////////////////////////////////////////////////////////////////// | 240 //////////////////////////////////////////////////////////////////////////////// |
| 239 // WebContentsObserver overrides | 241 // WebContentsObserver overrides |
| 240 | 242 |
| 241 void TabContents::WebContentsDestroyed(WebContents* tab) { | 243 void TabContents::WebContentsDestroyed(WebContents* tab) { |
| 242 // 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 |
| 243 // 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) |
| 244 // will attempt to access the WebContents and we'll crash. | 246 // will attempt to access the WebContents and we'll crash. |
| 245 DCHECK(in_destructor_); | 247 DCHECK(in_destructor_); |
| 246 } | 248 } |
| OLD | NEW |