OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 #include "chrome/browser/ui/webui/flash_ui.h" | 29 #include "chrome/browser/ui/webui/flash_ui.h" |
30 #include "chrome/browser/ui/webui/gcm_internals_ui.h" | 30 #include "chrome/browser/ui/webui/gcm_internals_ui.h" |
31 #include "chrome/browser/ui/webui/help/help_ui.h" | 31 #include "chrome/browser/ui/webui/help/help_ui.h" |
32 #include "chrome/browser/ui/webui/history_ui.h" | 32 #include "chrome/browser/ui/webui/history_ui.h" |
33 #include "chrome/browser/ui/webui/identity_internals_ui.h" | 33 #include "chrome/browser/ui/webui/identity_internals_ui.h" |
34 #include "chrome/browser/ui/webui/instant_ui.h" | 34 #include "chrome/browser/ui/webui/instant_ui.h" |
35 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" | 35 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" |
36 #include "chrome/browser/ui/webui/invalidations_ui.h" | 36 #include "chrome/browser/ui/webui/invalidations_ui.h" |
37 #include "chrome/browser/ui/webui/local_state/local_state_ui.h" | 37 #include "chrome/browser/ui/webui/local_state/local_state_ui.h" |
38 #include "chrome/browser/ui/webui/log_web_ui_url.h" | 38 #include "chrome/browser/ui/webui/log_web_ui_url.h" |
39 #include "chrome/browser/ui/webui/memory_internals/memory_internals_ui.h" | |
40 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" | 39 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
41 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" | 40 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" |
42 #include "chrome/browser/ui/webui/options/options_ui.h" | 41 #include "chrome/browser/ui/webui/options/options_ui.h" |
43 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in
ternals_ui.h" | 42 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in
ternals_ui.h" |
44 #include "chrome/browser/ui/webui/plugins/plugins_ui.h" | 43 #include "chrome/browser/ui/webui/plugins/plugins_ui.h" |
45 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" | 44 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" |
46 #include "chrome/browser/ui/webui/profiler_ui.h" | 45 #include "chrome/browser/ui/webui/profiler_ui.h" |
47 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" | 46 #include "chrome/browser/ui/webui/settings/md_settings_ui.h" |
48 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" | 47 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" |
49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" | 48 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // Allow bindings for all packaged extensions and component hosted apps. | 260 // Allow bindings for all packaged extensions and component hosted apps. |
262 return extension && | 261 return extension && |
263 (!extension->is_hosted_app() || | 262 (!extension->is_hosted_app() || |
264 extension->location() == extensions::Manifest::COMPONENT); | 263 extension->location() == extensions::Manifest::COMPONENT); |
265 } | 264 } |
266 #endif | 265 #endif |
267 | 266 |
268 bool IsAboutUI(const GURL& url) { | 267 bool IsAboutUI(const GURL& url) { |
269 return (url.host() == chrome::kChromeUIChromeURLsHost || | 268 return (url.host() == chrome::kChromeUIChromeURLsHost || |
270 url.host() == chrome::kChromeUICreditsHost || | 269 url.host() == chrome::kChromeUICreditsHost || |
271 url.host() == chrome::kChromeUIDNSHost || | 270 url.host() == chrome::kChromeUIDNSHost |
272 url.host() == chrome::kChromeUIMemoryHost || | |
273 url.host() == chrome::kChromeUIMemoryRedirectHost | |
274 #if !defined(OS_ANDROID) | 271 #if !defined(OS_ANDROID) |
275 || url.host() == chrome::kChromeUITermsHost | 272 || url.host() == chrome::kChromeUITermsHost |
276 #endif | 273 #endif |
277 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 274 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
278 || url.host() == chrome::kChromeUILinuxProxyConfigHost || | 275 || url.host() == chrome::kChromeUILinuxProxyConfigHost || |
279 url.host() == chrome::kChromeUISandboxHost | 276 url.host() == chrome::kChromeUISandboxHost |
280 #endif | 277 #endif |
281 #if defined(OS_CHROMEOS) | 278 #if defined(OS_CHROMEOS) |
282 || url.host() == chrome::kChromeUIOSCreditsHost | 279 || url.host() == chrome::kChromeUIOSCreditsHost |
283 #endif | 280 #endif |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 if (url.host() == chrome::kChromeUIHistoryFrameHost) | 328 if (url.host() == chrome::kChromeUIHistoryFrameHost) |
332 return &NewWebUI<HistoryUI>; | 329 return &NewWebUI<HistoryUI>; |
333 if (url.host() == chrome::kChromeUIInstantHost) | 330 if (url.host() == chrome::kChromeUIInstantHost) |
334 return &NewWebUI<InstantUI>; | 331 return &NewWebUI<InstantUI>; |
335 if (url.host() == chrome::kChromeUIInterstitialHost) | 332 if (url.host() == chrome::kChromeUIInterstitialHost) |
336 return &NewWebUI<InterstitialUI>; | 333 return &NewWebUI<InterstitialUI>; |
337 if (url.host() == chrome::kChromeUIInvalidationsHost) | 334 if (url.host() == chrome::kChromeUIInvalidationsHost) |
338 return &NewWebUI<InvalidationsUI>; | 335 return &NewWebUI<InvalidationsUI>; |
339 if (url.host() == chrome::kChromeUILocalStateHost) | 336 if (url.host() == chrome::kChromeUILocalStateHost) |
340 return &NewWebUI<LocalStateUI>; | 337 return &NewWebUI<LocalStateUI>; |
341 if (url.host() == chrome::kChromeUIMemoryInternalsHost) | |
342 return &NewWebUI<MemoryInternalsUI>; | |
343 if (url.host() == chrome::kChromeUINetInternalsHost) | 338 if (url.host() == chrome::kChromeUINetInternalsHost) |
344 return &NewWebUI<NetInternalsUI>; | 339 return &NewWebUI<NetInternalsUI>; |
345 if (url.host() == chrome::kChromeUIOmniboxHost) | 340 if (url.host() == chrome::kChromeUIOmniboxHost) |
346 return &NewWebUI<OmniboxUI>; | 341 return &NewWebUI<OmniboxUI>; |
347 if (url.host() == chrome::kChromeUIPasswordManagerInternalsHost) | 342 if (url.host() == chrome::kChromeUIPasswordManagerInternalsHost) |
348 return &NewWebUI<PasswordManagerInternalsUI>; | 343 return &NewWebUI<PasswordManagerInternalsUI>; |
349 if (url.host() == chrome::kChromeUIPredictorsHost) | 344 if (url.host() == chrome::kChromeUIPredictorsHost) |
350 return &NewWebUI<PredictorsUI>; | 345 return &NewWebUI<PredictorsUI>; |
351 if (url.host() == chrome::kChromeUIProfilerHost) | 346 if (url.host() == chrome::kChromeUIProfilerHost) |
352 return &NewWebUI<ProfilerUI>; | 347 return &NewWebUI<ProfilerUI>; |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 #endif | 771 #endif |
777 | 772 |
778 // Android doesn't use the plugins pages. | 773 // Android doesn't use the plugins pages. |
779 if (page_url.host() == chrome::kChromeUIPluginsHost) | 774 if (page_url.host() == chrome::kChromeUIPluginsHost) |
780 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 775 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
781 | 776 |
782 #endif | 777 #endif |
783 | 778 |
784 return NULL; | 779 return NULL; |
785 } | 780 } |
OLD | NEW |