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/browser_tab_contents.h" | 5 #include "chrome/browser/ui/browser_tab_contents.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "chrome/browser/apps/app_url_redirector.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 10 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 10 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
| 11 #include "chrome/browser/extensions/tab_helper.h" | 11 #include "chrome/browser/extensions/tab_helper.h" |
| 12 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 12 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
| 13 #include "chrome/browser/favicon/favicon_tab_helper.h" | 13 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 14 #include "chrome/browser/history/history_tab_helper.h" | 14 #include "chrome/browser/history/history_tab_helper.h" |
| 15 #include "chrome/browser/infobars/infobar_service.h" | 15 #include "chrome/browser/infobars/infobar_service.h" |
| 16 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" | 16 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
| 17 #include "chrome/browser/net/load_time_stats.h" | 17 #include "chrome/browser/net/load_time_stats.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 | 105 |
| 106 // Create all the tab helpers. | 106 // Create all the tab helpers. |
| 107 | 107 |
| 108 Profile* profile = | 108 Profile* profile = |
| 109 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 109 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 110 | 110 |
| 111 // SessionTabHelper comes first because it sets up the tab ID, and other | 111 // SessionTabHelper comes first because it sets up the tab ID, and other |
| 112 // helpers may rely on that. | 112 // helpers may rely on that. |
| 113 SessionTabHelper::CreateForWebContents(web_contents); | 113 SessionTabHelper::CreateForWebContents(web_contents); |
| 114 | 114 |
| 115 // We don't want to ever send visited URLs to apps in incognito. | |
| 116 // Technically, apps are not supported in incognito, but explicitly check | |
| 117 // for that. See b/240879, which tracks incognito support for v2 apps. | |
|
benwells
2013/09/04 23:54:20
Nit: crbug.com/ instead of b/. b/ is a different,
sergeygs
2013/09/05 09:19:03
Done.
| |
| 118 if (!profile->IsOffTheRecord()) | |
| 119 AppUrlRedirector::CreateForWebContents(web_contents); | |
| 120 | |
| 115 AlternateErrorPageTabObserver::CreateForWebContents(web_contents); | 121 AlternateErrorPageTabObserver::CreateForWebContents(web_contents); |
| 116 TabAutofillManagerDelegate::CreateForWebContents(web_contents); | 122 TabAutofillManagerDelegate::CreateForWebContents(web_contents); |
| 117 AutofillDriverImpl::CreateForWebContentsAndDelegate( | 123 AutofillDriverImpl::CreateForWebContentsAndDelegate( |
| 118 web_contents, | 124 web_contents, |
| 119 TabAutofillManagerDelegate::FromWebContents(web_contents), | 125 TabAutofillManagerDelegate::FromWebContents(web_contents), |
| 120 g_browser_process->GetApplicationLocale(), | 126 g_browser_process->GetApplicationLocale(), |
| 121 AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); | 127 AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); |
| 122 BlockedContentTabHelper::CreateForWebContents(web_contents); | 128 BlockedContentTabHelper::CreateForWebContents(web_contents); |
| 123 BookmarkTabHelper::CreateForWebContents(web_contents); | 129 BookmarkTabHelper::CreateForWebContents(web_contents); |
| 124 chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents( | 130 chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents( |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 NULL)) { | 195 NULL)) { |
| 190 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( | 196 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( |
| 191 web_contents, PasswordManager::FromWebContents(web_contents)); | 197 web_contents, PasswordManager::FromWebContents(web_contents)); |
| 192 } | 198 } |
| 193 #endif | 199 #endif |
| 194 | 200 |
| 195 #if defined(OS_WIN) | 201 #if defined(OS_WIN) |
| 196 MetroPinTabHelper::CreateForWebContents(web_contents); | 202 MetroPinTabHelper::CreateForWebContents(web_contents); |
| 197 #endif | 203 #endif |
| 198 } | 204 } |
| OLD | NEW |