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

Side by Side Diff: webkit/plugins/ppapi/ppb_audio_impl.cc

Issue 7215027: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_audio_impl.h" 5 #include "webkit/plugins/ppapi/ppb_audio_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/c/pp_completion_callback.h" 8 #include "ppapi/c/pp_completion_callback.h"
9 #include "ppapi/c/ppb_audio.h" 9 #include "ppapi/c/ppb_audio.h"
10 #include "ppapi/c/ppb_audio_config.h" 10 #include "ppapi/c/ppb_audio_config.h"
(...skipping 19 matching lines...) Expand all
30 PPB_AudioConfig_Impl::AsPPB_AudioConfig_API() { 30 PPB_AudioConfig_Impl::AsPPB_AudioConfig_API() {
31 return this; 31 return this;
32 } 32 }
33 33
34 // PPB_Audio_Impl -------------------------------------------------------------- 34 // PPB_Audio_Impl --------------------------------------------------------------
35 35
36 PPB_Audio_Impl::PPB_Audio_Impl(PluginInstance* instance) 36 PPB_Audio_Impl::PPB_Audio_Impl(PluginInstance* instance)
37 : Resource(instance), 37 : Resource(instance),
38 config_id_(0), 38 config_id_(0),
39 audio_(NULL), 39 audio_(NULL),
40 create_callback_pending_(false) { 40 create_callback_pending_(false),
41 shared_memory_size_for_create_callback_(0) {
41 create_callback_ = PP_MakeCompletionCallback(NULL, NULL); 42 create_callback_ = PP_MakeCompletionCallback(NULL, NULL);
42 } 43 }
43 44
44 PPB_Audio_Impl::~PPB_Audio_Impl() { 45 PPB_Audio_Impl::~PPB_Audio_Impl() {
45 if (config_id_) 46 if (config_id_)
46 ResourceTracker::Get()->UnrefResource(config_id_); 47 ResourceTracker::Get()->UnrefResource(config_id_);
47 48
48 // Calling ShutDown() makes sure StreamCreated cannot be called anymore and 49 // Calling ShutDown() makes sure StreamCreated cannot be called anymore and
49 // releases the audio data associated with the pointer. Note however, that 50 // releases the audio data associated with the pointer. Note however, that
50 // until ShutDown returns, StreamCreated may still be called. This will be 51 // until ShutDown returns, StreamCreated may still be called. This will be
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // something more elaborate like an ACK from the plugin or post a task to 202 // something more elaborate like an ACK from the plugin or post a task to
202 // the I/O thread and back, but this extra complexity doesn't seem worth it 203 // the I/O thread and back, but this extra complexity doesn't seem worth it
203 // just to clean up these handles faster. 204 // just to clean up these handles faster.
204 } else { 205 } else {
205 SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle); 206 SetStreamInfo(shared_memory_handle, shared_memory_size, socket_handle);
206 } 207 }
207 } 208 }
208 209
209 } // namespace ppapi 210 } // namespace ppapi
210 } // namespace webkit 211 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698