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 "base/command_line.h" |
8 #include "chrome/browser/api/infobars/infobar_service.h" | 8 #include "chrome/browser/api/infobars/infobar_service.h" |
9 #include "chrome/browser/autofill/autofill_external_delegate.h" | 9 #include "chrome/browser/autofill/autofill_external_delegate.h" |
10 #include "chrome/browser/autofill/autofill_manager.h" | 10 #include "chrome/browser/autofill/autofill_manager.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Create all the tab helpers. | 99 // Create all the tab helpers. |
100 | 100 |
101 Profile* profile = | 101 Profile* profile = |
102 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 102 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
103 | 103 |
104 // SessionTabHelper comes first because it sets up the tab ID, and other | 104 // SessionTabHelper comes first because it sets up the tab ID, and other |
105 // helpers may rely on that. | 105 // helpers may rely on that. |
106 SessionTabHelper::CreateForWebContents(web_contents); | 106 SessionTabHelper::CreateForWebContents(web_contents); |
107 | 107 |
108 AlternateErrorPageTabObserver::CreateForWebContents(web_contents); | 108 AlternateErrorPageTabObserver::CreateForWebContents(web_contents); |
109 TabAutofillManagerDelegate::CreateForWebContents(web_contents); | 109 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents); |
110 AutofillManager::CreateForWebContentsAndDelegate( | 110 AutofillManager::CreateForWebContentsAndDelegate( |
111 web_contents, TabAutofillManagerDelegate::FromWebContents(web_contents)); | 111 web_contents, |
| 112 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents)); |
112 if (CommandLine::ForCurrentProcess()->HasSwitch( | 113 if (CommandLine::ForCurrentProcess()->HasSwitch( |
113 switches::kEnableNewAutofillUi)) { | 114 switches::kEnableNewAutofillUi)) { |
114 AutofillExternalDelegate::CreateForWebContentsAndManager( | 115 AutofillExternalDelegate::CreateForWebContentsAndManager( |
115 web_contents, AutofillManager::FromWebContents(web_contents)); | 116 web_contents, AutofillManager::FromWebContents(web_contents)); |
116 AutofillManager::FromWebContents(web_contents)->SetExternalDelegate( | 117 AutofillManager::FromWebContents(web_contents)->SetExternalDelegate( |
117 AutofillExternalDelegate::FromWebContents(web_contents)); | 118 AutofillExternalDelegate::FromWebContents(web_contents)); |
118 } | 119 } |
119 BlockedContentTabHelper::CreateForWebContents(web_contents); | 120 BlockedContentTabHelper::CreateForWebContents(web_contents); |
120 BookmarkTabHelper::CreateForWebContents(web_contents); | 121 BookmarkTabHelper::CreateForWebContents(web_contents); |
121 chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents( | 122 chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 if (OneClickSigninHelper::CanOffer( | 181 if (OneClickSigninHelper::CanOffer( |
181 web_contents, OneClickSigninHelper::CAN_OFFER_FOR_ALL, "", NULL)) { | 182 web_contents, OneClickSigninHelper::CAN_OFFER_FOR_ALL, "", NULL)) { |
182 OneClickSigninHelper::CreateForWebContents(web_contents); | 183 OneClickSigninHelper::CreateForWebContents(web_contents); |
183 } | 184 } |
184 #endif | 185 #endif |
185 | 186 |
186 #if defined(OS_WIN) | 187 #if defined(OS_WIN) |
187 MetroPinTabHelper::CreateForWebContents(web_contents); | 188 MetroPinTabHelper::CreateForWebContents(web_contents); |
188 #endif | 189 #endif |
189 } | 190 } |
OLD | NEW |