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

Side by Side Diff: ppapi/proxy/video_destination_resource.cc

Issue 15806016: Update ppapi/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « ppapi/proxy/url_loader_resource.cc ('k') | ppapi/proxy/video_source_resource.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ppapi/proxy/video_destination_resource.h" 5 #include "ppapi/proxy/video_destination_resource.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ipc/ipc_message.h" 8 #include "ipc/ipc_message.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/private/pp_video_frame_private.h" 10 #include "ppapi/c/private/pp_video_frame_private.h"
(...skipping 29 matching lines...) Expand all
40 int32_t VideoDestinationResource::Open( 40 int32_t VideoDestinationResource::Open(
41 const PP_Var& stream_url, 41 const PP_Var& stream_url,
42 scoped_refptr<TrackedCallback> callback) { 42 scoped_refptr<TrackedCallback> callback) {
43 if (TrackedCallback::IsPending(open_callback_)) 43 if (TrackedCallback::IsPending(open_callback_))
44 return PP_ERROR_INPROGRESS; 44 return PP_ERROR_INPROGRESS;
45 45
46 open_callback_ = callback; 46 open_callback_ = callback;
47 47
48 scoped_refptr<StringVar> stream_url_var = StringVar::FromPPVar(stream_url); 48 scoped_refptr<StringVar> stream_url_var = StringVar::FromPPVar(stream_url);
49 const uint32_t kMaxStreamIdSizeInBytes = 16384; 49 const uint32_t kMaxStreamIdSizeInBytes = 16384;
50 if (!stream_url_var || 50 if (!stream_url_var.get() ||
51 stream_url_var->value().size() > kMaxStreamIdSizeInBytes) 51 stream_url_var->value().size() > kMaxStreamIdSizeInBytes)
52 return PP_ERROR_BADARGUMENT; 52 return PP_ERROR_BADARGUMENT;
53 Call<PpapiPluginMsg_VideoDestination_OpenReply>(RENDERER, 53 Call<PpapiPluginMsg_VideoDestination_OpenReply>(RENDERER,
54 PpapiHostMsg_VideoDestination_Open(stream_url_var->value()), 54 PpapiHostMsg_VideoDestination_Open(stream_url_var->value()),
55 base::Bind(&VideoDestinationResource::OnPluginMsgOpenComplete, this)); 55 base::Bind(&VideoDestinationResource::OnPluginMsgOpenComplete, this));
56 return PP_OK_COMPLETIONPENDING; 56 return PP_OK_COMPLETIONPENDING;
57 } 57 }
58 58
59 int32_t VideoDestinationResource::PutFrame( 59 int32_t VideoDestinationResource::PutFrame(
60 const PP_VideoFrame_Private& frame) { 60 const PP_VideoFrame_Private& frame) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (TrackedCallback::IsPending(open_callback_)) { 93 if (TrackedCallback::IsPending(open_callback_)) {
94 int32_t result = params.result(); 94 int32_t result = params.result();
95 if (result == PP_OK) 95 if (result == PP_OK)
96 is_open_ = true; 96 is_open_ = true;
97 open_callback_->Run(result); 97 open_callback_->Run(result);
98 } 98 }
99 } 99 }
100 100
101 } // namespace proxy 101 } // namespace proxy
102 } // namespace ppapi 102 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/url_loader_resource.cc ('k') | ppapi/proxy/video_source_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698