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

Unified Diff: ppapi/shared_impl/ppb_audio_shared.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 side-by-side diff with in-line comments
Download patch
Index: ppapi/shared_impl/ppb_audio_shared.h
diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/ppb_audio_shared.h
index 10b05007bb6c0e6c322c6c22df2263ae48663de6..7f7995b3edbb781cf45570aa2011499dbcd1ba9d 100644
--- a/ppapi/shared_impl/ppb_audio_shared.h
+++ b/ppapi/shared_impl/ppb_audio_shared.h
@@ -8,8 +8,9 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
#include "base/threading/simple_thread.h"
@@ -111,18 +112,18 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared
// Socket used to notify us when audio is ready to accept new samples. This
// pointer is created in StreamCreated().
- scoped_ptr<base::CancelableSyncSocket> socket_;
+ std::unique_ptr<base::CancelableSyncSocket> socket_;
// Sample buffer in shared memory. This pointer is created in
// StreamCreated(). The memory is only mapped when the audio thread is
// created.
- scoped_ptr<base::SharedMemory> shared_memory_;
+ std::unique_ptr<base::SharedMemory> shared_memory_;
// The size of the sample buffer in bytes.
size_t shared_memory_size_;
// When the callback is set, this thread is spawned for calling it.
- scoped_ptr<base::DelegateSimpleThread> audio_thread_;
+ std::unique_ptr<base::DelegateSimpleThread> audio_thread_;
uintptr_t nacl_thread_id_;
bool nacl_thread_active_;
@@ -135,11 +136,11 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared
void* user_data_;
// AudioBus for shuttling data across the shared memory.
- scoped_ptr<media::AudioBus> audio_bus_;
+ std::unique_ptr<media::AudioBus> audio_bus_;
// Internal buffer for client's integer audio data.
int client_buffer_size_bytes_;
- scoped_ptr<uint8_t[]> client_buffer_;
+ std::unique_ptr<uint8_t[]> client_buffer_;
// The size (in bytes) of one second of audio data. Used to calculate latency.
size_t bytes_per_second_;
« no previous file with comments | « ppapi/shared_impl/media_stream_buffer_manager_unittest.cc ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698