| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/common/shell_content_client.h" | 5 #include "extensions/shell/common/shell_content_client.h" |
| 6 | 6 |
| 7 #include "base/strings/string_piece.h" | 7 #include "base/strings/string_piece.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/public/common/user_agent.h" | 9 #include "content/public/common/user_agent.h" |
| 10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 nacl.internal_entry_points.shutdown_module = | 70 nacl.internal_entry_points.shutdown_module = |
| 71 nacl_plugin::PPP_ShutdownModule; | 71 nacl_plugin::PPP_ShutdownModule; |
| 72 nacl.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV; | 72 nacl.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV; |
| 73 plugins->push_back(nacl); | 73 plugins->push_back(nacl); |
| 74 #endif // !defined(DISABLE_NACL) | 74 #endif // !defined(DISABLE_NACL) |
| 75 } | 75 } |
| 76 | 76 |
| 77 void ShellContentClient::AddAdditionalSchemes( | 77 void ShellContentClient::AddAdditionalSchemes( |
| 78 std::vector<std::string>* standard_schemes, | 78 std::vector<std::string>* standard_schemes, |
| 79 std::vector<std::string>* savable_schemes) { | 79 std::vector<std::string>* savable_schemes) { |
| 80 standard_schemes->push_back(kExtensionScheme); | 80 standard_schemes->push_back( |
| 81 url::SchemeWithType(extensions::kExtensionScheme, |
| 82 url::SCHEME_WITHOUT_PORT)); |
| 81 savable_schemes->push_back(kExtensionScheme); | 83 savable_schemes->push_back(kExtensionScheme); |
| 82 standard_schemes->push_back(kExtensionResourceScheme); | 84 standard_schemes->push_back( |
| 85 url::SchemeWithType(extensions::kExtensionResourceScheme, |
| 86 url::SCHEME_WITHOUT_PORT)); |
| 83 savable_schemes->push_back(kExtensionResourceScheme); | 87 savable_schemes->push_back(kExtensionResourceScheme); |
| 84 } | 88 } |
| 85 | 89 |
| 86 std::string ShellContentClient::GetUserAgent() const { | 90 std::string ShellContentClient::GetUserAgent() const { |
| 87 // Must contain a user agent string for version sniffing. For example, | 91 // Must contain a user agent string for version sniffing. For example, |
| 88 // pluginless WebRTC Hangouts checks the Chrome version number. | 92 // pluginless WebRTC Hangouts checks the Chrome version number. |
| 89 return content::BuildUserAgentFromProduct("Chrome/" PRODUCT_VERSION); | 93 return content::BuildUserAgentFromProduct("Chrome/" PRODUCT_VERSION); |
| 90 } | 94 } |
| 91 | 95 |
| 92 base::string16 ShellContentClient::GetLocalizedString(int message_id) const { | 96 base::string16 ShellContentClient::GetLocalizedString(int message_id) const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 103 base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes( | 107 base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes( |
| 104 int resource_id) const { | 108 int resource_id) const { |
| 105 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); | 109 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); |
| 106 } | 110 } |
| 107 | 111 |
| 108 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { | 112 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { |
| 109 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); | 113 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); |
| 110 } | 114 } |
| 111 | 115 |
| 112 } // namespace extensions | 116 } // namespace extensions |
| OLD | NEW |