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

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

Issue 2252063002: Adding client code for new desktop First Run Experience. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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/ui/BUILD.gn ('k') | chrome/browser/ui/webui/welcome_ui.h » ('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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 #if !defined(OS_CHROMEOS) 152 #if !defined(OS_CHROMEOS)
153 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" 153 #include "chrome/browser/ui/webui/app_launcher_page_ui.h"
154 #endif 154 #endif
155 155
156 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 156 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
157 #include "chrome/browser/ui/sync/sync_promo_ui.h" 157 #include "chrome/browser/ui/sync/sync_promo_ui.h"
158 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" 158 #include "chrome/browser/ui/webui/signin/inline_login_ui.h"
159 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" 159 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
160 #include "chrome/browser/ui/webui/signin/user_manager_ui.h" 160 #include "chrome/browser/ui/webui/signin/user_manager_ui.h"
161 #include "chrome/browser/ui/webui/welcome_ui.h"
161 #endif 162 #endif
162 163
163 #if defined(OS_WIN) 164 #if defined(OS_WIN)
164 #include "chrome/browser/ui/webui/conflicts_ui.h" 165 #include "chrome/browser/ui/webui/conflicts_ui.h"
165 #include "chrome/browser/ui/webui/set_as_default_browser_ui_win.h" 166 #include "chrome/browser/ui/webui/set_as_default_browser_ui_win.h"
166 #endif 167 #endif
167 168
168 #if (defined(USE_NSS_CERTS) || defined(USE_OPENSSL_CERTS)) && defined(USE_AURA) 169 #if (defined(USE_NSS_CERTS) || defined(USE_OPENSSL_CERTS)) && defined(USE_AURA)
169 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" 170 #include "chrome/browser/ui/webui/certificate_viewer_ui.h"
170 #endif 171 #endif
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return new dom_distiller::DomDistillerUi( 254 return new dom_distiller::DomDistillerUi(
254 web_ui, service, dom_distiller::kDomDistillerScheme); 255 web_ui, service, dom_distiller::kDomDistillerScheme);
255 } 256 }
256 257
257 #if !defined(OS_ANDROID) 258 #if !defined(OS_ANDROID)
258 template<> 259 template<>
259 WebUIController* NewWebUI<settings::MdSettingsUI>(WebUI* web_ui, 260 WebUIController* NewWebUI<settings::MdSettingsUI>(WebUI* web_ui,
260 const GURL& url) { 261 const GURL& url) {
261 return new settings::MdSettingsUI(web_ui, url); 262 return new settings::MdSettingsUI(web_ui, url);
262 } 263 }
263 #endif 264
265 #if !defined(OS_CHROMEOS)
266 template <>
267 WebUIController* NewWebUI<WelcomeUI>(WebUI* web_ui, const GURL& url) {
268 return new WelcomeUI(web_ui, url);
269 }
270 #endif // !defined(OS_CHROMEOS)
271 #endif // !defined(OS_ANDROID)
264 272
265 #if defined(ENABLE_EXTENSIONS) 273 #if defined(ENABLE_EXTENSIONS)
266 // Only create ExtensionWebUI for URLs that are allowed extension bindings, 274 // Only create ExtensionWebUI for URLs that are allowed extension bindings,
267 // hosted by actual tabs. 275 // hosted by actual tabs.
268 bool NeedsExtensionWebUI(Profile* profile, const GURL& url) { 276 bool NeedsExtensionWebUI(Profile* profile, const GURL& url) {
269 if (!profile) 277 if (!profile)
270 return false; 278 return false;
271 279
272 const extensions::Extension* extension = 280 const extensions::Extension* extension =
273 extensions::ExtensionRegistry::Get(profile)->enabled_extensions(). 281 extensions::ExtensionRegistry::Get(profile)->enabled_extensions().
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (url.host() == chrome::kChromeUIChromeSigninHost) 535 if (url.host() == chrome::kChromeUIChromeSigninHost)
528 return &NewWebUI<InlineLoginUI>; 536 return &NewWebUI<InlineLoginUI>;
529 if (url.host() == chrome::kChromeUIUserManagerHost) 537 if (url.host() == chrome::kChromeUIUserManagerHost)
530 return &NewWebUI<UserManagerUI>; 538 return &NewWebUI<UserManagerUI>;
531 if (url.host() == chrome::kChromeUIMdUserManagerHost) 539 if (url.host() == chrome::kChromeUIMdUserManagerHost)
532 return &NewWebUI<MDUserManagerUI>; 540 return &NewWebUI<MDUserManagerUI>;
533 if (url.host() == chrome::kChromeUISyncConfirmationHost) 541 if (url.host() == chrome::kChromeUISyncConfirmationHost)
534 return &NewWebUI<SyncConfirmationUI>; 542 return &NewWebUI<SyncConfirmationUI>;
535 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost) 543 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost)
536 return &NewWebUI<ProfileSigninConfirmationUI>; 544 return &NewWebUI<ProfileSigninConfirmationUI>;
545 if (url.host() == chrome::kChromeUIWelcomeHost)
546 return &NewWebUI<WelcomeUI>;
537 #endif 547 #endif
538 548
539 /**************************************************************************** 549 /****************************************************************************
540 * Other #defines and special logics. 550 * Other #defines and special logics.
541 ***************************************************************************/ 551 ***************************************************************************/
542 #if !defined(DISABLE_NACL) 552 #if !defined(DISABLE_NACL)
543 if (url.host() == chrome::kChromeUINaClHost) 553 if (url.host() == chrome::kChromeUINaClHost)
544 return &NewWebUI<NaClUI>; 554 return &NewWebUI<NaClUI>;
545 #endif 555 #endif
546 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) 556 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 #endif 819 #endif
810 820
811 // Android doesn't use the plugins pages. 821 // Android doesn't use the plugins pages.
812 if (page_url.host() == chrome::kChromeUIPluginsHost) 822 if (page_url.host() == chrome::kChromeUIPluginsHost)
813 return PluginsUI::GetFaviconResourceBytes(scale_factor); 823 return PluginsUI::GetFaviconResourceBytes(scale_factor);
814 824
815 #endif 825 #endif
816 826
817 return NULL; 827 return NULL;
818 } 828 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/webui/welcome_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698