Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 1318143002: Always use ENABLE_PLUGINS to indicate plugins support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tryjob failures: forgot to set/check ENABLE_PDF in a couple places. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 return &NewWebUI<AppLauncherPageUI>; 376 return &NewWebUI<AppLauncherPageUI>;
377 } 377 }
378 #endif 378 #endif
379 379
380 // Bookmarks are part of NTP on Android. 380 // Bookmarks are part of NTP on Android.
381 if (url.host() == chrome::kChromeUIBookmarksHost) 381 if (url.host() == chrome::kChromeUIBookmarksHost)
382 return &NewWebUI<BookmarksUI>; 382 return &NewWebUI<BookmarksUI>;
383 // Downloads list on Android uses the built-in download manager. 383 // Downloads list on Android uses the built-in download manager.
384 if (url.host() == chrome::kChromeUIDownloadsHost) 384 if (url.host() == chrome::kChromeUIDownloadsHost)
385 return &NewWebUI<DownloadsUI>; 385 return &NewWebUI<DownloadsUI>;
386 // Flash is not available on android.
387 if (url.host() == chrome::kChromeUIFlashHost)
388 return &NewWebUI<FlashUI>;
389 if (url.host() == chrome::kChromeUIGCMInternalsHost) 386 if (url.host() == chrome::kChromeUIGCMInternalsHost)
390 return &NewWebUI<GCMInternalsUI>; 387 return &NewWebUI<GCMInternalsUI>;
391 // Help is implemented with native UI elements on Android. 388 // Help is implemented with native UI elements on Android.
392 if (url.host() == chrome::kChromeUIHelpFrameHost) 389 if (url.host() == chrome::kChromeUIHelpFrameHost)
393 return &NewWebUI<HelpUI>; 390 return &NewWebUI<HelpUI>;
394 // Identity API is not available on Android. 391 // Identity API is not available on Android.
395 if (url.host() == chrome::kChromeUIIdentityInternalsHost) 392 if (url.host() == chrome::kChromeUIIdentityInternalsHost)
396 return &NewWebUI<IdentityInternalsUI>; 393 return &NewWebUI<IdentityInternalsUI>;
397 if (url.host() == chrome::kChromeUINewTabHost) 394 if (url.host() == chrome::kChromeUINewTabHost)
398 return &NewWebUI<NewTabUI>; 395 return &NewWebUI<NewTabUI>;
399 if (url.host() == chrome::kChromeUIMdSettingsHost && 396 if (url.host() == chrome::kChromeUIMdSettingsHost &&
400 ::switches::MdSettingsEnabled()) { 397 ::switches::MdSettingsEnabled()) {
401 return &NewWebUI<settings::MdSettingsUI>; 398 return &NewWebUI<settings::MdSettingsUI>;
402 } 399 }
403 // Android does not support plugins for now.
404 if (url.host() == chrome::kChromeUIPluginsHost)
405 return &NewWebUI<PluginsUI>;
406 if (url.host() == chrome::kChromeUIQuotaInternalsHost) 400 if (url.host() == chrome::kChromeUIQuotaInternalsHost)
407 return &NewWebUI<QuotaInternalsUI>; 401 return &NewWebUI<QuotaInternalsUI>;
408 // Settings are implemented with native UI elements on Android. 402 // Settings are implemented with native UI elements on Android.
409 // Handle chrome://settings if settings in a window and about in settings 403 // Handle chrome://settings if settings in a window and about in settings
410 // are enabled. 404 // are enabled.
411 if (url.host() == chrome::kChromeUISettingsFrameHost || 405 if (url.host() == chrome::kChromeUISettingsFrameHost ||
412 (url.host() == chrome::kChromeUISettingsHost && 406 (url.host() == chrome::kChromeUISettingsHost &&
413 ::switches::AboutInSettingsEnabled())) { 407 ::switches::AboutInSettingsEnabled())) {
414 return &NewWebUI<options::OptionsUI>; 408 return &NewWebUI<options::OptionsUI>;
415 } 409 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 #endif // defined(ENABLE_CONFIGURATION_POLICY) 535 #endif // defined(ENABLE_CONFIGURATION_POLICY)
542 536
543 #if defined(ENABLE_APP_LIST) 537 #if defined(ENABLE_APP_LIST)
544 if (url.host() == chrome::kChromeUIAppListStartPageHost) 538 if (url.host() == chrome::kChromeUIAppListStartPageHost)
545 return &NewWebUI<app_list::StartPageUI>; 539 return &NewWebUI<app_list::StartPageUI>;
546 #endif 540 #endif
547 #if defined(ENABLE_EXTENSIONS) 541 #if defined(ENABLE_EXTENSIONS)
548 if (url.host() == chrome::kChromeUIExtensionsFrameHost) 542 if (url.host() == chrome::kChromeUIExtensionsFrameHost)
549 return &NewWebUI<extensions::ExtensionsUI>; 543 return &NewWebUI<extensions::ExtensionsUI>;
550 #endif 544 #endif
545 #if defined(ENABLE_PLUGINS)
546 if (url.host() == chrome::kChromeUIFlashHost)
547 return &NewWebUI<FlashUI>;
548 if (url.host() == chrome::kChromeUIPluginsHost)
549 return &NewWebUI<PluginsUI>;
550 #endif
551 #if defined(ENABLE_PRINT_PREVIEW) 551 #if defined(ENABLE_PRINT_PREVIEW)
552 if (url.host() == chrome::kChromeUIPrintHost && 552 if (url.host() == chrome::kChromeUIPrintHost &&
553 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { 553 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) {
554 return &NewWebUI<PrintPreviewUI>; 554 return &NewWebUI<PrintPreviewUI>;
555 } 555 }
556 #endif 556 #endif
557 #if defined(ENABLE_SERVICE_DISCOVERY) 557 #if defined(ENABLE_SERVICE_DISCOVERY)
558 if (url.host() == chrome::kChromeUIDevicesHost) { 558 if (url.host() == chrome::kChromeUIDevicesHost) {
559 return &NewWebUI<LocalDiscoveryUI>; 559 return &NewWebUI<LocalDiscoveryUI>;
560 } 560 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 #endif 763 #endif
764 764
765 // Android doesn't use the plugins pages. 765 // Android doesn't use the plugins pages.
766 if (page_url.host() == chrome::kChromeUIPluginsHost) 766 if (page_url.host() == chrome::kChromeUIPluginsHost)
767 return PluginsUI::GetFaviconResourceBytes(scale_factor); 767 return PluginsUI::GetFaviconResourceBytes(scale_factor);
768 768
769 #endif 769 #endif
770 770
771 return NULL; 771 return NULL;
772 } 772 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698