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

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

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "components/favicon_base/favicon_util.h" 73 #include "components/favicon_base/favicon_util.h"
74 #include "components/favicon_base/select_favicon_frames.h" 74 #include "components/favicon_base/select_favicon_frames.h"
75 #include "components/history/core/browser/history_types.h" 75 #include "components/history/core/browser/history_types.h"
76 #include "components/prefs/pref_service.h" 76 #include "components/prefs/pref_service.h"
77 #include "components/signin/core/common/profile_management_switches.h" 77 #include "components/signin/core/common/profile_management_switches.h"
78 #include "content/public/browser/web_contents.h" 78 #include "content/public/browser/web_contents.h"
79 #include "content/public/browser/web_ui.h" 79 #include "content/public/browser/web_ui.h"
80 #include "content/public/common/content_client.h" 80 #include "content/public/common/content_client.h"
81 #include "content/public/common/url_utils.h" 81 #include "content/public/common/url_utils.h"
82 #include "extensions/features/features.h" 82 #include "extensions/features/features.h"
83 #include "ppapi/features/features.h"
83 #include "printing/features/features.h" 84 #include "printing/features/features.h"
84 #include "ui/gfx/favicon_size.h" 85 #include "ui/gfx/favicon_size.h"
85 #include "ui/web_dialogs/web_dialog_ui.h" 86 #include "ui/web_dialogs/web_dialog_ui.h"
86 #include "url/gurl.h" 87 #include "url/gurl.h"
87 88
88 #if !defined(DISABLE_NACL) 89 #if !defined(DISABLE_NACL)
89 #include "chrome/browser/ui/webui/nacl_ui.h" 90 #include "chrome/browser/ui/webui/nacl_ui.h"
90 #endif 91 #endif
91 92
92 #if defined(ENABLE_WEBRTC) 93 #if defined(ENABLE_WEBRTC)
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 } 578 }
578 579
579 #if BUILDFLAG(ENABLE_APP_LIST) 580 #if BUILDFLAG(ENABLE_APP_LIST)
580 if (url.host_piece() == chrome::kChromeUIAppListStartPageHost) 581 if (url.host_piece() == chrome::kChromeUIAppListStartPageHost)
581 return &NewWebUI<app_list::StartPageUI>; 582 return &NewWebUI<app_list::StartPageUI>;
582 #endif 583 #endif
583 #if BUILDFLAG(ENABLE_EXTENSIONS) 584 #if BUILDFLAG(ENABLE_EXTENSIONS)
584 if (url.host_piece() == chrome::kChromeUIExtensionsFrameHost) 585 if (url.host_piece() == chrome::kChromeUIExtensionsFrameHost)
585 return &NewWebUI<extensions::ExtensionsUI>; 586 return &NewWebUI<extensions::ExtensionsUI>;
586 #endif 587 #endif
587 #if defined(ENABLE_PLUGINS) 588 #if BUILDFLAG(ENABLE_PLUGINS)
588 if (url.host_piece() == chrome::kChromeUIFlashHost) 589 if (url.host_piece() == chrome::kChromeUIFlashHost)
589 return &NewWebUI<FlashUI>; 590 return &NewWebUI<FlashUI>;
590 if (url.host_piece() == chrome::kChromeUIPluginsHost) 591 if (url.host_piece() == chrome::kChromeUIPluginsHost)
591 return &NewWebUI<PluginsUI>; 592 return &NewWebUI<PluginsUI>;
592 #endif 593 #endif
593 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 594 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
594 if (url.host_piece() == chrome::kChromeUIPrintHost && 595 if (url.host_piece() == chrome::kChromeUIPrintHost &&
595 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { 596 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) {
596 return &NewWebUI<PrintPreviewUI>; 597 return &NewWebUI<PrintPreviewUI>;
597 } 598 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 #endif 817 #endif
817 818
818 // Android doesn't use the plugins pages. 819 // Android doesn't use the plugins pages.
819 if (page_url.host_piece() == chrome::kChromeUIPluginsHost) 820 if (page_url.host_piece() == chrome::kChromeUIPluginsHost)
820 return PluginsUI::GetFaviconResourceBytes(scale_factor); 821 return PluginsUI::GetFaviconResourceBytes(scale_factor);
821 822
822 #endif 823 #endif
823 824
824 return NULL; 825 return NULL;
825 } 826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698