| 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 "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 case WebLocalizedString::DownloadButtonLabel: | 223 case WebLocalizedString::DownloadButtonLabel: |
| 224 return IDS_DOWNLOAD_BUTTON_LABEL; | 224 return IDS_DOWNLOAD_BUTTON_LABEL; |
| 225 case WebLocalizedString::FileButtonChooseFileLabel: | 225 case WebLocalizedString::FileButtonChooseFileLabel: |
| 226 return IDS_FORM_FILE_BUTTON_LABEL; | 226 return IDS_FORM_FILE_BUTTON_LABEL; |
| 227 case WebLocalizedString::FileButtonChooseMultipleFilesLabel: | 227 case WebLocalizedString::FileButtonChooseMultipleFilesLabel: |
| 228 return IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL; | 228 return IDS_FORM_MULTIPLE_FILES_BUTTON_LABEL; |
| 229 case WebLocalizedString::FileButtonNoFileSelectedLabel: | 229 case WebLocalizedString::FileButtonNoFileSelectedLabel: |
| 230 return IDS_FORM_FILE_NO_FILE_LABEL; | 230 return IDS_FORM_FILE_NO_FILE_LABEL; |
| 231 case WebLocalizedString::InputElementAltText: | 231 case WebLocalizedString::InputElementAltText: |
| 232 return IDS_FORM_INPUT_ALT; | 232 return IDS_FORM_INPUT_ALT; |
| 233 case WebLocalizedString::KeygenMenuHighGradeKeySize: | |
| 234 return IDS_KEYGEN_HIGH_GRADE_KEY; | |
| 235 case WebLocalizedString::KeygenMenuMediumGradeKeySize: | |
| 236 return IDS_KEYGEN_MED_GRADE_KEY; | |
| 237 case WebLocalizedString::MissingPluginText: | 233 case WebLocalizedString::MissingPluginText: |
| 238 return IDS_PLUGIN_INITIALIZATION_ERROR; | 234 return IDS_PLUGIN_INITIALIZATION_ERROR; |
| 239 case WebLocalizedString::MultipleFileUploadText: | 235 case WebLocalizedString::MultipleFileUploadText: |
| 240 return IDS_FORM_FILE_MULTIPLE_UPLOAD; | 236 return IDS_FORM_FILE_MULTIPLE_UPLOAD; |
| 241 case WebLocalizedString::OtherColorLabel: | 237 case WebLocalizedString::OtherColorLabel: |
| 242 return IDS_FORM_OTHER_COLOR_LABEL; | 238 return IDS_FORM_OTHER_COLOR_LABEL; |
| 243 case WebLocalizedString::OtherDateLabel: | 239 case WebLocalizedString::OtherDateLabel: |
| 244 return IDS_FORM_OTHER_DATE_LABEL; | 240 return IDS_FORM_OTHER_DATE_LABEL; |
| 245 case WebLocalizedString::OtherMonthLabel: | 241 case WebLocalizedString::OtherMonthLabel: |
| 246 return IDS_FORM_OTHER_MONTH_LABEL; | 242 return IDS_FORM_OTHER_MONTH_LABEL; |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 long long BlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( | 799 long long BlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( |
| 804 const blink::WebSecurityOrigin& origin) { | 800 const blink::WebSecurityOrigin& origin) { |
| 805 return 0; | 801 return 0; |
| 806 } | 802 } |
| 807 | 803 |
| 808 bool BlinkPlatformImpl::databaseSetFileSize( | 804 bool BlinkPlatformImpl::databaseSetFileSize( |
| 809 const blink::WebString& vfs_file_name, long long size) { | 805 const blink::WebString& vfs_file_name, long long size) { |
| 810 return false; | 806 return false; |
| 811 } | 807 } |
| 812 | 808 |
| 813 blink::WebString BlinkPlatformImpl::signedPublicKeyAndChallengeString( | |
| 814 unsigned key_size_index, | |
| 815 const blink::WebString& challenge, | |
| 816 const blink::WebURL& url, | |
| 817 const blink::WebURL& top_origin) { | |
| 818 return blink::WebString(""); | |
| 819 } | |
| 820 | |
| 821 size_t BlinkPlatformImpl::actualMemoryUsageMB() { | 809 size_t BlinkPlatformImpl::actualMemoryUsageMB() { |
| 822 return GetMemoryUsageKB() >> 10; | 810 return GetMemoryUsageKB() >> 10; |
| 823 } | 811 } |
| 824 | 812 |
| 825 size_t BlinkPlatformImpl::numberOfProcessors() { | 813 size_t BlinkPlatformImpl::numberOfProcessors() { |
| 826 return static_cast<size_t>(base::SysInfo::NumberOfProcessors()); | 814 return static_cast<size_t>(base::SysInfo::NumberOfProcessors()); |
| 827 } | 815 } |
| 828 | 816 |
| 829 size_t BlinkPlatformImpl::maxDecodedImageBytes() { | 817 size_t BlinkPlatformImpl::maxDecodedImageBytes() { |
| 830 #if defined(OS_ANDROID) | 818 #if defined(OS_ANDROID) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 859 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
| 872 static_cast<ui::DomKey>(dom_key))); | 860 static_cast<ui::DomKey>(dom_key))); |
| 873 } | 861 } |
| 874 | 862 |
| 875 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 863 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
| 876 return static_cast<int>( | 864 return static_cast<int>( |
| 877 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 865 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
| 878 } | 866 } |
| 879 | 867 |
| 880 } // namespace content | 868 } // namespace content |
| OLD | NEW |