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/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 return base::PLATFORM_FILE_ERROR_FAILED; | 926 return base::PLATFORM_FILE_ERROR_FAILED; |
927 return error; | 927 return error; |
928 } | 928 } |
929 | 929 |
930 void PepperPluginDelegateImpl::SyncGetFileSystemPlatformPath( | 930 void PepperPluginDelegateImpl::SyncGetFileSystemPlatformPath( |
931 const GURL& url, FilePath* platform_path) { | 931 const GURL& url, FilePath* platform_path) { |
932 RenderThreadImpl::current()->Send(new FileSystemHostMsg_SyncGetPlatformPath( | 932 RenderThreadImpl::current()->Send(new FileSystemHostMsg_SyncGetPlatformPath( |
933 url, platform_path)); | 933 url, platform_path)); |
934 } | 934 } |
935 | 935 |
| 936 void PepperPluginDelegateImpl::GetDeviceID(std::string* id) { |
| 937 RenderThreadImpl::current()->Send(new PepperMsg_GetDeviceID(id)); |
| 938 } |
| 939 |
936 scoped_refptr<base::MessageLoopProxy> | 940 scoped_refptr<base::MessageLoopProxy> |
937 PepperPluginDelegateImpl::GetFileThreadMessageLoopProxy() { | 941 PepperPluginDelegateImpl::GetFileThreadMessageLoopProxy() { |
938 return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(); | 942 return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(); |
939 } | 943 } |
940 | 944 |
941 uint32 PepperPluginDelegateImpl::TCPSocketCreate() { | 945 uint32 PepperPluginDelegateImpl::TCPSocketCreate() { |
942 uint32 socket_id = 0; | 946 uint32 socket_id = 0; |
943 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create( | 947 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create( |
944 render_view_->routing_id(), 0, &socket_id)); | 948 render_view_->routing_id(), 0, &socket_id)); |
945 return socket_id; | 949 return socket_id; |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 #endif | 1277 #endif |
1274 } | 1278 } |
1275 | 1279 |
1276 double PepperPluginDelegateImpl::GetLocalTimeZoneOffset(base::Time t) { | 1280 double PepperPluginDelegateImpl::GetLocalTimeZoneOffset(base::Time t) { |
1277 double result = 0.0; | 1281 double result = 0.0; |
1278 render_view_->Send(new PepperMsg_GetLocalTimeZoneOffset( | 1282 render_view_->Send(new PepperMsg_GetLocalTimeZoneOffset( |
1279 t, &result)); | 1283 t, &result)); |
1280 return result; | 1284 return result; |
1281 } | 1285 } |
1282 | 1286 |
| 1287 std::string PepperPluginDelegateImpl::GetDeviceID() { |
| 1288 std::string result; |
| 1289 render_view_->Send(new PepperMsg_GetDeviceID(&result)); |
| 1290 return result; |
| 1291 } |
| 1292 |
1283 base::SharedMemory* PepperPluginDelegateImpl::CreateAnonymousSharedMemory( | 1293 base::SharedMemory* PepperPluginDelegateImpl::CreateAnonymousSharedMemory( |
1284 uint32_t size) { | 1294 uint32_t size) { |
1285 if (size == 0) | 1295 if (size == 0) |
1286 return NULL; | 1296 return NULL; |
1287 base::SharedMemoryHandle handle; | 1297 base::SharedMemoryHandle handle; |
1288 if (!render_view_->Send( | 1298 if (!render_view_->Send( |
1289 new ChildProcessHostMsg_SyncAllocateSharedMemory(size, &handle))) { | 1299 new ChildProcessHostMsg_SyncAllocateSharedMemory(size, &handle))) { |
1290 DLOG(WARNING) << "Browser allocation request message failed"; | 1300 DLOG(WARNING) << "Browser allocation request message failed"; |
1291 return NULL; | 1301 return NULL; |
1292 } | 1302 } |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 mouse_lock_instances_.erase(it); | 1632 mouse_lock_instances_.erase(it); |
1623 } | 1633 } |
1624 } | 1634 } |
1625 | 1635 |
1626 webkit_glue::ClipboardClient* | 1636 webkit_glue::ClipboardClient* |
1627 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1637 PepperPluginDelegateImpl::CreateClipboardClient() const { |
1628 return new RendererClipboardClient; | 1638 return new RendererClipboardClient; |
1629 } | 1639 } |
1630 | 1640 |
1631 } // namespace content | 1641 } // namespace content |
OLD | NEW |