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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "net/base/net_errors.h" | 52 #include "net/base/net_errors.h" |
53 #include "net/base/net_util.h" | 53 #include "net/base/net_util.h" |
54 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" | 54 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" |
55 #include "third_party/WebKit/public/platform/WebData.h" | 55 #include "third_party/WebKit/public/platform/WebData.h" |
56 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 56 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
57 #include "third_party/WebKit/public/platform/WebString.h" | 57 #include "third_party/WebKit/public/platform/WebString.h" |
58 #include "third_party/WebKit/public/platform/WebURL.h" | 58 #include "third_party/WebKit/public/platform/WebURL.h" |
59 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" | 59 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" |
60 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 60 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
61 #include "ui/base/layout.h" | 61 #include "ui/base/layout.h" |
| 62 #include "ui/events/keycodes/dom4/keycode_converter.h" |
62 | 63 |
63 using blink::WebData; | 64 using blink::WebData; |
64 using blink::WebFallbackThemeEngine; | 65 using blink::WebFallbackThemeEngine; |
65 using blink::WebLocalizedString; | 66 using blink::WebLocalizedString; |
66 using blink::WebString; | 67 using blink::WebString; |
67 using blink::WebThemeEngine; | 68 using blink::WebThemeEngine; |
68 using blink::WebURL; | 69 using blink::WebURL; |
69 using blink::WebURLError; | 70 using blink::WebURLError; |
70 using blink::WebURLLoader; | 71 using blink::WebURLLoader; |
71 | 72 |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 } | 1280 } |
1280 } | 1281 } |
1281 | 1282 |
1282 // static | 1283 // static |
1283 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1284 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
1284 WebThreadImplForMessageLoop* impl = | 1285 WebThreadImplForMessageLoop* impl = |
1285 static_cast<WebThreadImplForMessageLoop*>(thread); | 1286 static_cast<WebThreadImplForMessageLoop*>(thread); |
1286 delete impl; | 1287 delete impl; |
1287 } | 1288 } |
1288 | 1289 |
| 1290 WebString BlinkPlatformImpl::domCodeStringFromEnum(int dom_code) { |
| 1291 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1292 static_cast<ui::DomCode>(dom_code))); |
| 1293 } |
| 1294 |
| 1295 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1296 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1297 code.utf8().data())); |
| 1298 } |
| 1299 |
1289 } // namespace content | 1300 } // namespace content |
OLD | NEW |