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/ppb_buffer_impl.h" | 5 #include "content/renderer/pepper/ppb_buffer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> |
8 | 9 |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "content/common/pepper_file_util.h" | 11 #include "content/common/pepper_file_util.h" |
12 #include "content/renderer/render_thread_impl.h" | 12 #include "content/renderer/render_thread_impl.h" |
13 #include "ppapi/c/dev/ppb_buffer_dev.h" | 13 #include "ppapi/c/dev/ppb_buffer_dev.h" |
14 #include "ppapi/c/pp_bool.h" | 14 #include "ppapi/c/pp_bool.h" |
15 #include "ppapi/c/pp_errors.h" | 15 #include "ppapi/c/pp_errors.h" |
16 #include "ppapi/c/pp_instance.h" | 16 #include "ppapi/c/pp_instance.h" |
17 #include "ppapi/c/pp_resource.h" | 17 #include "ppapi/c/pp_resource.h" |
18 | 18 |
19 using ppapi::thunk::PPB_Buffer_API; | 19 using ppapi::thunk::PPB_Buffer_API; |
20 | 20 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 data_ = api->Map(); | 88 data_ = api->Map(); |
89 api->Describe(&size_); | 89 api->Describe(&size_); |
90 } | 90 } |
91 | 91 |
92 BufferAutoMapper::~BufferAutoMapper() { | 92 BufferAutoMapper::~BufferAutoMapper() { |
93 if (needs_unmap_) | 93 if (needs_unmap_) |
94 api_->Unmap(); | 94 api_->Unmap(); |
95 } | 95 } |
96 | 96 |
97 } // namespace content | 97 } // namespace content |
OLD | NEW |