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

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

Issue 7038028: Initial support for cloudprint in print preview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_factory.h" 5 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/about_flags.h" 8 #include "chrome/browser/about_flags.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_web_ui.h" 10 #include "chrome/browser/extensions/extension_web_ui.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (url.host() == chrome::kChromeUIProxySettingsHost) 195 if (url.host() == chrome::kChromeUIProxySettingsHost)
196 return &NewWebUI<chromeos::ProxySettingsUI>; 196 return &NewWebUI<chromeos::ProxySettingsUI>;
197 if (url.host() == chrome::kChromeUIRegisterPageHost) 197 if (url.host() == chrome::kChromeUIRegisterPageHost)
198 return &NewWebUI<RegisterPageUI>; 198 return &NewWebUI<RegisterPageUI>;
199 if (url.host() == chrome::kChromeUISimUnlockHost) 199 if (url.host() == chrome::kChromeUISimUnlockHost)
200 return &NewWebUI<chromeos::SimUnlockUI>; 200 return &NewWebUI<chromeos::SimUnlockUI>;
201 if (url.host() == chrome::kChromeUISystemInfoHost) 201 if (url.host() == chrome::kChromeUISystemInfoHost)
202 return &NewWebUI<SystemInfoUI>; 202 return &NewWebUI<SystemInfoUI>;
203 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) 203 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost)
204 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; 204 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>;
205 #else 205 #endif // defined(OS_CHROMEOS)
206
206 if (url.host() == chrome::kChromeUIPrintHost && 207 if (url.host() == chrome::kChromeUIPrintHost &&
207 switches::IsPrintPreviewEnabled()) { 208 switches::IsPrintPreviewEnabled()) {
208 return &NewWebUI<PrintPreviewUI>; 209 return &NewWebUI<PrintPreviewUI>;
209 } 210 }
210 #endif // defined(OS_CHROMEOS)
211 211
212 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) 212 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL)
213 return &NewWebUI<ConstrainedHtmlUI>; 213 return &NewWebUI<ConstrainedHtmlUI>;
214 214
215 return NULL; 215 return NULL;
216 } 216 }
217 217
218 // When the test-type switch is set, return a TestType object, which should be a 218 // When the test-type switch is set, return a TestType object, which should be a
219 // subclass of Type. The logic is provided here in the traits class, rather than 219 // subclass of Type. The logic is provided here in the traits class, rather than
220 // in GetInstance() so that the choice is made only once, when the Singleton is 220 // in GetInstance() so that the choice is made only once, when the Singleton is
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return FlashUI::GetFaviconResourceBytes(); 354 return FlashUI::GetFaviconResourceBytes();
355 355
356 if (page_url.host() == chrome::kChromeUISettingsHost) 356 if (page_url.host() == chrome::kChromeUISettingsHost)
357 return OptionsUI::GetFaviconResourceBytes(); 357 return OptionsUI::GetFaviconResourceBytes();
358 358
359 if (page_url.host() == chrome::kChromeUIPluginsHost) 359 if (page_url.host() == chrome::kChromeUIPluginsHost)
360 return PluginsUI::GetFaviconResourceBytes(); 360 return PluginsUI::GetFaviconResourceBytes();
361 361
362 return NULL; 362 return NULL;
363 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698