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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/string_split.h" | 13 #include "base/string_split.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/common/child_process_logging.h" | 16 #include "chrome/common/child_process_logging.h" |
17 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/common/chrome_version_info.h" | 19 #include "chrome/common/chrome_version_info.h" |
20 #include "chrome/common/render_messages.h" | 20 #include "chrome/common/render_messages.h" |
| 21 #include "chrome/common/url_constants.h" |
21 #include "content/public/common/pepper_plugin_info.h" | 22 #include "content/public/common/pepper_plugin_info.h" |
22 #include "content/public/common/url_constants.h" | 23 #include "content/public/common/url_constants.h" |
23 #include "grit/common_resources.h" | 24 #include "grit/common_resources.h" |
24 #include "remoting/client/plugin/pepper_entrypoints.h" | 25 #include "remoting/client/plugin/pepper_entrypoints.h" |
25 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
26 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
27 #include "webkit/glue/user_agent.h" | 28 #include "webkit/glue/user_agent.h" |
28 #include "webkit/plugins/npapi/plugin_list.h" | 29 #include "webkit/plugins/npapi/plugin_list.h" |
29 #include "webkit/plugins/plugin_constants.h" | 30 #include "webkit/plugins/plugin_constants.h" |
30 | 31 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 void ChromeContentClient::AddPepperPlugins( | 341 void ChromeContentClient::AddPepperPlugins( |
341 std::vector<content::PepperPluginInfo>* plugins) { | 342 std::vector<content::PepperPluginInfo>* plugins) { |
342 ComputeBuiltInPlugins(plugins); | 343 ComputeBuiltInPlugins(plugins); |
343 AddPepperFlash(plugins); | 344 AddPepperFlash(plugins); |
344 } | 345 } |
345 | 346 |
346 void ChromeContentClient::AddNPAPIPlugins( | 347 void ChromeContentClient::AddNPAPIPlugins( |
347 webkit::npapi::PluginList* plugin_list) { | 348 webkit::npapi::PluginList* plugin_list) { |
348 } | 349 } |
349 | 350 |
| 351 void ChromeContentClient::AddAdditionalSchemes( |
| 352 std::vector<std::string>* standard_schemes, |
| 353 std::vector<std::string>* savable_schemes) { |
| 354 standard_schemes->push_back(kExtensionScheme); |
| 355 savable_schemes->push_back(kExtensionScheme); |
| 356 #if defined(OS_CHROMEOS) |
| 357 standard_schemes->push_back(kCrosScheme); |
| 358 standard_schemes->push_back(kGDataScheme); |
| 359 #endif |
| 360 } |
| 361 |
350 bool ChromeContentClient::HasWebUIScheme(const GURL& url) const { | 362 bool ChromeContentClient::HasWebUIScheme(const GURL& url) const { |
351 return url.SchemeIs(chrome::kChromeDevToolsScheme) || | 363 return url.SchemeIs(chrome::kChromeDevToolsScheme) || |
352 url.SchemeIs(chrome::kChromeInternalScheme) || | 364 url.SchemeIs(chrome::kChromeInternalScheme) || |
353 url.SchemeIs(chrome::kChromeUIScheme); | 365 url.SchemeIs(chrome::kChromeUIScheme); |
354 } | 366 } |
355 | 367 |
356 bool ChromeContentClient::CanHandleWhileSwappedOut( | 368 bool ChromeContentClient::CanHandleWhileSwappedOut( |
357 const IPC::Message& msg) { | 369 const IPC::Message& msg) { |
358 // Any Chrome-specific messages (apart from those listed in | 370 // Any Chrome-specific messages (apart from those listed in |
359 // CanSendWhileSwappedOut) that must be handled by the browser when sent from | 371 // CanSendWhileSwappedOut) that must be handled by the browser when sent from |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 DCHECK(sandbox_profile_resource_id); | 465 DCHECK(sandbox_profile_resource_id); |
454 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { | 466 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { |
455 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 467 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
456 return true; | 468 return true; |
457 } | 469 } |
458 return false; | 470 return false; |
459 } | 471 } |
460 #endif | 472 #endif |
461 | 473 |
462 } // namespace chrome | 474 } // namespace chrome |
OLD | NEW |