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/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" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 if (url.host() == chrome::kChromeUISettingsFrameHost) | 228 if (url.host() == chrome::kChromeUISettingsFrameHost) |
| 229 return &NewWebUI<options2::OptionsUI>; | 229 return &NewWebUI<options2::OptionsUI>; |
| 230 // chrome://flags is currently unsupported on Android. | 230 // chrome://flags is currently unsupported on Android. |
| 231 if (url.host() == chrome::kChromeUIFlagsHost) | 231 if (url.host() == chrome::kChromeUIFlagsHost) |
| 232 return &NewWebUI<FlagsUI>; | 232 return &NewWebUI<FlagsUI>; |
| 233 // chrome://inspect isn't supported on Android. Page debugging is handled by a | 233 // chrome://inspect isn't supported on Android. Page debugging is handled by a |
| 234 // remote devtools on the host machine, and other elements (Shared Workers, | 234 // remote devtools on the host machine, and other elements (Shared Workers, |
| 235 // extensions, etc) aren't supported. | 235 // extensions, etc) aren't supported. |
| 236 if (url.host() == chrome::kChromeUIInspectHost) | 236 if (url.host() == chrome::kChromeUIInspectHost) |
| 237 return &NewWebUI<InspectUI>; | 237 return &NewWebUI<InspectUI>; |
| 238 // Android doesn't support print/print-preview. | 238 #endif // !defined(OS_ANDROID) |
| 239 #if defined(ENABLE_PRINTING) | |
|
Lei Zhang
2012/06/08 23:24:52
I would write this as:
#if !defined(OS_ANDROID)
A
Xianzhu
2012/06/09 00:51:30
Done.
| |
| 239 if (url.host() == chrome::kChromeUIPrintHost && | 240 if (url.host() == chrome::kChromeUIPrintHost && |
| 240 !g_browser_process->local_state()->GetBoolean( | 241 !g_browser_process->local_state()->GetBoolean( |
| 241 prefs::kPrintPreviewDisabled)) { | 242 prefs::kPrintPreviewDisabled)) { |
| 242 return &NewWebUI<PrintPreviewUI>; | 243 return &NewWebUI<PrintPreviewUI>; |
| 243 } | 244 } |
| 245 #endif | |
| 246 #if !defined(OS_ANDROID) | |
| 244 // Android does not support plugins for now. | 247 // Android does not support plugins for now. |
| 245 if (url.host() == chrome::kChromeUIPluginsHost) | 248 if (url.host() == chrome::kChromeUIPluginsHost) |
| 246 return &NewWebUI<PluginsUI>; | 249 return &NewWebUI<PluginsUI>; |
| 247 #endif | 250 #endif |
| 248 #if defined(OS_WIN) | 251 #if defined(OS_WIN) |
| 249 if (url.host() == chrome::kChromeUIConflictsHost) | 252 if (url.host() == chrome::kChromeUIConflictsHost) |
| 250 return &NewWebUI<ConflictsUI>; | 253 return &NewWebUI<ConflictsUI>; |
| 251 #endif | 254 #endif |
| 252 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) | 255 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) |
| 253 if (url.host() == chrome::kChromeUICertificateViewerHost) | 256 if (url.host() == chrome::kChromeUICertificateViewerHost) |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 504 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 502 return options2::OptionsUI::GetFaviconResourceBytes(); | 505 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 503 | 506 |
| 504 // Android doesn't use the plugins pages. | 507 // Android doesn't use the plugins pages. |
| 505 if (page_url.host() == chrome::kChromeUIPluginsHost) | 508 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 506 return PluginsUI::GetFaviconResourceBytes(); | 509 return PluginsUI::GetFaviconResourceBytes(); |
| 507 #endif | 510 #endif |
| 508 | 511 |
| 509 return NULL; | 512 return NULL; |
| 510 } | 513 } |
| OLD | NEW |