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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 #endif | 521 #endif |
522 ) { | 522 ) { |
523 return &NewWebUI<AboutUI>; | 523 return &NewWebUI<AboutUI>; |
524 } | 524 } |
525 | 525 |
526 #if defined(ENABLE_EXTENSIONS) | 526 #if defined(ENABLE_EXTENSIONS) |
527 if (url.host() == chrome::kChromeUIExtensionsFrameHost) | 527 if (url.host() == chrome::kChromeUIExtensionsFrameHost) |
528 return &NewWebUI<extensions::ExtensionsUI>; | 528 return &NewWebUI<extensions::ExtensionsUI>; |
529 #endif | 529 #endif |
530 #if defined(ENABLE_FULL_PRINTING) | 530 #if defined(ENABLE_FULL_PRINTING) |
531 if (url.host() == chrome::kChromeUIPrintHost) | 531 if (url.host() == chrome::kChromeUIPrintHost && |
| 532 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { |
532 return &NewWebUI<PrintPreviewUI>; | 533 return &NewWebUI<PrintPreviewUI>; |
| 534 } |
533 #endif | 535 #endif |
534 | 536 |
535 if (IsEnableDomDistillerSet() && | 537 if (IsEnableDomDistillerSet() && |
536 url.host() == dom_distiller::kChromeUIDomDistillerHost) { | 538 url.host() == dom_distiller::kChromeUIDomDistillerHost) { |
537 return &NewWebUI<dom_distiller::DomDistillerUi>; | 539 return &NewWebUI<dom_distiller::DomDistillerUi>; |
538 } | 540 } |
539 | 541 |
540 return NULL; | 542 return NULL; |
541 } | 543 } |
542 | 544 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 #endif | 723 #endif |
722 | 724 |
723 // Android doesn't use the plugins pages. | 725 // Android doesn't use the plugins pages. |
724 if (page_url.host() == chrome::kChromeUIPluginsHost) | 726 if (page_url.host() == chrome::kChromeUIPluginsHost) |
725 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 727 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
726 | 728 |
727 #endif | 729 #endif |
728 | 730 |
729 return NULL; | 731 return NULL; |
730 } | 732 } |
OLD | NEW |