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/webui/chrome_web_ui_controller_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/about_flags.h" | 8 #include "chrome/browser/about_flags.h" |
9 #include "chrome/browser/browser_process.h" | |
10 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_web_ui.h" | 10 #include "chrome/browser/extensions/extension_web_ui.h" |
12 #include "chrome/browser/history/history_types.h" | 11 #include "chrome/browser/history/history_types.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/printing/print_preview_tab_controller.h" | 13 #include "chrome/browser/printing/print_preview_tab_controller.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
18 #include "chrome/browser/ui/webui/about_ui.h" | 17 #include "chrome/browser/ui/webui/about_ui.h" |
19 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 18 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // Android does not support plugins for now. | 247 // Android does not support plugins for now. |
249 if (url.host() == chrome::kChromeUIPluginsHost) | 248 if (url.host() == chrome::kChromeUIPluginsHost) |
250 return &NewWebUI<PluginsUI>; | 249 return &NewWebUI<PluginsUI>; |
251 #endif | 250 #endif |
252 #if defined(ENABLE_EXTENSIONS) | 251 #if defined(ENABLE_EXTENSIONS) |
253 if (url.host() == chrome::kChromeUIExtensionsFrameHost) | 252 if (url.host() == chrome::kChromeUIExtensionsFrameHost) |
254 return &NewWebUI<ExtensionsUI>; | 253 return &NewWebUI<ExtensionsUI>; |
255 #endif | 254 #endif |
256 #if defined(ENABLE_PRINTING) | 255 #if defined(ENABLE_PRINTING) |
257 if (url.host() == chrome::kChromeUIPrintHost && | 256 if (url.host() == chrome::kChromeUIPrintHost && |
258 !g_browser_process->local_state()->GetBoolean( | 257 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) |
259 prefs::kPrintPreviewDisabled)) { | |
260 return &NewWebUI<PrintPreviewUI>; | 258 return &NewWebUI<PrintPreviewUI>; |
261 } | |
262 #endif | 259 #endif |
263 #if defined(OS_WIN) | 260 #if defined(OS_WIN) |
264 if (url.host() == chrome::kChromeUIConflictsHost) | 261 if (url.host() == chrome::kChromeUIConflictsHost) |
265 return &NewWebUI<ConflictsUI>; | 262 return &NewWebUI<ConflictsUI>; |
266 if (url.host() == chrome::kChromeUIMetroFlowHost) | 263 if (url.host() == chrome::kChromeUIMetroFlowHost) |
267 return &NewWebUI<SetAsDefaultBrowserUI>; | 264 return &NewWebUI<SetAsDefaultBrowserUI>; |
268 #endif | 265 #endif |
269 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) | 266 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) |
270 if (url.host() == chrome::kChromeUICertificateViewerHost) | 267 if (url.host() == chrome::kChromeUICertificateViewerHost) |
271 return &NewWebUI<CertificateViewerUI>; | 268 return &NewWebUI<CertificateViewerUI>; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 521 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
525 return options2::OptionsUI::GetFaviconResourceBytes(); | 522 return options2::OptionsUI::GetFaviconResourceBytes(); |
526 | 523 |
527 // Android doesn't use the plugins pages. | 524 // Android doesn't use the plugins pages. |
528 if (page_url.host() == chrome::kChromeUIPluginsHost) | 525 if (page_url.host() == chrome::kChromeUIPluginsHost) |
529 return PluginsUI::GetFaviconResourceBytes(); | 526 return PluginsUI::GetFaviconResourceBytes(); |
530 #endif | 527 #endif |
531 | 528 |
532 return NULL; | 529 return NULL; |
533 } | 530 } |
OLD | NEW |