OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
| 14 #include "base/safe_numerics.h" |
14 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
16 #include "content/child/database_util.h" | 17 #include "content/child/database_util.h" |
17 #include "content/child/fileapi/webfilesystem_impl.h" | 18 #include "content/child/fileapi/webfilesystem_impl.h" |
18 #include "content/child/indexed_db/proxy_webidbfactory_impl.h" | 19 #include "content/child/indexed_db/proxy_webidbfactory_impl.h" |
19 #include "content/child/npapi/npobject_util.h" | 20 #include "content/child/npapi/npobject_util.h" |
20 #include "content/child/thread_safe_sender.h" | 21 #include "content/child/thread_safe_sender.h" |
21 #include "content/child/webblobregistry_impl.h" | 22 #include "content/child/webblobregistry_impl.h" |
22 #include "content/child/webmessageportchannel_impl.h" | 23 #include "content/child/webmessageportchannel_impl.h" |
23 #include "content/common/file_utilities_messages.h" | 24 #include "content/common/file_utilities_messages.h" |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 | 1111 |
1111 //------------------------------------------------------------------------------ | 1112 //------------------------------------------------------------------------------ |
1112 | 1113 |
1113 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1114 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
1114 if (!web_crypto_) | 1115 if (!web_crypto_) |
1115 web_crypto_.reset(new WebCryptoImpl()); | 1116 web_crypto_.reset(new WebCryptoImpl()); |
1116 return web_crypto_.get(); | 1117 return web_crypto_.get(); |
1117 | 1118 |
1118 } | 1119 } |
1119 | 1120 |
| 1121 //------------------------------------------------------------------------------ |
| 1122 |
| 1123 #if defined(OS_ANDROID) |
| 1124 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { |
| 1125 RenderThread::Get()->Send( |
| 1126 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); |
| 1127 } |
| 1128 |
| 1129 void RendererWebKitPlatformSupportImpl::cancelVibration() { |
| 1130 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); |
| 1131 } |
| 1132 #endif // defined(OS_ANDROID) |
| 1133 |
1120 } // namespace content | 1134 } // namespace content |
OLD | NEW |