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

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

Issue 2401853005: Adding client code for new Windows 10 First Run Experience (Closed)
Patch Set: Using Polymer dom-bind Created 4 years, 2 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
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" 164 #include "chrome/browser/ui/webui/signin/inline_login_ui.h"
165 #include "chrome/browser/ui/webui/signin/signin_error_ui.h" 165 #include "chrome/browser/ui/webui/signin/signin_error_ui.h"
166 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" 166 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
167 #include "chrome/browser/ui/webui/signin/user_manager_ui.h" 167 #include "chrome/browser/ui/webui/signin/user_manager_ui.h"
168 #include "chrome/browser/ui/webui/welcome_ui.h" 168 #include "chrome/browser/ui/webui/welcome_ui.h"
169 #endif 169 #endif
170 170
171 #if defined(OS_WIN) 171 #if defined(OS_WIN)
172 #include "chrome/browser/ui/webui/conflicts_ui.h" 172 #include "chrome/browser/ui/webui/conflicts_ui.h"
173 #include "chrome/browser/ui/webui/set_as_default_browser_ui_win.h" 173 #include "chrome/browser/ui/webui/set_as_default_browser_ui_win.h"
174 #include "chrome/browser/ui/webui/welcome_win10_ui.h"
174 #endif 175 #endif
175 176
176 #if (defined(USE_NSS_CERTS) || defined(USE_OPENSSL_CERTS)) && defined(USE_AURA) 177 #if (defined(USE_NSS_CERTS) || defined(USE_OPENSSL_CERTS)) && defined(USE_AURA)
177 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" 178 #include "chrome/browser/ui/webui/certificate_viewer_ui.h"
178 #endif 179 #endif
179 180
180 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) 181 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
181 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h" 182 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
182 #endif 183 #endif
183 184
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 271 }
271 272
272 #if !defined(OS_CHROMEOS) 273 #if !defined(OS_CHROMEOS)
273 template <> 274 template <>
274 WebUIController* NewWebUI<WelcomeUI>(WebUI* web_ui, const GURL& url) { 275 WebUIController* NewWebUI<WelcomeUI>(WebUI* web_ui, const GURL& url) {
275 return new WelcomeUI(web_ui, url); 276 return new WelcomeUI(web_ui, url);
276 } 277 }
277 #endif // !defined(OS_CHROMEOS) 278 #endif // !defined(OS_CHROMEOS)
278 #endif // !defined(OS_ANDROID) 279 #endif // !defined(OS_ANDROID)
279 280
281 #if defined(OS_WIN)
282 template <>
283 WebUIController* NewWebUI<WelcomeWin10UI>(WebUI* web_ui, const GURL& url) {
284 return new WelcomeWin10UI(web_ui, url);
285 }
286 #endif // defined(OS_WIN)
287
280 #if defined(ENABLE_EXTENSIONS) 288 #if defined(ENABLE_EXTENSIONS)
281 // Only create ExtensionWebUI for URLs that are allowed extension bindings, 289 // Only create ExtensionWebUI for URLs that are allowed extension bindings,
282 // hosted by actual tabs. 290 // hosted by actual tabs.
283 bool NeedsExtensionWebUI(Profile* profile, const GURL& url) { 291 bool NeedsExtensionWebUI(Profile* profile, const GURL& url) {
284 if (!profile) 292 if (!profile)
285 return false; 293 return false;
286 294
287 const extensions::Extension* extension = 295 const extensions::Extension* extension =
288 extensions::ExtensionRegistry::Get(profile)->enabled_extensions(). 296 extensions::ExtensionRegistry::Get(profile)->enabled_extensions().
289 GetExtensionOrAppByURL(url); 297 GetExtensionOrAppByURL(url);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 return &NewWebUI<MDUserManagerUI>; 563 return &NewWebUI<MDUserManagerUI>;
556 if (url.host() == chrome::kChromeUISigninErrorHost) 564 if (url.host() == chrome::kChromeUISigninErrorHost)
557 return &NewWebUI<SigninErrorUI>; 565 return &NewWebUI<SigninErrorUI>;
558 if (url.host() == chrome::kChromeUISyncConfirmationHost) 566 if (url.host() == chrome::kChromeUISyncConfirmationHost)
559 return &NewWebUI<SyncConfirmationUI>; 567 return &NewWebUI<SyncConfirmationUI>;
560 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost) 568 if (url.host() == chrome::kChromeUIProfileSigninConfirmationHost)
561 return &NewWebUI<ProfileSigninConfirmationUI>; 569 return &NewWebUI<ProfileSigninConfirmationUI>;
562 if (url.host() == chrome::kChromeUIWelcomeHost) 570 if (url.host() == chrome::kChromeUIWelcomeHost)
563 return &NewWebUI<WelcomeUI>; 571 return &NewWebUI<WelcomeUI>;
564 #endif 572 #endif
573 #if defined(OS_WIN)
574 if (url.host() == chrome::kChromeUIWelcomeWin10Host)
575 return &NewWebUI<WelcomeWin10UI>;
576 #endif // defined(OS_WIN)
565 577
566 /**************************************************************************** 578 /****************************************************************************
michaelpg 2016/10/22 03:19:00 existing spacing was correct (preprocessor direct
Patrick Monette 2016/10/24 20:49:39 Fixed.
567 * Other #defines and special logics. 579 * Other #defines and special logics.
568 ***************************************************************************/ 580 ***************************************************************************/
569 #if !defined(DISABLE_NACL) 581 #if !defined(DISABLE_NACL)
570 if (url.host() == chrome::kChromeUINaClHost) 582 if (url.host() == chrome::kChromeUINaClHost)
571 return &NewWebUI<NaClUI>; 583 return &NewWebUI<NaClUI>;
572 #endif 584 #endif
573 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) 585 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
574 if (url.host() == chrome::kChromeUITabModalConfirmDialogHost) { 586 if (url.host() == chrome::kChromeUITabModalConfirmDialogHost) {
575 return &NewWebUI<ConstrainedWebDialogUI>; 587 return &NewWebUI<ConstrainedWebDialogUI>;
576 } 588 }
577 #endif 589 #endif
578 #if (defined(USE_NSS_CERTS) || defined(USE_OPENSSL_CERTS)) && defined(USE_AURA) 590 #if (defined(USE_NSS_CERTS) || defined(USE_OPENSSL_CERTS)) && defined(USE_AURA)
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 #endif 848 #endif
837 849
838 // Android doesn't use the plugins pages. 850 // Android doesn't use the plugins pages.
839 if (page_url.host() == chrome::kChromeUIPluginsHost) 851 if (page_url.host() == chrome::kChromeUIPluginsHost)
840 return PluginsUI::GetFaviconResourceBytes(scale_factor); 852 return PluginsUI::GetFaviconResourceBytes(scale_factor);
841 853
842 #endif 854 #endif
843 855
844 return NULL; 856 return NULL;
845 } 857 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698