| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 WebString BlinkPlatformImpl::domCodeStringFromEnum(int dom_code) { | 1256 WebString BlinkPlatformImpl::domCodeStringFromEnum(int dom_code) { |
| 1257 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1257 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1258 static_cast<ui::DomCode>(dom_code))); | 1258 static_cast<ui::DomCode>(dom_code))); |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1261 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1262 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1262 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1263 code.utf8().data())); | 1263 code.utf8().data())); |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 WebString BlinkPlatformImpl::domKeyStringFromEnum(int dom_key) { |
| 1267 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
| 1268 static_cast<ui::DomKey>(dom_key))); |
| 1269 } |
| 1270 |
| 1271 int BlinkPlatformImpl::domEnumFromKeyString(const WebString& key) { |
| 1272 return static_cast<int>(ui::KeycodeConverter::KeyStringToDomKey( |
| 1273 key.utf8().data())); |
| 1274 } |
| 1275 |
| 1266 } // namespace content | 1276 } // namespace content |
| OLD | NEW |