Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: ppapi/shared_impl/var_tracker.h

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nullptr Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/shared_impl/tracked_callback.h ('k') | ppapi/thunk/ppb_flash_clipboard_thunk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef PPAPI_SHARED_IMPL_VAR_TRACKER_H_ 5 #ifndef PPAPI_SHARED_IMPL_VAR_TRACKER_H_
6 #define PPAPI_SHARED_IMPL_VAR_TRACKER_H_ 6 #define PPAPI_SHARED_IMPL_VAR_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/shared_memory.h" 16 #include "base/memory/shared_memory.h"
17 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
18 #include "ppapi/c/pp_instance.h" 18 #include "ppapi/c/pp_instance.h"
19 #include "ppapi/c/pp_module.h" 19 #include "ppapi/c/pp_module.h"
20 #include "ppapi/c/pp_resource.h" 20 #include "ppapi/c/pp_resource.h"
21 #include "ppapi/c/pp_var.h" 21 #include "ppapi/c/pp_var.h"
22 #include "ppapi/shared_impl/host_resource.h" 22 #include "ppapi/shared_impl/host_resource.h"
23 #include "ppapi/shared_impl/ppapi_shared_export.h" 23 #include "ppapi/shared_impl/ppapi_shared_export.h"
24 #include "ppapi/shared_impl/var.h" 24 #include "ppapi/shared_impl/var.h"
25 25
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // a real WebKit ArrayBuffer on the host side. 228 // a real WebKit ArrayBuffer on the host side.
229 virtual ArrayBufferVar* CreateArrayBuffer(uint32_t size_in_bytes) = 0; 229 virtual ArrayBufferVar* CreateArrayBuffer(uint32_t size_in_bytes) = 0;
230 virtual ArrayBufferVar* CreateShmArrayBuffer( 230 virtual ArrayBufferVar* CreateShmArrayBuffer(
231 uint32_t size_in_bytes, 231 uint32_t size_in_bytes,
232 base::SharedMemoryHandle handle) = 0; 232 base::SharedMemoryHandle handle) = 0;
233 233
234 // On the host side, we want to check that we are only called on the main 234 // On the host side, we want to check that we are only called on the main
235 // thread. This is to protect us from accidentally using the tracker from 235 // thread. This is to protect us from accidentally using the tracker from
236 // other threads (especially the IO thread). On the plugin side, the tracker 236 // other threads (especially the IO thread). On the plugin side, the tracker
237 // is protected by the proxy lock and is thread-safe, so this will be NULL. 237 // is protected by the proxy lock and is thread-safe, so this will be NULL.
238 scoped_ptr<base::ThreadChecker> thread_checker_; 238 std::unique_ptr<base::ThreadChecker> thread_checker_;
239 239
240 DISALLOW_COPY_AND_ASSIGN(VarTracker); 240 DISALLOW_COPY_AND_ASSIGN(VarTracker);
241 }; 241 };
242 242
243 } // namespace ppapi 243 } // namespace ppapi
244 244
245 #endif // PPAPI_SHARED_IMPL_VAR_TRACKER_H_ 245 #endif // PPAPI_SHARED_IMPL_VAR_TRACKER_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/tracked_callback.h ('k') | ppapi/thunk/ppb_flash_clipboard_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698