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 "webkit/plugins/ppapi/ppb_buffer_impl.h" | 5 #include "content/renderer/pepper/ppb_buffer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/renderer/pepper/common.h" |
| 12 #include "content/renderer/pepper/plugin_delegate.h" |
| 13 #include "content/renderer/pepper/resource_helper.h" |
11 #include "ppapi/c/dev/ppb_buffer_dev.h" | 14 #include "ppapi/c/dev/ppb_buffer_dev.h" |
12 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
14 #include "webkit/plugins/ppapi/common.h" | |
15 #include "webkit/plugins/ppapi/plugin_delegate.h" | |
16 #include "webkit/plugins/ppapi/resource_helper.h" | |
17 | 17 |
18 using ::ppapi::thunk::PPB_Buffer_API; | 18 using ::ppapi::thunk::PPB_Buffer_API; |
19 | 19 |
20 namespace webkit { | 20 namespace webkit { |
21 namespace ppapi { | 21 namespace ppapi { |
22 | 22 |
23 PPB_Buffer_Impl::PPB_Buffer_Impl(PP_Instance instance) | 23 PPB_Buffer_Impl::PPB_Buffer_Impl(PP_Instance instance) |
24 : Resource(::ppapi::OBJECT_IS_IMPL, instance), | 24 : Resource(::ppapi::OBJECT_IS_IMPL, instance), |
25 size_(0), | 25 size_(0), |
26 map_count_(0) { | 26 map_count_(0) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 api->Describe(&size_); | 104 api->Describe(&size_); |
105 } | 105 } |
106 | 106 |
107 BufferAutoMapper::~BufferAutoMapper() { | 107 BufferAutoMapper::~BufferAutoMapper() { |
108 if (needs_unmap_) | 108 if (needs_unmap_) |
109 api_->Unmap(); | 109 api_->Unmap(); |
110 } | 110 } |
111 | 111 |
112 } // namespace ppapi | 112 } // namespace ppapi |
113 } // namespace webkit | 113 } // namespace webkit |
OLD | NEW |