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

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

Issue 9695038: Android: Remove a few more printing sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better rebase Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/test/base/testing_browser_process.cc » ('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 "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/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ***************************************************************************/ 229 ***************************************************************************/
230 #if !defined(OS_ANDROID) 230 #if !defined(OS_ANDROID)
231 // Android uses the native download manager. 231 // Android uses the native download manager.
232 if (url.host() == chrome::kChromeUIDownloadsHost) 232 if (url.host() == chrome::kChromeUIDownloadsHost)
233 return &NewWebUI<DownloadsUI>; 233 return &NewWebUI<DownloadsUI>;
234 // Android doesn't use the Options/Options2 pages. 234 // Android doesn't use the Options/Options2 pages.
235 if (url.host() == chrome::kChromeUISettingsFrameHost) 235 if (url.host() == chrome::kChromeUISettingsFrameHost)
236 return &NewWebUI<options2::OptionsUI>; 236 return &NewWebUI<options2::OptionsUI>;
237 if (url.host() == chrome::kChromeUISettingsHost) 237 if (url.host() == chrome::kChromeUISettingsHost)
238 return &NewWebUI<OptionsUI>; 238 return &NewWebUI<OptionsUI>;
239 // Android doesn't support print/print-preview
240 if (url.host() == chrome::kChromeUIPrintHost &&
241 !g_browser_process->local_state()->GetBoolean(
242 prefs::kPrintPreviewDisabled)) {
243 return &NewWebUI<PrintPreviewUI>;
244 }
239 #endif 245 #endif
240 #if defined(OS_WIN) 246 #if defined(OS_WIN)
241 if (url.host() == chrome::kChromeUIConflictsHost) 247 if (url.host() == chrome::kChromeUIConflictsHost)
242 return &NewWebUI<ConflictsUI>; 248 return &NewWebUI<ConflictsUI>;
243 #endif 249 #endif
244 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA) 250 #if (defined(USE_NSS) || defined(USE_OPENSSL)) && defined(USE_AURA)
245 if (url.host() == chrome::kChromeUICertificateViewerHost) 251 if (url.host() == chrome::kChromeUICertificateViewerHost)
246 return &NewWebUI<CertificateViewerUI>; 252 return &NewWebUI<CertificateViewerUI>;
247 #endif 253 #endif
248 #if defined(OS_CHROMEOS) 254 #if defined(OS_CHROMEOS)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 #endif 287 #endif
282 288
283 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) 289 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
284 if (url.host() == chrome::kChromeUICollectedCookiesHost || 290 if (url.host() == chrome::kChromeUICollectedCookiesHost ||
285 url.host() == chrome::kChromeUIHttpAuthHost || 291 url.host() == chrome::kChromeUIHttpAuthHost ||
286 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { 292 url.host() == chrome::kChromeUITabModalConfirmDialogHost) {
287 return &NewWebUI<ConstrainedHtmlUI>; 293 return &NewWebUI<ConstrainedHtmlUI>;
288 } 294 }
289 #endif 295 #endif
290 296
291 if (url.host() == chrome::kChromeUIPrintHost &&
292 !g_browser_process->local_state()->GetBoolean(
293 prefs::kPrintPreviewDisabled)) {
294 return &NewWebUI<PrintPreviewUI>;
295 }
296
297 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 297 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
298 if (url.host() == chrome::kChromeUISyncPromoHost) { 298 if (url.host() == chrome::kChromeUISyncPromoHost) {
299 // If the sync promo page is enabled then use the sync promo WebUI otherwise 299 // If the sync promo page is enabled then use the sync promo WebUI otherwise
300 // use the NTP WebUI. We don't want to return NULL if the sync promo page 300 // use the NTP WebUI. We don't want to return NULL if the sync promo page
301 // is disabled because the page can be disabled mid-flight (for example, 301 // is disabled because the page can be disabled mid-flight (for example,
302 // if sync login finishes). 302 // if sync login finishes).
303 if (SyncPromoUI::ShouldShowSyncPromo(profile)) 303 if (SyncPromoUI::ShouldShowSyncPromo(profile))
304 return &NewWebUI<SyncPromoUI>; 304 return &NewWebUI<SyncPromoUI>;
305 else 305 else
306 return &NewWebUI<NewTabUI>; 306 return &NewWebUI<NewTabUI>;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 if (page_url.host() == chrome::kChromeUISettingsFrameHost) 498 if (page_url.host() == chrome::kChromeUISettingsFrameHost)
499 return options2::OptionsUI::GetFaviconResourceBytes(); 499 return options2::OptionsUI::GetFaviconResourceBytes();
500 #endif 500 #endif
501 501
502 if (page_url.host() == chrome::kChromeUIPluginsHost) 502 if (page_url.host() == chrome::kChromeUIPluginsHost)
503 return PluginsUI::GetFaviconResourceBytes(); 503 return PluginsUI::GetFaviconResourceBytes();
504 504
505 return NULL; 505 return NULL;
506 } 506 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/base/testing_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698