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/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" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "components/autofill/core/browser/autofill_manager.h" | 49 #include "components/autofill/core/browser/autofill_manager.h" |
50 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 50 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
51 #include "content/public/browser/web_contents.h" | 51 #include "content/public/browser/web_contents.h" |
52 #include "extensions/browser/view_type_utils.h" | 52 #include "extensions/browser/view_type_utils.h" |
53 | 53 |
54 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 54 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
55 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 55 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
56 #endif | 56 #endif |
57 | 57 |
58 #if defined(ENABLE_PRINTING) | 58 #if defined(ENABLE_PRINTING) |
| 59 #if defined(ENABLE_FULL_PRINTING) |
59 #include "chrome/browser/printing/print_preview_message_handler.h" | 60 #include "chrome/browser/printing/print_preview_message_handler.h" |
60 #include "chrome/browser/printing/print_view_manager.h" | 61 #include "chrome/browser/printing/print_view_manager.h" |
61 #endif | 62 #else |
| 63 #include "chrome/browser/printing/print_view_manager_basic.h" |
| 64 #endif // defined(ENABLE_FULL_PRINTING) |
| 65 #endif // defined(ENABLE_PRINTING) |
62 | 66 |
63 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 67 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
64 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 68 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
65 #endif | 69 #endif |
66 | 70 |
67 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
68 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" | 72 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" |
69 #endif | 73 #endif |
70 | 74 |
71 using autofill::AutofillDriverImpl; | 75 using autofill::AutofillDriverImpl; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 158 |
155 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 159 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
156 captive_portal::CaptivePortalTabHelper::CreateForWebContents(web_contents); | 160 captive_portal::CaptivePortalTabHelper::CreateForWebContents(web_contents); |
157 #endif | 161 #endif |
158 | 162 |
159 if (profile->IsManaged()) { | 163 if (profile->IsManaged()) { |
160 ManagedModeNavigationObserver::CreateForWebContents(web_contents); | 164 ManagedModeNavigationObserver::CreateForWebContents(web_contents); |
161 } | 165 } |
162 | 166 |
163 #if defined(ENABLE_PRINTING) | 167 #if defined(ENABLE_PRINTING) |
| 168 #if defined(ENABLE_FULL_PRINTING) |
| 169 printing::PrintViewManager::CreateForWebContents(web_contents); |
164 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); | 170 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); |
165 printing::PrintViewManager::CreateForWebContents(web_contents); | 171 #else |
166 #endif | 172 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); |
| 173 #endif // defined(ENABLE_FULL_PRINTING) |
| 174 #endif // defined(ENABLE_PRINTING) |
167 | 175 |
168 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 176 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
169 // If this is not an incognito window, setup to handle one-click login. | 177 // If this is not an incognito window, setup to handle one-click login. |
170 // We don't want to check that the profile is already connected at this time | 178 // We don't want to check that the profile is already connected at this time |
171 // because the connected state may change while this tab is open. Having a | 179 // because the connected state may change while this tab is open. Having a |
172 // one-click signin helper attached does not cause problems if the profile | 180 // one-click signin helper attached does not cause problems if the profile |
173 // happens to be already connected. | 181 // happens to be already connected. |
174 if (OneClickSigninHelper::CanOffer(web_contents, | 182 if (OneClickSigninHelper::CanOffer(web_contents, |
175 OneClickSigninHelper::CAN_OFFER_FOR_ALL, | 183 OneClickSigninHelper::CAN_OFFER_FOR_ALL, |
176 std::string(), | 184 std::string(), |
177 NULL)) { | 185 NULL)) { |
178 OneClickSigninHelper::CreateForWebContents(web_contents); | 186 OneClickSigninHelper::CreateForWebContents(web_contents); |
179 } | 187 } |
180 #endif | 188 #endif |
181 | 189 |
182 #if defined(OS_WIN) | 190 #if defined(OS_WIN) |
183 MetroPinTabHelper::CreateForWebContents(web_contents); | 191 MetroPinTabHelper::CreateForWebContents(web_contents); |
184 #endif | 192 #endif |
185 } | 193 } |
OLD | NEW |