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

Side by Side Diff: ppapi/proxy/resource_creation_proxy.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/ppb_message_loop_proxy.cc ('k') | ppapi/proxy/serialized_var.h » ('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 #include "ppapi/proxy/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
10 #include "ppapi/proxy/audio_input_resource.h" 10 #include "ppapi/proxy/audio_input_resource.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 uint32_t sample_frame_count) { 221 uint32_t sample_frame_count) {
222 return PPB_AudioConfig_Shared::Create( 222 return PPB_AudioConfig_Shared::Create(
223 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count); 223 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count);
224 } 224 }
225 225
226 PP_Resource ResourceCreationProxy::CreateFileChooser( 226 PP_Resource ResourceCreationProxy::CreateFileChooser(
227 PP_Instance instance, 227 PP_Instance instance,
228 PP_FileChooserMode_Dev mode, 228 PP_FileChooserMode_Dev mode,
229 const PP_Var& accept_types) { 229 const PP_Var& accept_types) {
230 scoped_refptr<StringVar> string_var = StringVar::FromPPVar(accept_types); 230 scoped_refptr<StringVar> string_var = StringVar::FromPPVar(accept_types);
231 std::string str = string_var ? string_var->value() : std::string(); 231 std::string str = string_var.get() ? string_var->value() : std::string();
232 return (new FileChooserResource(GetConnection(), instance, mode, 232 return (new FileChooserResource(GetConnection(), instance, mode, str.c_str()))
233 str.c_str()))->GetReference(); 233 ->GetReference();
234 } 234 }
235 235
236 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, 236 PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance,
237 const PP_Size* size, 237 const PP_Size* size,
238 PP_Bool is_always_opaque) { 238 PP_Bool is_always_opaque) {
239 return (new Graphics2DResource(GetConnection(), instance, *size, 239 return (new Graphics2DResource(GetConnection(), instance, *size,
240 is_always_opaque))->GetReference(); 240 is_always_opaque))->GetReference();
241 } 241 }
242 242
243 PP_Resource ResourceCreationProxy::CreateGraphics3D( 243 PP_Resource ResourceCreationProxy::CreateGraphics3D(
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 419 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
420 return false; 420 return false;
421 } 421 }
422 422
423 Connection ResourceCreationProxy::GetConnection() { 423 Connection ResourceCreationProxy::GetConnection() {
424 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 424 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
425 } 425 }
426 426
427 } // namespace proxy 427 } // namespace proxy
428 } // namespace ppapi 428 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/proxy/serialized_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698