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

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

Issue 10532005: Initial check-in of gesture config WebUI. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Moved code under #ifdef's where required. Created 8 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) 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"
11 #include "chrome/browser/extensions/extension_web_ui.h" 11 #include "chrome/browser/extensions/extension_web_ui.h"
12 #include "chrome/browser/history/history_types.h" 12 #include "chrome/browser/history/history_types.h"
13 #include "chrome/browser/prefs/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/browser/printing/print_preview_tab_controller.h" 14 #include "chrome/browser/printing/print_preview_tab_controller.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
18 #include "chrome/browser/ui/webui/about_ui.h" 18 #include "chrome/browser/ui/webui/about_ui.h"
19 #include "chrome/browser/ui/webui/bookmarks_ui.h" 19 #include "chrome/browser/ui/webui/bookmarks_ui.h"
20 #include "chrome/browser/ui/webui/crashes_ui.h" 20 #include "chrome/browser/ui/webui/crashes_ui.h"
21 #include "chrome/browser/ui/webui/devtools_ui.h" 21 #include "chrome/browser/ui/webui/devtools_ui.h"
22 #include "chrome/browser/ui/webui/downloads_ui.h" 22 #include "chrome/browser/ui/webui/downloads_ui.h"
23 #include "chrome/browser/ui/webui/extensions/extension_activity_ui.h" 23 #include "chrome/browser/ui/webui/extensions/extension_activity_ui.h"
24 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" 24 #include "chrome/browser/ui/webui/extensions/extensions_ui.h"
25 #include "chrome/browser/ui/webui/feedback_ui.h" 25 #include "chrome/browser/ui/webui/feedback_ui.h"
26 #include "chrome/browser/ui/webui/flags_ui.h" 26 #include "chrome/browser/ui/webui/flags_ui.h"
27 #include "chrome/browser/ui/webui/flash_ui.h" 27 #include "chrome/browser/ui/webui/flash_ui.h"
28 #include "chrome/browser/ui/webui/generic_handler.h" 28 #include "chrome/browser/ui/webui/generic_handler.h"
29 #include "chrome/browser/ui/webui/gesture_config_ui.h"
flackr 2012/06/07 21:07:54 Move include to if defined as well.
29 #include "chrome/browser/ui/webui/gpu_internals_ui.h" 30 #include "chrome/browser/ui/webui/gpu_internals_ui.h"
30 #include "chrome/browser/ui/webui/help/help_ui.h" 31 #include "chrome/browser/ui/webui/help/help_ui.h"
31 #include "chrome/browser/ui/webui/history_ui.h" 32 #include "chrome/browser/ui/webui/history_ui.h"
32 #include "chrome/browser/ui/webui/inspect_ui.h" 33 #include "chrome/browser/ui/webui/inspect_ui.h"
33 #include "chrome/browser/ui/webui/media/media_internals_ui.h" 34 #include "chrome/browser/ui/webui/media/media_internals_ui.h"
34 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" 35 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
35 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 36 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
36 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" 37 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
37 #include "chrome/browser/ui/webui/options2/options_ui2.h" 38 #include "chrome/browser/ui/webui/options2/options_ui2.h"
38 #include "chrome/browser/ui/webui/plugins_ui.h" 39 #include "chrome/browser/ui/webui/plugins_ui.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 #endif // defined(ENABLE_TASK_MANAGER) 288 #endif // defined(ENABLE_TASK_MANAGER)
288 289
289 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) 290 #if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
290 if (url.host() == chrome::kChromeUICollectedCookiesHost || 291 if (url.host() == chrome::kChromeUICollectedCookiesHost ||
291 url.host() == chrome::kChromeUIHttpAuthHost || 292 url.host() == chrome::kChromeUIHttpAuthHost ||
292 url.host() == chrome::kChromeUITabModalConfirmDialogHost) { 293 url.host() == chrome::kChromeUITabModalConfirmDialogHost) {
293 return &NewWebUI<ConstrainedWebDialogUI>; 294 return &NewWebUI<ConstrainedWebDialogUI>;
294 } 295 }
295 #endif 296 #endif
296 297
298 #if defined(USE_AURA)
299 if (url.host() == chrome::kChromeUIGestureConfigHost)
300 return &NewWebUI<GestureConfigUI>;
301 #endif
302
297 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 303 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
298 if (url.host() == chrome::kChromeUISyncPromoHost) { 304 if (url.host() == chrome::kChromeUISyncPromoHost) {
299 // If the sync promo page is enabled then use the sync promo WebUI otherwise 305 // 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 306 // 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, 307 // is disabled because the page can be disabled mid-flight (for example,
302 // if sync login finishes). 308 // if sync login finishes).
303 if (SyncPromoUI::ShouldShowSyncPromo(profile)) 309 if (SyncPromoUI::ShouldShowSyncPromo(profile))
304 return &NewWebUI<SyncPromoUI>; 310 return &NewWebUI<SyncPromoUI>;
305 else 311 else
306 return &NewWebUI<NewTabUI>; 312 return &NewWebUI<NewTabUI>;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 if (page_url.host() == chrome::kChromeUISettingsFrameHost) 507 if (page_url.host() == chrome::kChromeUISettingsFrameHost)
502 return options2::OptionsUI::GetFaviconResourceBytes(); 508 return options2::OptionsUI::GetFaviconResourceBytes();
503 509
504 // Android doesn't use the plugins pages. 510 // Android doesn't use the plugins pages.
505 if (page_url.host() == chrome::kChromeUIPluginsHost) 511 if (page_url.host() == chrome::kChromeUIPluginsHost)
506 return PluginsUI::GetFaviconResourceBytes(); 512 return PluginsUI::GetFaviconResourceBytes();
507 #endif 513 #endif
508 514
509 return NULL; 515 return NULL;
510 } 516 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698