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/host_array_buffer_var.h" | 5 #include "content/renderer/pepper/host_array_buffer_var.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
13 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
14 #include "content/common/sandbox_util.h" | 14 #include "content/common/sandbox_util.h" |
15 #include "content/renderer/pepper/host_globals.h" | 15 #include "content/renderer/pepper/host_globals.h" |
16 #include "content/renderer/pepper/plugin_module.h" | 16 #include "content/renderer/pepper/plugin_module.h" |
17 #include "content/renderer/render_thread_impl.h" | 17 #include "content/renderer/render_thread_impl.h" |
18 #include "ppapi/c/pp_instance.h" | 18 #include "ppapi/c/pp_instance.h" |
19 | 19 |
20 using ppapi::ArrayBufferVar; | 20 using ppapi::ArrayBufferVar; |
21 using WebKit::WebArrayBuffer; | 21 using blink::WebArrayBuffer; |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 HostArrayBufferVar::HostArrayBufferVar(uint32 size_in_bytes) | 25 HostArrayBufferVar::HostArrayBufferVar(uint32 size_in_bytes) |
26 : buffer_(WebArrayBuffer::create(size_in_bytes, 1 /* element_size */)), | 26 : buffer_(WebArrayBuffer::create(size_in_bytes, 1 /* element_size */)), |
27 valid_(true) { | 27 valid_(true) { |
28 } | 28 } |
29 | 29 |
30 HostArrayBufferVar::HostArrayBufferVar(const WebArrayBuffer& buffer) | 30 HostArrayBufferVar::HostArrayBufferVar(const WebArrayBuffer& buffer) |
31 : buffer_(buffer), | 31 : buffer_(buffer), |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 #else | 92 #else |
93 #error Not implemented. | 93 #error Not implemented. |
94 #endif | 94 #endif |
95 | 95 |
96 *plugin_shm_handle = BrokerGetFileHandleForProcess(platform_file, p, false); | 96 *plugin_shm_handle = BrokerGetFileHandleForProcess(platform_file, p, false); |
97 *host_shm_handle_id = -1; | 97 *host_shm_handle_id = -1; |
98 return true; | 98 return true; |
99 } | 99 } |
100 | 100 |
101 } // namespace content | 101 } // namespace content |
OLD | NEW |