OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_helpers.h" | 5 #include "chrome/browser/ui/tab_helpers.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/chrome_content_settings_client.h" | 9 #include "chrome/browser/content_settings/chrome_content_settings_client.h" |
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 70 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
71 #include "chrome/browser/extensions/tab_helper.h" | 71 #include "chrome/browser/extensions/tab_helper.h" |
72 #include "extensions/browser/view_type_utils.h" | 72 #include "extensions/browser/view_type_utils.h" |
73 #endif | 73 #endif |
74 | 74 |
75 #if defined(ENABLE_MANAGED_USERS) | 75 #if defined(ENABLE_MANAGED_USERS) |
76 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" | 76 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" |
77 #endif | 77 #endif |
78 | 78 |
79 #if defined(ENABLE_PRINTING) | 79 #if defined(ENABLE_PRINTING) |
80 #if defined(ENABLE_FULL_PRINTING) | 80 #if defined(ENABLE_PRINT_PREVIEW) |
81 #include "chrome/browser/printing/print_preview_message_handler.h" | 81 #include "chrome/browser/printing/print_preview_message_handler.h" |
82 #include "chrome/browser/printing/print_view_manager.h" | 82 #include "chrome/browser/printing/print_view_manager.h" |
83 #else | 83 #else |
84 #include "chrome/browser/printing/print_view_manager_basic.h" | 84 #include "chrome/browser/printing/print_view_manager_basic.h" |
85 #endif // defined(ENABLE_FULL_PRINTING) | 85 #endif // defined(ENABLE_PRINT_PREVIEW) |
86 #endif // defined(ENABLE_PRINTING) | 86 #endif // defined(ENABLE_PRINTING) |
87 | 87 |
88 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 88 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
89 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 89 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
90 #endif | 90 #endif |
91 | 91 |
92 using content::WebContents; | 92 using content::WebContents; |
93 | 93 |
94 namespace { | 94 namespace { |
95 | 95 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 #if defined(ENABLE_EXTENSIONS) | 199 #if defined(ENABLE_EXTENSIONS) |
200 extensions::TabHelper::CreateForWebContents(web_contents); | 200 extensions::TabHelper::CreateForWebContents(web_contents); |
201 #endif | 201 #endif |
202 | 202 |
203 #if defined(ENABLE_MANAGED_USERS) | 203 #if defined(ENABLE_MANAGED_USERS) |
204 SupervisedUserNavigationObserver::CreateForWebContents(web_contents); | 204 SupervisedUserNavigationObserver::CreateForWebContents(web_contents); |
205 #endif | 205 #endif |
206 | 206 |
207 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) | 207 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) |
208 #if defined(ENABLE_FULL_PRINTING) | 208 #if defined(ENABLE_PRINT_PREVIEW) |
209 printing::PrintViewManager::CreateForWebContents(web_contents); | 209 printing::PrintViewManager::CreateForWebContents(web_contents); |
210 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); | 210 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); |
211 #else | 211 #else |
212 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); | 212 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); |
213 #endif // defined(ENABLE_FULL_PRINTING) | 213 #endif // defined(ENABLE_PRINT_PREVIEW) |
214 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) | 214 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) |
215 | 215 |
216 if (CommandLine::ForCurrentProcess()->HasSwitch( | 216 if (CommandLine::ForCurrentProcess()->HasSwitch( |
217 switches::kEnableDomDistiller)) { | 217 switches::kEnableDomDistiller)) { |
218 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( | 218 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( |
219 web_contents); | 219 web_contents); |
220 } | 220 } |
221 | 221 |
222 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 222 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
223 // If this is not an incognito window, setup to handle one-click login. | 223 // If this is not an incognito window, setup to handle one-click login. |
(...skipping 11 matching lines...) Expand all Loading... |
235 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); | 235 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); |
236 } | 236 } |
237 #endif | 237 #endif |
238 | 238 |
239 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( | 239 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( |
240 web_contents->GetBrowserContext())) { | 240 web_contents->GetBrowserContext())) { |
241 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( | 241 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( |
242 web_contents); | 242 web_contents); |
243 } | 243 } |
244 } | 244 } |
OLD | NEW |