summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorjchuang <jchuang@chromium.org>2015-02-24 21:17:56 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-25 05:18:42 +0000
commit586e3dbe02974966b7a3adaf0aebfbcc4d6983ba (patch)
treeb6ee4ea627d84f005c17df76e5257703d8fa2904 /ppapi
parentd6b95a86b557e8eb1b06cb1891682cd3d3448fc3 (diff)
downloadchromium_src-586e3dbe02974966b7a3adaf0aebfbcc4d6983ba.zip
chromium_src-586e3dbe02974966b7a3adaf0aebfbcc4d6983ba.tar.gz
chromium_src-586e3dbe02974966b7a3adaf0aebfbcc4d6983ba.tar.bz2
PPAPI: Whitelist PPB_CameraDevice_Private for some apps
Also compile PPB_CameraDevice_Private and PPB_CameraCapabilities_Private in NACL. BUG=387547 TEST=Test with a trusted plugin. (Haven't tested on NaCl) Review URL: https://codereview.chromium.org/944033002 Cr-Commit-Position: refs/heads/master@{#317984}
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/ppapi_proxy.gypi2
-rw-r--r--ppapi/ppapi_shared.gypi2
-rw-r--r--ppapi/proxy/BUILD.gn8
-rw-r--r--ppapi/proxy/resource_creation_proxy.cc10
-rw-r--r--ppapi/proxy/resource_creation_proxy.h2
-rw-r--r--ppapi/thunk/BUILD.gn8
-rw-r--r--ppapi/thunk/interfaces_ppb_private.h4
-rw-r--r--ppapi/thunk/interfaces_ppb_private_no_permissions.h5
-rw-r--r--ppapi/thunk/resource_creation_api.h2
9 files changed, 20 insertions, 23 deletions
diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi
index 7a7f0cd..8312dd66 100644
--- a/ppapi/ppapi_proxy.gypi
+++ b/ppapi/ppapi_proxy.gypi
@@ -272,8 +272,6 @@
'proxy/audio_input_resource.cc',
'proxy/broker_dispatcher.cc',
'proxy/browser_font_singleton_resource.cc',
- 'proxy/camera_capabilities_resource.cc',
- 'proxy/camera_device_resource.cc',
'proxy/device_enumeration_resource_helper.cc',
'proxy/flash_clipboard_resource.cc',
'proxy/flash_drm_resource.cc',
diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi
index 974ba01..db3ac86 100644
--- a/ppapi/ppapi_shared.gypi
+++ b/ppapi/ppapi_shared.gypi
@@ -323,8 +323,6 @@
'thunk/ppb_broker_thunk.cc',
'thunk/ppb_browser_font_trusted_thunk.cc',
'thunk/ppb_buffer_thunk.cc',
- 'thunk/ppb_camera_capabilities_private_thunk.cc',
- 'thunk/ppb_camera_device_private_thunk.cc',
'thunk/ppb_char_set_thunk.cc',
'thunk/ppb_content_decryptor_private_thunk.cc',
'thunk/ppb_flash_clipboard_thunk.cc',
diff --git a/ppapi/proxy/BUILD.gn b/ppapi/proxy/BUILD.gn
index f6b7a6d..a475780 100644
--- a/ppapi/proxy/BUILD.gn
+++ b/ppapi/proxy/BUILD.gn
@@ -21,6 +21,10 @@ component("proxy") {
"audio_buffer_resource.h",
"broker_resource.cc",
"broker_resource.h",
+ "camera_capabilities_resource.cc",
+ "camera_capabilities_resource.h",
+ "camera_device_resource.cc",
+ "camera_device_resource.h",
"compositor_layer_resource.cc",
"compositor_layer_resource.h",
"compositor_resource.cc",
@@ -212,10 +216,6 @@ component("proxy") {
"broker_dispatcher.h",
"browser_font_singleton_resource.cc",
"browser_font_singleton_resource.h",
- "camera_capabilities_resource.cc",
- "camera_capabilities_resource.h",
- "camera_device_resource.cc",
- "camera_device_resource.h",
"device_enumeration_resource_helper.cc",
"device_enumeration_resource_helper.h",
"flash_clipboard_resource.cc",
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index 4ca95ba..bcb044e 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -222,6 +222,11 @@ PP_Resource ResourceCreationProxy::CreateAudioConfig(
OBJECT_IS_PROXY, instance, sample_rate, sample_frame_count);
}
+PP_Resource ResourceCreationProxy::CreateCameraDevicePrivate(
+ PP_Instance instance) {
+ return (new CameraDeviceResource(GetConnection(), instance))->GetReference();
+}
+
PP_Resource ResourceCreationProxy::CreateCompositor(PP_Instance instance) {
return (new CompositorResource(GetConnection(), instance))->GetReference();
}
@@ -432,11 +437,6 @@ PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance,
return PPB_Buffer_Proxy::CreateProxyResource(instance, size);
}
-PP_Resource ResourceCreationProxy::CreateCameraDevicePrivate(
- PP_Instance instance) {
- return (new CameraDeviceResource(GetConnection(), instance))->GetReference();
-}
-
PP_Resource ResourceCreationProxy::CreateFlashDRM(PP_Instance instance) {
return (new FlashDRMResource(GetConnection(), instance))->GetReference();
}
diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h
index 194cf7d..957463d 100644
--- a/ppapi/proxy/resource_creation_proxy.h
+++ b/ppapi/proxy/resource_creation_proxy.h
@@ -106,6 +106,7 @@ class ResourceCreationProxy : public InterfaceProxy,
virtual PP_Resource CreateAudioConfig(PP_Instance instance,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count) override;
+ virtual PP_Resource CreateCameraDevicePrivate(PP_Instance instance) override;
virtual PP_Resource CreateCompositor(PP_Instance instance) override;
virtual PP_Resource CreateFileChooser(PP_Instance instance,
PP_FileChooserMode_Dev mode,
@@ -169,7 +170,6 @@ class ResourceCreationProxy : public InterfaceProxy,
const PP_BrowserFont_Trusted_Description* description) override;
virtual PP_Resource CreateBuffer(PP_Instance instance,
uint32_t size) override;
- virtual PP_Resource CreateCameraDevicePrivate(PP_Instance instance) override;
virtual PP_Resource CreateFlashDRM(PP_Instance instance) override;
virtual PP_Resource CreateFlashFontFile(
PP_Instance instance,
diff --git a/ppapi/thunk/BUILD.gn b/ppapi/thunk/BUILD.gn
index 0f034e6..43128cc 100644
--- a/ppapi/thunk/BUILD.gn
+++ b/ppapi/thunk/BUILD.gn
@@ -16,6 +16,10 @@ source_set("thunk") {
"ppb_broker_api.h",
"ppb_browser_font_trusted_api.h",
"ppb_buffer_api.h",
+ "ppb_camera_capabilities_api.h",
+ "ppb_camera_capabilities_private_thunk.cc",
+ "ppb_camera_device_api.h",
+ "ppb_camera_device_private_thunk.cc",
"ppb_compositor_api.h",
"ppb_compositor_layer_api.h",
"ppb_compositor_layer_thunk.cc",
@@ -147,10 +151,6 @@ source_set("thunk") {
"ppb_broker_thunk.cc",
"ppb_browser_font_trusted_thunk.cc",
"ppb_buffer_thunk.cc",
- "ppb_camera_capabilities_api.h",
- "ppb_camera_capabilities_private_thunk.cc",
- "ppb_camera_device_api.h",
- "ppb_camera_device_private_thunk.cc",
"ppb_char_set_thunk.cc",
"ppb_content_decryptor_private_thunk.cc",
"ppb_flash_clipboard_thunk.cc",
diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h
index 9f0e61c..70c6c2e 100644
--- a/ppapi/thunk/interfaces_ppb_private.h
+++ b/ppapi/thunk/interfaces_ppb_private.h
@@ -23,10 +23,6 @@ PROXIED_IFACE(PPB_BROKER_TRUSTED_INTERFACE_0_3,
PPB_BrokerTrusted_0_3)
PROXIED_IFACE(PPB_BROWSERFONT_TRUSTED_INTERFACE_1_0,
PPB_BrowserFont_Trusted_1_0)
-PROXIED_IFACE(PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE_0_1,
- PPB_CameraCapabilities_Private_0_1)
-PROXIED_IFACE(PPB_CAMERADEVICE_PRIVATE_INTERFACE_0_1,
- PPB_CameraDevice_Private_0_1)
PROXIED_IFACE(PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13,
PPB_ContentDecryptor_Private_0_13)
PROXIED_IFACE(PPB_CHARSET_TRUSTED_INTERFACE_1_0,
diff --git a/ppapi/thunk/interfaces_ppb_private_no_permissions.h b/ppapi/thunk/interfaces_ppb_private_no_permissions.h
index 6c224fe..297648f 100644
--- a/ppapi/thunk/interfaces_ppb_private_no_permissions.h
+++ b/ppapi/thunk/interfaces_ppb_private_no_permissions.h
@@ -10,6 +10,11 @@
// These interfaces don't require private permissions. However, they only work
// for whitelisted origins.
+PROXIED_IFACE(PPB_CAMERACAPABILITIES_PRIVATE_INTERFACE_0_1,
+ PPB_CameraCapabilities_Private_0_1)
+PROXIED_IFACE(PPB_CAMERADEVICE_PRIVATE_INTERFACE_0_1,
+ PPB_CameraDevice_Private_0_1)
+
PROXIED_IFACE(PPB_HOSTRESOLVER_PRIVATE_INTERFACE_0_1,
PPB_HostResolver_Private_0_1)
PROXIED_IFACE(PPB_TCPSERVERSOCKET_PRIVATE_INTERFACE_0_1,
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h
index 6c781e3..f8174c6 100644
--- a/ppapi/thunk/resource_creation_api.h
+++ b/ppapi/thunk/resource_creation_api.h
@@ -124,6 +124,7 @@ class ResourceCreationAPI {
virtual PP_Resource CreateAudioConfig(PP_Instance instance,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count) = 0;
+ virtual PP_Resource CreateCameraDevicePrivate(PP_Instance instance) = 0;
virtual PP_Resource CreateCompositor(PP_Instance instance) = 0;
virtual PP_Resource CreateFileChooser(PP_Instance instance,
PP_FileChooserMode_Dev mode,
@@ -182,7 +183,6 @@ class ResourceCreationAPI {
PP_Instance instance,
const PP_BrowserFont_Trusted_Description* description) = 0;
virtual PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) = 0;
- virtual PP_Resource CreateCameraDevicePrivate(PP_Instance instance) = 0;
virtual PP_Resource CreateFlashDRM(PP_Instance instance) = 0;
virtual PP_Resource CreateFlashFontFile(
PP_Instance instance,