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

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

Issue 944033002: PPAPI: Whitelist PPB_CameraDevice_Private for some apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/BUILD.gn » ('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/proxy/audio_input_resource.h" 9 #include "ppapi/proxy/audio_input_resource.h"
10 #include "ppapi/proxy/camera_device_resource.h" 10 #include "ppapi/proxy/camera_device_resource.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 PP_Resource ResourceCreationProxy::CreateAudioConfig( 217 PP_Resource ResourceCreationProxy::CreateAudioConfig(
218 PP_Instance instance, 218 PP_Instance instance,
219 PP_AudioSampleRate sample_rate, 219 PP_AudioSampleRate sample_rate,
220 uint32_t sample_frame_count) { 220 uint32_t sample_frame_count) {
221 return PPB_AudioConfig_Shared::Create( 221 return PPB_AudioConfig_Shared::Create(
222 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count); 222 OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count);
223 } 223 }
224 224
225 PP_Resource ResourceCreationProxy::CreateCameraDevicePrivate(
226 PP_Instance instance) {
227 return (new CameraDeviceResource(GetConnection(), instance))->GetReference();
228 }
229
225 PP_Resource ResourceCreationProxy::CreateCompositor(PP_Instance instance) { 230 PP_Resource ResourceCreationProxy::CreateCompositor(PP_Instance instance) {
226 return (new CompositorResource(GetConnection(), instance))->GetReference(); 231 return (new CompositorResource(GetConnection(), instance))->GetReference();
227 } 232 }
228 233
229 PP_Resource ResourceCreationProxy::CreateFileChooser( 234 PP_Resource ResourceCreationProxy::CreateFileChooser(
230 PP_Instance instance, 235 PP_Instance instance,
231 PP_FileChooserMode_Dev mode, 236 PP_FileChooserMode_Dev mode,
232 const PP_Var& accept_types) { 237 const PP_Var& accept_types) {
233 scoped_refptr<StringVar> string_var = StringVar::FromPPVar(accept_types); 238 scoped_refptr<StringVar> string_var = StringVar::FromPPVar(accept_types);
234 std::string str = string_var.get() ? string_var->value() : std::string(); 239 std::string str = string_var.get() ? string_var->value() : std::string();
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 return 0; 430 return 0;
426 return PluginGlobals::Get()->CreateBrowserFont( 431 return PluginGlobals::Get()->CreateBrowserFont(
427 GetConnection(), instance, *description, dispatcher->preferences()); 432 GetConnection(), instance, *description, dispatcher->preferences());
428 } 433 }
429 434
430 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance, 435 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance,
431 uint32_t size) { 436 uint32_t size) {
432 return PPB_Buffer_Proxy::CreateProxyResource(instance, size); 437 return PPB_Buffer_Proxy::CreateProxyResource(instance, size);
433 } 438 }
434 439
435 PP_Resource ResourceCreationProxy::CreateCameraDevicePrivate(
436 PP_Instance instance) {
437 return (new CameraDeviceResource(GetConnection(), instance))->GetReference();
438 }
439
440 PP_Resource ResourceCreationProxy::CreateFlashDRM(PP_Instance instance) { 440 PP_Resource ResourceCreationProxy::CreateFlashDRM(PP_Instance instance) {
441 return (new FlashDRMResource(GetConnection(), instance))->GetReference(); 441 return (new FlashDRMResource(GetConnection(), instance))->GetReference();
442 } 442 }
443 443
444 PP_Resource ResourceCreationProxy::CreateFlashFontFile( 444 PP_Resource ResourceCreationProxy::CreateFlashFontFile(
445 PP_Instance instance, 445 PP_Instance instance,
446 const PP_BrowserFont_Trusted_Description* description, 446 const PP_BrowserFont_Trusted_Description* description,
447 PP_PrivateFontCharset charset) { 447 PP_PrivateFontCharset charset) {
448 return (new FlashFontFileResource( 448 return (new FlashFontFileResource(
449 GetConnection(), instance, description, charset))->GetReference(); 449 GetConnection(), instance, description, charset))->GetReference();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 505 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
506 return false; 506 return false;
507 } 507 }
508 508
509 Connection ResourceCreationProxy::GetConnection() { 509 Connection ResourceCreationProxy::GetConnection() {
510 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 510 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
511 } 511 }
512 512
513 } // namespace proxy 513 } // namespace proxy
514 } // namespace ppapi 514 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698