| 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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 WebString BlinkPlatformImpl::domCodeStringFromEnum(int dom_code) { | 1334 WebString BlinkPlatformImpl::domCodeStringFromEnum(int dom_code) { |
| 1335 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1335 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1336 static_cast<ui::DomCode>(dom_code))); | 1336 static_cast<ui::DomCode>(dom_code))); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1339 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1340 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1340 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1341 code.utf8().data())); | 1341 code.utf8().data())); |
| 1342 } | 1342 } |
| 1343 | 1343 |
| 1344 WebString BlinkPlatformImpl::domKeyStringFromEnum(int dom_key) { |
| 1345 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
| 1346 static_cast<ui::DomKey>(dom_key))); |
| 1347 } |
| 1348 |
| 1349 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key) { |
| 1350 return static_cast<int>(ui::KeycodeConverter::KeyStringToDomKey( |
| 1351 key.utf8().data())); |
| 1352 } |
| 1353 |
| 1344 } // namespace content | 1354 } // namespace content |
| OLD | NEW |