summaryrefslogtreecommitdiff
path: root/chromium/ppapi
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:19:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:01:50 +0000
commit51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch)
tree835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/ppapi
parent6036726eb981b6c4b42047513b9d3f4ac865daac (diff)
downloadqtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/ppapi')
-rw-r--r--chromium/ppapi/BUILD.gn30
-rw-r--r--chromium/ppapi/api/OWNERS7
-rw-r--r--chromium/ppapi/api/private/ppb_video_destination_private.idl95
-rw-r--r--chromium/ppapi/api/private/ppb_video_source_private.idl93
-rw-r--r--chromium/ppapi/c/BUILD.gn2
-rw-r--r--chromium/ppapi/c/private/ppb_video_destination_private.h122
-rw-r--r--chromium/ppapi/c/private/ppb_video_source_private.h118
-rw-r--r--chromium/ppapi/cpp/BUILD.gn4
-rw-r--r--chromium/ppapi/cpp/private/video_destination_private.cc76
-rw-r--r--chromium/ppapi/cpp/private/video_destination_private.h89
-rw-r--r--chromium/ppapi/cpp/private/video_source_private.cc71
-rw-r--r--chromium/ppapi/cpp/private/video_source_private.h87
-rw-r--r--chromium/ppapi/examples/BUILD.gn1
-rw-r--r--chromium/ppapi/examples/video_effects/BUILD.gn15
-rw-r--r--chromium/ppapi/examples/video_effects/video_effects.cc180
-rw-r--r--chromium/ppapi/examples/video_effects/video_effects.html205
-rw-r--r--chromium/ppapi/host/resource_message_filter.h6
-rw-r--r--chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c92
-rw-r--r--chromium/ppapi/proxy/BUILD.gn4
-rw-r--r--chromium/ppapi/proxy/interface_list.cc2
-rw-r--r--chromium/ppapi/proxy/ppapi_messages.h24
-rw-r--r--chromium/ppapi/proxy/resource_creation_proxy.cc13
-rw-r--r--chromium/ppapi/proxy/resource_creation_proxy.h2
-rw-r--r--chromium/ppapi/proxy/video_destination_resource.cc102
-rw-r--r--chromium/ppapi/proxy/video_destination_resource.h59
-rw-r--r--chromium/ppapi/proxy/video_source_resource.cc120
-rw-r--r--chromium/ppapi/proxy/video_source_resource.h69
-rw-r--r--chromium/ppapi/shared_impl/ppapi_constants.h3
-rw-r--r--chromium/ppapi/shared_impl/ppb_tcp_socket_shared.cc3
-rw-r--r--chromium/ppapi/shared_impl/resource.h2
-rw-r--r--chromium/ppapi/thunk/BUILD.gn4
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_private_no_permissions.h5
-rw-r--r--chromium/ppapi/thunk/ppb_video_destination_private_api.h34
-rw-r--r--chromium/ppapi/thunk/ppb_video_destination_private_thunk.cc76
-rw-r--r--chromium/ppapi/thunk/ppb_video_source_private_api.h35
-rw-r--r--chromium/ppapi/thunk/ppb_video_source_private_thunk.cc73
-rw-r--r--chromium/ppapi/thunk/resource_creation_api.h2
37 files changed, 34 insertions, 1891 deletions
diff --git a/chromium/ppapi/BUILD.gn b/chromium/ppapi/BUILD.gn
index 950eb43ced1..cc4695c6d4c 100644
--- a/chromium/ppapi/BUILD.gn
+++ b/chromium/ppapi/BUILD.gn
@@ -131,12 +131,8 @@ test_common_source_files = [
"tests/test_var_resource.h",
"tests/test_video_decoder.cc",
"tests/test_video_decoder.h",
- "tests/test_video_destination.cc",
- "tests/test_video_destination.h",
"tests/test_video_encoder.cc",
"tests/test_video_encoder.h",
- "tests/test_video_source.cc",
- "tests/test_video_source.h",
"tests/test_view.cc",
"tests/test_view.h",
"tests/test_websocket.cc",
@@ -255,6 +251,8 @@ target(ppapi_tests_target_type, "ppapi_tests") {
]
}
+# Test plugin for power saver tests.
+# See also ppapi::RegisterFlashTestPlugin.
source_set("power_saver_test_plugin_sources") {
sources = [
"tests/power_saver_test_plugin.cc",
@@ -267,13 +265,37 @@ source_set("power_saver_test_plugin_sources") {
]
}
+# Test plugin for Cross-Origin Read Blocking.
+# See also ppapi::RegisterCorbTestPlugin.
+source_set("corb_test_plugin_sources") {
+ sources = [
+ "tests/corb_test_plugin.cc",
+ "tests/test_utils.cc",
+ ]
+
+ deps = [
+ "//ppapi/cpp",
+ "//ppapi/shared_impl",
+ ]
+}
+
if (!is_mac) {
+ shared_library("corb_test_plugin") {
+ deps = [
+ ":corb_test_plugin_sources",
+ ]
+ }
shared_library("power_saver_test_plugin") {
deps = [
":power_saver_test_plugin_sources",
]
}
} else {
+ mac_plugin_bundle("corb_test_plugin") {
+ deps = [
+ ":corb_test_plugin_sources",
+ ]
+ }
mac_plugin_bundle("power_saver_test_plugin") {
deps = [
":power_saver_test_plugin_sources",
diff --git a/chromium/ppapi/api/OWNERS b/chromium/ppapi/api/OWNERS
deleted file mode 100644
index df227dd9886..00000000000
--- a/chromium/ppapi/api/OWNERS
+++ /dev/null
@@ -1,7 +0,0 @@
-# Changing the PPAPI requires sending an explicit design doc discussing
-# the features missing from the open web platform, and the transition plan.
-set noparent
-
-file://ENG_REVIEW_OWNERS
-
-# COMPONENT: Internals>Plugins>Pepper
diff --git a/chromium/ppapi/api/private/ppb_video_destination_private.idl b/chromium/ppapi/api/private/ppb_video_destination_private.idl
deleted file mode 100644
index a37cbd56ac8..00000000000
--- a/chromium/ppapi/api/private/ppb_video_destination_private.idl
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/**
- * This file defines the <code>PPB_VideoDestination_Private</code> interface
- * for a video destination resource, which sends video frames to a MediaStream
- * video track in the browser.
- */
-
- label Chrome {
- M28 = 0.1
- };
-
-/**
- * The <code>PPB_VideoDestination_Private</code> interface contains pointers to
- * several functions for creating video destination resources and using them to
- * send video frames to a MediaStream video track in the browser.
- */
-interface PPB_VideoDestination_Private {
- /**
- * Creates a video destination resource.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying an instance of
- * a module.
- *
- * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on
- * failure. Failure means the instance was invalid.
- */
- PP_Resource Create([in] PP_Instance instance);
-
- /**
- * Determines if a resource is a video destination resource.
- *
- * @param[in] resource The <code>PP_Resource</code> to test.
- *
- * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
- * resource is a video destination resource or <code>PP_FALSE</code>
- * otherwise.
- */
- PP_Bool IsVideoDestination([in] PP_Resource resource);
-
- /**
- * Opens a video destination for putting frames.
- *
- * @param[in] destination A <code>PP_Resource</code> corresponding to a video
- * destination resource.
- * @param[in] stream_url A <code>PP_Var</code> string holding a URL
- * identifying a MediaStream.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of Open().
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- * destination.
- * Returns PP_ERROR_INPROGRESS if destination is already open.
- * Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- * some other browser error.
- */
- int32_t Open([in] PP_Resource destination,
- [in] PP_Var stream_url,
- [in] PP_CompletionCallback callback);
-
- /**
- * Puts a frame to the video destination.
- *
- * After this call, you should take care to release your references to the
- * image embedded in the video frame. If you paint to the image after
- * PutFame(), there is the possibility of artifacts because the browser may
- * still be copying the frame to the stream.
- *
- * @param[in] destination A <code>PP_Resource</code> corresponding to a video
- * destination resource.
- * @param[in] frame A <code>PP_VideoFrame_Private</code> holding the video
- * frame to send to the destination.
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- * destination.
- * Returns PP_ERROR_FAILED if destination is not open, if the video frame has
- * an invalid image data resource, or if some other browser error occurs.
- */
- int32_t PutFrame([in] PP_Resource destination,
- [in] PP_VideoFrame_Private frame);
-
- /**
- * Closes the video destination.
- *
- * @param[in] destination A <code>PP_Resource</code> corresponding to a video
- * destination.
- */
- void Close([in] PP_Resource destination);
-};
-
diff --git a/chromium/ppapi/api/private/ppb_video_source_private.idl b/chromium/ppapi/api/private/ppb_video_source_private.idl
deleted file mode 100644
index e57eedd0810..00000000000
--- a/chromium/ppapi/api/private/ppb_video_source_private.idl
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/**
- * This file defines the <code>PPB_VideoSource_Private</code> interface for a
- * video source resource, which receives video frames from a MediaStream video
- * track in the browser.
- */
-
- label Chrome {
- M28 = 0.1
- };
-
-/**
- * The <code>PPB_VideoSource_Private</code> interface contains pointers to
- * several functions for creating video source resources and using them to
- * receive video frames from a MediaStream video track in the browser.
- */
-interface PPB_VideoSource_Private {
- /**
- * Creates a video source resource.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying an instance of
- * a module.
- *
- * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on
- * failure. Failure means the instance was invalid.
- */
- PP_Resource Create([in] PP_Instance instance);
-
- /**
- * Determines if a resource is a video source resource.
- *
- * @param[in] resource The <code>PP_Resource</code> to test.
- *
- * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
- * resource is a video source resource or <code>PP_FALSE</code> otherwise.
- */
- PP_Bool IsVideoSource([in] PP_Resource resource);
-
- /**
- * Opens a video source for getting frames.
- *
- * @param[in] source A <code>PP_Resource</code> corresponding to a video
- * source resource.
- * @param[in] stream_url A <code>PP_Var</code> string holding a URL
- * identifying a MediaStream.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of Open().
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- * Returns PP_ERROR_INPROGRESS if source is already open.
- * Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- * some other browser error.
- */
- int32_t Open([in] PP_Resource source,
- [in] PP_Var stream_url,
- [in] PP_CompletionCallback callback);
-
- /**
- * Gets a frame from the video source. The returned image data is only valid
- * until the next call to GetFrame.
- * The image data resource inside the returned frame will have its reference
- * count incremented by one and must be managed by the plugin.
- *
- * @param[in] source A <code>PP_Resource</code> corresponding to a video
- * source resource.
- * @param[out] frame A <code>PP_VideoFrame_Private</code> to hold a video
- * frame from the source.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of GetNextFrame().
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- * Returns PP_ERROR_FAILED if the source is not open, or if some other
- * browser error occurs.
- */
- int32_t GetFrame([in] PP_Resource source,
- [out] PP_VideoFrame_Private frame,
- [in] PP_CompletionCallback callback);
-
- /**
- * Closes the video source.
- *
- * @param[in] source A <code>PP_Resource</code> corresponding to a video
- * source resource.
- */
- void Close([in] PP_Resource source);
-};
-
diff --git a/chromium/ppapi/c/BUILD.gn b/chromium/ppapi/c/BUILD.gn
index c2db534389f..8c23e161153 100644
--- a/chromium/ppapi/c/BUILD.gn
+++ b/chromium/ppapi/c/BUILD.gn
@@ -143,8 +143,6 @@ source_set("c") {
"private/ppb_testing_private.h",
"private/ppb_udp_socket_private.h",
"private/ppb_uma_private.h",
- "private/ppb_video_destination_private.h",
- "private/ppb_video_source_private.h",
"private/ppb_x509_certificate_private.h",
"private/ppp_find_private.h",
"private/ppp_flash_browser_operations.h",
diff --git a/chromium/ppapi/c/private/ppb_video_destination_private.h b/chromium/ppapi/c/private/ppb_video_destination_private.h
deleted file mode 100644
index 775ec9612c5..00000000000
--- a/chromium/ppapi/c/private/ppb_video_destination_private.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* From private/ppb_video_destination_private.idl,
- * modified Thu Apr 25 11:51:30 2013.
- */
-
-#ifndef PPAPI_C_PRIVATE_PPB_VIDEO_DESTINATION_PRIVATE_H_
-#define PPAPI_C_PRIVATE_PPB_VIDEO_DESTINATION_PRIVATE_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_time.h"
-#include "ppapi/c/pp_var.h"
-#include "ppapi/c/private/pp_video_frame_private.h"
-
-#define PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1 \
- "PPB_VideoDestination_Private;0.1"
-#define PPB_VIDEODESTINATION_PRIVATE_INTERFACE \
- PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the <code>PPB_VideoDestination_Private</code> interface
- * for a video destination resource, which sends video frames to a MediaStream
- * video track in the browser.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * The <code>PPB_VideoDestination_Private</code> interface contains pointers to
- * several functions for creating video destination resources and using them to
- * send video frames to a MediaStream video track in the browser.
- */
-struct PPB_VideoDestination_Private_0_1 {
- /**
- * Creates a video destination resource.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying an instance of
- * a module.
- *
- * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on
- * failure. Failure means the instance was invalid.
- */
- PP_Resource (*Create)(PP_Instance instance);
- /**
- * Determines if a resource is a video destination resource.
- *
- * @param[in] resource The <code>PP_Resource</code> to test.
- *
- * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
- * resource is a video destination resource or <code>PP_FALSE</code>
- * otherwise.
- */
- PP_Bool (*IsVideoDestination)(PP_Resource resource);
- /**
- * Opens a video destination for putting frames.
- *
- * @param[in] destination A <code>PP_Resource</code> corresponding to a video
- * destination resource.
- * @param[in] stream_url A <code>PP_Var</code> string holding a URL
- * identifying a MediaStream.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of Open().
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- * destination.
- * Returns PP_ERROR_INPROGRESS if destination is already open.
- * Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- * some other browser error.
- */
- int32_t (*Open)(PP_Resource destination,
- struct PP_Var stream_url,
- struct PP_CompletionCallback callback);
- /**
- * Puts a frame to the video destination.
- *
- * After this call, you should take care to release your references to the
- * image embedded in the video frame. If you paint to the image after
- * PutFame(), there is the possibility of artifacts because the browser may
- * still be copying the frame to the stream.
- *
- * @param[in] destination A <code>PP_Resource</code> corresponding to a video
- * destination resource.
- * @param[in] frame A <code>PP_VideoFrame_Private</code> holding the video
- * frame to send to the destination.
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- * destination.
- * Returns PP_ERROR_FAILED if destination is not open, if the video frame has
- * an invalid image data resource, or if some other browser error occurs.
- */
- int32_t (*PutFrame)(PP_Resource destination,
- const struct PP_VideoFrame_Private* frame);
- /**
- * Closes the video destination.
- *
- * @param[in] destination A <code>PP_Resource</code> corresponding to a video
- * destination.
- */
- void (*Close)(PP_Resource destination);
-};
-
-typedef struct PPB_VideoDestination_Private_0_1 PPB_VideoDestination_Private;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_PRIVATE_PPB_VIDEO_DESTINATION_PRIVATE_H_ */
-
diff --git a/chromium/ppapi/c/private/ppb_video_source_private.h b/chromium/ppapi/c/private/ppb_video_source_private.h
deleted file mode 100644
index e2c715b0bef..00000000000
--- a/chromium/ppapi/c/private/ppb_video_source_private.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* From private/ppb_video_source_private.idl,
- * modified Mon Oct 27 16:13:24 2014.
- */
-
-#ifndef PPAPI_C_PRIVATE_PPB_VIDEO_SOURCE_PRIVATE_H_
-#define PPAPI_C_PRIVATE_PPB_VIDEO_SOURCE_PRIVATE_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_time.h"
-#include "ppapi/c/pp_var.h"
-#include "ppapi/c/private/pp_video_frame_private.h"
-
-#define PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1 "PPB_VideoSource_Private;0.1"
-#define PPB_VIDEOSOURCE_PRIVATE_INTERFACE PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the <code>PPB_VideoSource_Private</code> interface for a
- * video source resource, which receives video frames from a MediaStream video
- * track in the browser.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-/**
- * The <code>PPB_VideoSource_Private</code> interface contains pointers to
- * several functions for creating video source resources and using them to
- * receive video frames from a MediaStream video track in the browser.
- */
-struct PPB_VideoSource_Private_0_1 {
- /**
- * Creates a video source resource.
- *
- * @param[in] instance A <code>PP_Instance</code> identifying an instance of
- * a module.
- *
- * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on
- * failure. Failure means the instance was invalid.
- */
- PP_Resource (*Create)(PP_Instance instance);
- /**
- * Determines if a resource is a video source resource.
- *
- * @param[in] resource The <code>PP_Resource</code> to test.
- *
- * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
- * resource is a video source resource or <code>PP_FALSE</code> otherwise.
- */
- PP_Bool (*IsVideoSource)(PP_Resource resource);
- /**
- * Opens a video source for getting frames.
- *
- * @param[in] source A <code>PP_Resource</code> corresponding to a video
- * source resource.
- * @param[in] stream_url A <code>PP_Var</code> string holding a URL
- * identifying a MediaStream.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of Open().
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- * Returns PP_ERROR_INPROGRESS if source is already open.
- * Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- * some other browser error.
- */
- int32_t (*Open)(PP_Resource source,
- struct PP_Var stream_url,
- struct PP_CompletionCallback callback);
- /**
- * Gets a frame from the video source. The returned image data is only valid
- * until the next call to GetFrame.
- * The image data resource inside the returned frame will have its reference
- * count incremented by one and must be managed by the plugin.
- *
- * @param[in] source A <code>PP_Resource</code> corresponding to a video
- * source resource.
- * @param[out] frame A <code>PP_VideoFrame_Private</code> to hold a video
- * frame from the source.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of GetNextFrame().
- *
- * @return An int32_t containing a result code from <code>pp_errors.h</code>.
- * Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- * Returns PP_ERROR_FAILED if the source is not open, or if some other
- * browser error occurs.
- */
- int32_t (*GetFrame)(PP_Resource source,
- struct PP_VideoFrame_Private* frame,
- struct PP_CompletionCallback callback);
- /**
- * Closes the video source.
- *
- * @param[in] source A <code>PP_Resource</code> corresponding to a video
- * source resource.
- */
- void (*Close)(PP_Resource source);
-};
-
-typedef struct PPB_VideoSource_Private_0_1 PPB_VideoSource_Private;
-/**
- * @}
- */
-
-#endif /* PPAPI_C_PRIVATE_PPB_VIDEO_SOURCE_PRIVATE_H_ */
-
diff --git a/chromium/ppapi/cpp/BUILD.gn b/chromium/ppapi/cpp/BUILD.gn
index fa74c3f8414..a5d692b8a56 100644
--- a/chromium/ppapi/cpp/BUILD.gn
+++ b/chromium/ppapi/cpp/BUILD.gn
@@ -250,12 +250,8 @@ source_set("objects") {
"private/uma_private.h",
"private/var_private.cc",
"private/var_private.h",
- "private/video_destination_private.cc",
- "private/video_destination_private.h",
"private/video_frame_private.cc",
"private/video_frame_private.h",
- "private/video_source_private.cc",
- "private/video_source_private.h",
"private/x509_certificate_private.cc",
"private/x509_certificate_private.h",
diff --git a/chromium/ppapi/cpp/private/video_destination_private.cc b/chromium/ppapi/cpp/private/video_destination_private.cc
deleted file mode 100644
index 5233b5f09ee..00000000000
--- a/chromium/ppapi/cpp/private/video_destination_private.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/cpp/private/video_destination_private.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/ppb_video_destination_private.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/private/video_frame_private.h"
-#include "ppapi/cpp/var.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_VideoDestination_Private_0_1>() {
- return PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1;
-}
-
-} // namespace
-
-VideoDestination_Private::VideoDestination_Private() {
-}
-
-VideoDestination_Private::VideoDestination_Private(
- const InstanceHandle& instance) {
- if (!has_interface<PPB_VideoDestination_Private_0_1>())
- return;
- PassRefFromConstructor(
- get_interface<PPB_VideoDestination_Private_0_1>()->Create(
- instance.pp_instance()));
-}
-
-VideoDestination_Private::VideoDestination_Private(
- const VideoDestination_Private& other)
- : Resource(other) {
-}
-
-VideoDestination_Private::VideoDestination_Private(PassRef,
- PP_Resource resource)
- : Resource(PASS_REF, resource) {
-}
-
-int32_t VideoDestination_Private::Open(const Var& stream_url,
- const CompletionCallback& cc) {
- if (has_interface<PPB_VideoDestination_Private_0_1>()) {
- int32_t result =
- get_interface<PPB_VideoDestination_Private_0_1>()->Open(
- pp_resource(),
- stream_url.pp_var(),
- cc.pp_completion_callback());
- return result;
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-int32_t VideoDestination_Private::PutFrame(
- const VideoFrame_Private& frame) {
- if (has_interface<PPB_VideoDestination_Private_0_1>()) {
- return get_interface<PPB_VideoDestination_Private_0_1>()->PutFrame(
- pp_resource(),
- &frame.pp_video_frame());
- }
- return PP_ERROR_NOINTERFACE;
-}
-
-void VideoDestination_Private::Close() {
- if (has_interface<PPB_VideoDestination_Private_0_1>()) {
- get_interface<PPB_VideoDestination_Private_0_1>()->Close(pp_resource());
- }
-}
-
-} // namespace pp
diff --git a/chromium/ppapi/cpp/private/video_destination_private.h b/chromium/ppapi/cpp/private/video_destination_private.h
deleted file mode 100644
index 7e2bd5b6179..00000000000
--- a/chromium/ppapi/cpp/private/video_destination_private.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_CPP_PRIVATE_VIDEO_DESTINATION_PRIVATE_H_
-#define PPAPI_CPP_PRIVATE_VIDEO_DESTINATION_PRIVATE_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "ppapi/c/pp_time.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/pass_ref.h"
-#include "ppapi/cpp/resource.h"
-
-/// @file
-/// This file defines the <code>PPB_VideoDestination_Private</code> interface
-/// for a video destination resource, which sends video frames to a MediaStream
-/// video track in the browser.
-
-namespace pp {
-
-class InstanceHandle;
-class VideoFrame_Private;
-
-/// The <code>VideoDestination_Private</code> class contains methods for
-/// creating video destination resources and using them to send video frames to
-/// a MediaStream video track in the browser.
-class VideoDestination_Private : public Resource {
- public:
- /// Default constructor for creating a <code>VideoDestination_Private</code>
- /// object.
- VideoDestination_Private();
-
- /// Constructor for creating a <code>VideoDestination_Private</code> for an
- /// instance.
- explicit VideoDestination_Private(const InstanceHandle& instance);
-
- /// The copy constructor for <code>VideoDestination_Private</code>.
- ///
- /// @param[in] other A reference to a <code>VideoDestination_Private</code>.
- VideoDestination_Private(const VideoDestination_Private& other);
-
- /// A constructor used when you have received a PP_Resource as a return
- /// value that has had its reference count incremented for you.
- ///
- /// @param[in] resource A PP_Resource corresponding to a video destination.
- VideoDestination_Private(PassRef, PP_Resource resource);
-
- /// Opens a video destination for putting frames.
- ///
- /// @param[in] stream_url A <code>Var</code> string holding a URL identifying
- /// a MediaStream.
- /// @param[in] callback A <code>CompletionCallback</code> to be
- /// called upon completion of Open().
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- /// destination.
- /// Returns PP_ERROR_INPROGRESS if destination is already open.
- /// Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- /// some other browser error.
- int32_t Open(const Var& stream_url, const CompletionCallback& cc);
-
- /// Puts a frame to the video destination.
- ///
- /// After this call, you should take care to release your references to the
- /// image embedded in the video frame. If you paint to the image after
- /// PutFrame(), there is the possibility of artifacts because the browser may
- /// still be copying the frame to the stream.
- ///
- /// @param[in] frame A <code>VideoFrame_Private</code> holding the video
- /// frame to send to the destination.
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
- /// destination.
- /// Returns PP_ERROR_FAILED if destination is not open, if the video frame has
- /// an invalid image data resource, or if some other browser error occurs.
- int32_t PutFrame(const VideoFrame_Private& frame);
-
- /// Closes the video destination.
- void Close();
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_PRIVATE_VIDEO_DESTINATION_PRIVATE_H_
diff --git a/chromium/ppapi/cpp/private/video_source_private.cc b/chromium/ppapi/cpp/private/video_source_private.cc
deleted file mode 100644
index 264c001103c..00000000000
--- a/chromium/ppapi/cpp/private/video_source_private.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/cpp/private/video_source_private.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/ppb_video_source_private.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/private/video_frame_private.h"
-#include "ppapi/cpp/var.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_VideoSource_Private_0_1>() {
- return PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1;
-}
-
-} // namespace
-
-VideoSource_Private::VideoSource_Private() {
-}
-
-VideoSource_Private::VideoSource_Private(const InstanceHandle& instance) {
- if (!has_interface<PPB_VideoSource_Private_0_1>())
- return;
- PassRefFromConstructor(get_interface<PPB_VideoSource_Private_0_1>()->Create(
- instance.pp_instance()));
-}
-
-VideoSource_Private::VideoSource_Private(const VideoSource_Private& other)
- : Resource(other) {
-}
-
-VideoSource_Private::VideoSource_Private(PassRef, PP_Resource resource)
- : Resource(PASS_REF, resource) {
-}
-
-int32_t VideoSource_Private::Open(const Var& stream_url,
- const CompletionCallback& cc) {
- if (has_interface<PPB_VideoSource_Private_0_1>()) {
- int32_t result =
- get_interface<PPB_VideoSource_Private_0_1>()->Open(
- pp_resource(),
- stream_url.pp_var(), cc.pp_completion_callback());
- return result;
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-int32_t VideoSource_Private::GetFrame(
- const CompletionCallbackWithOutput<VideoFrame_Private>& cc) {
- if (has_interface<PPB_VideoSource_Private_0_1>()) {
- return get_interface<PPB_VideoSource_Private_0_1>()->GetFrame(
- pp_resource(),
- cc.output(), cc.pp_completion_callback());
- }
- return cc.MayForce(PP_ERROR_NOINTERFACE);
-}
-
-void VideoSource_Private::Close() {
- if (has_interface<PPB_VideoSource_Private_0_1>()) {
- get_interface<PPB_VideoSource_Private_0_1>()->Close(pp_resource());
- }
-}
-
-} // namespace pp
diff --git a/chromium/ppapi/cpp/private/video_source_private.h b/chromium/ppapi/cpp/private/video_source_private.h
deleted file mode 100644
index b62e0305e11..00000000000
--- a/chromium/ppapi/cpp/private/video_source_private.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_CPP_PRIVATE_VIDEO_SOURCE_PRIVATE_H_
-#define PPAPI_CPP_PRIVATE_VIDEO_SOURCE_PRIVATE_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "ppapi/c/pp_time.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/pass_ref.h"
-#include "ppapi/cpp/resource.h"
-
-/// @file
-/// This file defines the <code>PPB_VideoSource_Private</code> interface for a
-/// video source resource, which receives video frames from a MediaStream video
-/// track in the browser.
-
-namespace pp {
-
-class InstanceHandle;
-class VideoFrame_Private;
-
-/// The <code>VideoSource_Private</code> class contains methods for creating
-/// video source resources and using them to receive video frames from a
-/// MediaStream video track in the browser.
-class VideoSource_Private : public Resource {
- public:
- /// Default constructor for creating a <code>VideoSource_Private</code>
- /// object.
- VideoSource_Private();
-
- /// Constructor for creating a <code>VideoSource_Private</code> for an
- /// instance.
- explicit VideoSource_Private(const InstanceHandle& instance);
-
- /// The copy constructor for <code>VideoSource_Private</code>.
- ///
- /// @param[in] other A reference to a <code>VideoSource_Private</code>.
- VideoSource_Private(const VideoSource_Private& other);
-
- /// A constructor used when you have received a PP_Resource as a return
- /// value that has had its reference count incremented for you.
- ///
- /// @param[in] resource A PP_Resource corresponding to a video source.
- VideoSource_Private(PassRef, PP_Resource resource);
-
- /// Opens a video source for getting frames.
- ///
- /// @param[in] stream_url A <code>Var</code> string holding a URL identifying
- /// a MediaStream.
- /// @param[in] callback A <code>CompletionCallback</code> to be called upon
- /// completion of Open().
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- /// Returns PP_ERROR_INPROGRESS if source is already open.
- /// Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
- /// some other browser error.
- int32_t Open(const Var& stream_url,
- const CompletionCallback& cc);
-
- /// Gets a frame from the video source. The returned frame is only valid
- /// until the next call to GetFrame.
- ///
- /// @param[out] frame A <code>VideoFrame_Private</code> to hold a video
- /// frame from the source.
- /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be
- /// called upon completion of ReceiveFrame().
- ///
- /// @return An int32_t containing a result code from <code>pp_errors.h</code>.
- /// Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
- /// Returns PP_ERROR_FAILED if the source is not open, or if some other
- /// browser error occurs.
- int32_t GetFrame(
- const CompletionCallbackWithOutput<VideoFrame_Private>& cc);
-
- /// Closes the video source.
- void Close();
-};
-
-} // namespace pp
-
-#endif // PPAPI_CPP_PRIVATE_VIDEO_SOURCE_PRIVATE_H_
diff --git a/chromium/ppapi/examples/BUILD.gn b/chromium/ppapi/examples/BUILD.gn
index 65eb464529d..b80d5f938ff 100644
--- a/chromium/ppapi/examples/BUILD.gn
+++ b/chromium/ppapi/examples/BUILD.gn
@@ -32,7 +32,6 @@ group("examples") {
"//ppapi/examples/url_loader",
"//ppapi/examples/video_capture",
"//ppapi/examples/video_decode",
- "//ppapi/examples/video_effects",
"//ppapi/examples/video_encode",
]
}
diff --git a/chromium/ppapi/examples/video_effects/BUILD.gn b/chromium/ppapi/examples/video_effects/BUILD.gn
deleted file mode 100644
index a93a08d2a4f..00000000000
--- a/chromium/ppapi/examples/video_effects/BUILD.gn
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//ppapi/examples/ppapi_example.gni")
-
-ppapi_example("video_effects") {
- output_name = "video_effects"
- sources = [
- "video_effects.cc",
- ]
- deps = [
- "//ppapi/cpp",
- ]
-}
diff --git a/chromium/ppapi/examples/video_effects/video_effects.cc b/chromium/ppapi/examples/video_effects/video_effects.cc
deleted file mode 100644
index ab6dc354a02..00000000000
--- a/chromium/ppapi/examples/video_effects/video_effects.cc
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdint.h>
-#include <string.h>
-#include <iterator>
-#include <sstream>
-#include <string>
-#include <vector>
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/message_loop.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/private/video_destination_private.h"
-#include "ppapi/cpp/private/video_frame_private.h"
-#include "ppapi/cpp/private/video_source_private.h"
-#include "ppapi/cpp/var.h"
-#include "ppapi/utility/completion_callback_factory.h"
-
-// When compiling natively on Windows, PostMessage can be #define-d to
-// something else.
-#ifdef PostMessage
-#undef PostMessage
-#endif
-
-namespace {
-
-// Helper functions
-std::vector<std::string> SplitStringBySpace(const std::string& str) {
- std::istringstream buf(str);
- std::istream_iterator<std::string> begin(buf), end;
- std::vector<std::string> tokens(begin, end);
- return tokens;
-}
-
-// This object is the global object representing this plugin library as long
-// as it is loaded.
-class VEDemoModule : public pp::Module {
- public:
- VEDemoModule() : pp::Module() {}
- virtual ~VEDemoModule() {}
-
- virtual pp::Instance* CreateInstance(PP_Instance instance);
-};
-
-class VEDemoInstance : public pp::Instance {
- public:
- VEDemoInstance(PP_Instance instance, pp::Module* module);
- virtual ~VEDemoInstance();
-
- // pp::Instance implementation (see PPP_Instance).
- virtual void HandleMessage(const pp::Var& message_data);
-
- private:
- void DestinationOpenDone(int32_t result, const std::string& src_url);
- void SourceOpenDone(int32_t result);
- void GetFrameDone(int32_t result, pp::VideoFrame_Private video_frame);
- void KickoffEffect(int32_t result);
- pp::VideoSource_Private video_source_;
- pp::VideoDestination_Private video_destination_;
- bool effect_on_;
- pp::CompletionCallbackFactory<VEDemoInstance> factory_;
- pp::MessageLoop message_loop_;
-};
-
-VEDemoInstance::VEDemoInstance(PP_Instance instance, pp::Module* module)
- : pp::Instance(instance),
- video_source_(this),
- video_destination_(this),
- effect_on_(false),
- message_loop_(pp::MessageLoop::GetCurrent()) {
- factory_.Initialize(this);
-}
-
-VEDemoInstance::~VEDemoInstance() {
- video_source_.Close();
- video_destination_.Close();
-}
-
-void VEDemoInstance::HandleMessage(const pp::Var& message_data) {
- if (message_data.is_string()) {
- std::vector<std::string> messages;
- messages = SplitStringBySpace(message_data.AsString());
- if (messages.empty()) {
- PostMessage(pp::Var("Ignored empty message."));
- return;
- }
- if (messages[0] == "registerStream") {
- if (messages.size() < 3) {
- PostMessage(pp::Var("Got 'registerStream' with incorrect parameters."));
- return;
- }
- // Open destination stream for write.
- video_destination_.Open(
- messages[2],
- factory_.NewCallback(&VEDemoInstance::DestinationOpenDone,
- messages[1]));
- } else if (messages[0] == "effectOn") {
- effect_on_ = true;
- PostMessage(pp::Var("Effect ON."));
- } else if (messages[0] == "effectOff") {
- effect_on_ = false;
- PostMessage(pp::Var("Effect OFF."));
- }
- }
-}
-
-void VEDemoInstance::DestinationOpenDone(int32_t result,
- const std::string& src_url) {
- if (result != PP_OK) {
- PostMessage(pp::Var("Failed to open destination stream."));
- return;
- }
- // Open source stream for read.
- video_source_.Open(src_url,
- factory_.NewCallback(&VEDemoInstance::SourceOpenDone));
-}
-
-void VEDemoInstance::SourceOpenDone(int32_t result) {
- if (result != PP_OK) {
- PostMessage(pp::Var("Failed to open source stream."));
- return;
- }
- // Done with the stream register.
- PostMessage(pp::Var("DoneRegistering"));
-
- // Kick off the processing loop.
- message_loop_.PostWork(factory_.NewCallback(&VEDemoInstance::KickoffEffect));
-}
-
-void VEDemoInstance::GetFrameDone(int32_t result,
- pp::VideoFrame_Private video_frame) {
- if (result != PP_OK) {
- PostMessage(pp::Var("Failed to get frame."));
- return;
- }
-
- // Apply the effect to the received frame.
- if (effect_on_) {
- pp::ImageData image_data = video_frame.image_data();
- pp::Size size = image_data.size();
- std::vector<uint8_t> tmp_row(image_data.stride());
- uint8_t* image = static_cast<uint8_t*>(image_data.data());
- for (int i = 0; i < size.height() / 2; ++i) {
- uint8_t* top = image + i * image_data.stride();
- uint8_t* bottom = image + (size.height() - 1 - i) * image_data.stride();
- memcpy(&tmp_row[0], top, image_data.stride());
- memcpy(top, bottom, image_data.stride());
- memcpy(bottom, &tmp_row[0], image_data.stride());
- }
- }
-
- // Put frame back to destination stream
- video_destination_.PutFrame(video_frame);
-
- // Trigger for the next frame.
- message_loop_.PostWork(factory_.NewCallback(&VEDemoInstance::KickoffEffect));
-}
-
-void VEDemoInstance::KickoffEffect(int32_t /* result */) {
- // Get the frame from the source stream.
- video_source_.GetFrame(
- factory_.NewCallbackWithOutput<pp::VideoFrame_Private>(
- &VEDemoInstance::GetFrameDone));
-}
-
-pp::Instance* VEDemoModule::CreateInstance(PP_Instance instance) {
- return new VEDemoInstance(instance, this);
-}
-
-} // anonymous namespace
-
-namespace pp {
-// Factory function for your specialization of the Module object.
-Module* CreateModule() {
- return new VEDemoModule();
-}
-} // namespace pp
diff --git a/chromium/ppapi/examples/video_effects/video_effects.html b/chromium/ppapi/examples/video_effects/video_effects.html
deleted file mode 100644
index a1128c0a692..00000000000
--- a/chromium/ppapi/examples/video_effects/video_effects.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-<html>
- <!--
- Copyright (c) 2013 The Chromium Authors. All rights reserved.
- Use of this source code is governed by a BSD-style license that can be
- found in the LICENSE file.
- -->
-<head>
-<title>Video Effects Demo</title>
-<style>
-video {
- border:5px solid black;
- width:480px;
- height:360px;
-}
-button {
- font: 18px sans-serif;
- padding: 8px;
-}
-textarea {
- font-family: monospace;
- margin: 2px;
- width:480px;
- height:640px;
-}
-</style>
-</head>
-<body>
-<table>
-<tr>
-<td><video id="vidlocal" autoplay></video></td>
-<td><video id="vidprocessedlocal" autoplay></video></td>
-<td><video id="vidremote" autoplay></video></td>
-</tr>
-<tr>
-<td>Local Media Stream</td>
-<td>Local Media Stream After Effect</td>
-<td>Remote Media Stream</td>
-</tr>
-<tr>
-</table>
-<br>
-<button id="startButton" onclick="start()">Start</button>
-<button id="toggleEffectButton" onclick="toggleEffect()">Enable Effect</button>
-<button id="callButton" onclick="call()">Call</button>
-<button id="hangupButton" onclick="hangup()">Hang Up</button>
-<br>
-<embed id="plugin" type="application/x-ppapi-example-video-effects"
- width="320" height="240"/>
-
-<script>
-var getUserMedia = navigator.webkitGetUserMedia.bind(navigator);
-var attachMediaStream = function(element, stream) {
- element.srcObject = stream;
-};
-var startButton = document.getElementById('startButton');
-var toggleEffectButton = document.getElementById('toggleEffectButton');
-var callButton = document.getElementById('callButton');
-var hangupButton = document.getElementById('hangupButton');
-
-callButton.disabled = true;
-hangupButton.disabled = true;
-toggleEffectButton.disabled = true;
-var pc1 = null;
-var pc2 = null;
-var localstream = null;
-var processedLocalstream = null;
-var effectsPlugin = null;
-var effectsEnabled = false;
-
-function trace(text) {
- // This function is used for logging.
- if (text[text.length - 1] == '\n') {
- text = text.substring(0, text.length - 1);
- }
- console.log((performance.now() / 1000).toFixed(3) + ": " + text);
-}
-
-function gotStream(stream){
- trace("Received local stream");
- // Call the polyfill wrapper to attach the media stream to this element.
- attachMediaStream(vidlocal, stream);
- localstream = stream;
- callButton.disabled = false;
- initEffect();
-}
-
-function start() {
- trace("Requesting local stream");
- startButton.disabled = true;
- // Call into getUserMedia via the polyfill (adapter.js).
- getUserMedia({audio:false, video:true},
- gotStream, function() {});
-}
-
-function onRegisterStreamDone() {
- vidprocessedlocal.srcObject = processedLocalstream;
- toggleEffectButton.disabled = false;
-}
-
-function HandleMessage(message_event) {
- if (message_event.data) {
- if (message_event.data == 'DoneRegistering') {
- onRegisterStreamDone();
- } else {
- trace(message_event.data);
- }
- }
-}
-
-function initEffect() {
- var url = URL.createObjectURL(localstream);
- processedLocalstream = new MediaStream([]);
- var processedStreamUrl = URL.createObjectURL(processedLocalstream);
- effectsPlugin.postMessage(
- 'registerStream' + ' ' + url + ' ' + processedStreamUrl);
-}
-
-function toggleEffect() {
- effectsEnabled = !effectsEnabled;
- if (effectsEnabled) {
- toggleEffectButton.innerHTML = 'Disable Effect';
- effectsPlugin.postMessage('effectOn');
- } else {
- toggleEffectButton.innerHTML = 'Enable Effect';
- effectsPlugin.postMessage('effectOff');
- }
-}
-
-function call() {
- callButton.disabled = true;
- hangupButton.disabled = false;
- trace("Starting call");
- var servers = null;
- pc1 = new RTCPeerConnection(servers);
- trace("Created local peer connection object pc1");
- pc1.onicecandidate = iceCallback1;
- pc2 = new RTCPeerConnection(servers);
- trace("Created remote peer connection object pc2");
- pc2.onicecandidate = iceCallback2;
- pc2.onaddstream = gotRemoteStream;
-
- pc1.addStream(processedLocalstream);
- trace("Adding Local Stream to peer connection");
-
- pc1.createOffer(gotDescription1);
-}
-
-function gotDescription1(desc){
- pc1.setLocalDescription(desc);
- trace("Offer from pc1 \n" + desc.sdp);
- pc2.setRemoteDescription(desc);
- // Since the "remote" side has no media stream we need
- // to pass in the right constraints in order for it to
- // accept the incoming offer of audio and video.
- var sdpConstraints = {'mandatory': {
- 'OfferToReceiveAudio':true,
- 'OfferToReceiveVideo':true }};
- pc2.createAnswer(gotDescription2, null, sdpConstraints);
-}
-
-function gotDescription2(desc){
- pc2.setLocalDescription(desc);
- trace("Answer from pc2 \n" + desc.sdp);
- pc1.setRemoteDescription(desc);
-}
-
-function hangup() {
- trace("Ending call");
- pc1.close();
- pc2.close();
- pc1 = null;
- pc2 = null;
- hangupButton.disabled = true;
- callButton.disabled = false;
-}
-
-function gotRemoteStream(e){
- vidremote.srcObject = e.stream;
- trace("Received remote stream");
-}
-
-function iceCallback1(event){
- if (event.candidate) {
- pc2.addIceCandidate(new RTCIceCandidate(event.candidate));
- trace("Local ICE candidate: \n" + event.candidate.candidate);
- }
-}
-
-function iceCallback2(event){
- if (event.candidate) {
- pc1.addIceCandidate(new RTCIceCandidate(event.candidate));
- trace("Remote ICE candidate: \n " + event.candidate.candidate);
- }
-}
-
-function InitializePlugin() {
- effectsPlugin = document.getElementById('plugin');
- effectsPlugin.addEventListener('message', HandleMessage, false);
-}
-
-document.addEventListener('DOMContentLoaded', InitializePlugin, false);
-</script>
-</body>
-</html>
diff --git a/chromium/ppapi/host/resource_message_filter.h b/chromium/ppapi/host/resource_message_filter.h
index 932d29e8bf7..0b50cb04942 100644
--- a/chromium/ppapi/host/resource_message_filter.h
+++ b/chromium/ppapi/host/resource_message_filter.h
@@ -51,8 +51,10 @@ struct PPAPI_HOST_EXPORT ResourceMessageFilterDeleteTraits {
// protected:
// scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(
// const IPC::Message& message) override {
-// if (message.type() == MyMessage::ID)
-// return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI);
+// if (message.type() == MyMessage::ID) {
+// return base::CreateSingleThreadTaskRunnerWithTraits(
+// {BrowserThread::UI});
+// }
// return NULL;
// }
//
diff --git a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index 2390423458c..41cb6237ac0 100644
--- a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -71,8 +71,6 @@
#include "ppapi/c/private/ppb_testing_private.h"
#include "ppapi/c/private/ppb_udp_socket_private.h"
#include "ppapi/c/private/ppb_uma_private.h"
-#include "ppapi/c/private/ppb_video_destination_private.h"
-#include "ppapi/c/private/ppb_video_source_private.h"
#include "ppapi/c/private/ppb_x509_certificate_private.h"
#include "ppapi/c/private/ppp_instance_private.h"
@@ -195,8 +193,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_2;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_3;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_4;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UMA_Private_0_3;
-static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1;
-static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_X509Certificate_Private_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Instance_Private_0_1;
/* END Declarations for all Wrapper Infos. */
@@ -4434,64 +4430,6 @@ static int32_t Pnacl_M35_PPB_UMA_Private_IsCrashReportingEnabled(PP_Instance ins
/* End wrapper methods for PPB_UMA_Private_0_3 */
-/* Begin wrapper methods for PPB_VideoDestination_Private_0_1 */
-
-static PP_Resource Pnacl_M28_PPB_VideoDestination_Private_Create(PP_Instance instance) {
- const struct PPB_VideoDestination_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1.real_iface;
- return iface->Create(instance);
-}
-
-static PP_Bool Pnacl_M28_PPB_VideoDestination_Private_IsVideoDestination(PP_Resource resource) {
- const struct PPB_VideoDestination_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1.real_iface;
- return iface->IsVideoDestination(resource);
-}
-
-static int32_t Pnacl_M28_PPB_VideoDestination_Private_Open(PP_Resource destination, struct PP_Var* stream_url, struct PP_CompletionCallback* callback) {
- const struct PPB_VideoDestination_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1.real_iface;
- return iface->Open(destination, *stream_url, *callback);
-}
-
-static int32_t Pnacl_M28_PPB_VideoDestination_Private_PutFrame(PP_Resource destination, const struct PP_VideoFrame_Private* frame) {
- const struct PPB_VideoDestination_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1.real_iface;
- return iface->PutFrame(destination, frame);
-}
-
-static void Pnacl_M28_PPB_VideoDestination_Private_Close(PP_Resource destination) {
- const struct PPB_VideoDestination_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1.real_iface;
- iface->Close(destination);
-}
-
-/* End wrapper methods for PPB_VideoDestination_Private_0_1 */
-
-/* Begin wrapper methods for PPB_VideoSource_Private_0_1 */
-
-static PP_Resource Pnacl_M28_PPB_VideoSource_Private_Create(PP_Instance instance) {
- const struct PPB_VideoSource_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1.real_iface;
- return iface->Create(instance);
-}
-
-static PP_Bool Pnacl_M28_PPB_VideoSource_Private_IsVideoSource(PP_Resource resource) {
- const struct PPB_VideoSource_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1.real_iface;
- return iface->IsVideoSource(resource);
-}
-
-static int32_t Pnacl_M28_PPB_VideoSource_Private_Open(PP_Resource source, struct PP_Var* stream_url, struct PP_CompletionCallback* callback) {
- const struct PPB_VideoSource_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1.real_iface;
- return iface->Open(source, *stream_url, *callback);
-}
-
-static int32_t Pnacl_M28_PPB_VideoSource_Private_GetFrame(PP_Resource source, struct PP_VideoFrame_Private* frame, struct PP_CompletionCallback* callback) {
- const struct PPB_VideoSource_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1.real_iface;
- return iface->GetFrame(source, frame, *callback);
-}
-
-static void Pnacl_M28_PPB_VideoSource_Private_Close(PP_Resource source) {
- const struct PPB_VideoSource_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1.real_iface;
- iface->Close(source);
-}
-
-/* End wrapper methods for PPB_VideoSource_Private_0_1 */
-
/* Begin wrapper methods for PPB_X509Certificate_Private_0_1 */
static PP_Resource Pnacl_M19_PPB_X509Certificate_Private_Create(PP_Instance instance) {
@@ -5709,22 +5647,6 @@ static const struct PPB_UMA_Private_0_3 Pnacl_Wrappers_PPB_UMA_Private_0_3 = {
.IsCrashReportingEnabled = (int32_t (*)(PP_Instance instance, struct PP_CompletionCallback callback))&Pnacl_M35_PPB_UMA_Private_IsCrashReportingEnabled
};
-static const struct PPB_VideoDestination_Private_0_1 Pnacl_Wrappers_PPB_VideoDestination_Private_0_1 = {
- .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M28_PPB_VideoDestination_Private_Create,
- .IsVideoDestination = (PP_Bool (*)(PP_Resource resource))&Pnacl_M28_PPB_VideoDestination_Private_IsVideoDestination,
- .Open = (int32_t (*)(PP_Resource destination, struct PP_Var stream_url, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoDestination_Private_Open,
- .PutFrame = (int32_t (*)(PP_Resource destination, const struct PP_VideoFrame_Private* frame))&Pnacl_M28_PPB_VideoDestination_Private_PutFrame,
- .Close = (void (*)(PP_Resource destination))&Pnacl_M28_PPB_VideoDestination_Private_Close
-};
-
-static const struct PPB_VideoSource_Private_0_1 Pnacl_Wrappers_PPB_VideoSource_Private_0_1 = {
- .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M28_PPB_VideoSource_Private_Create,
- .IsVideoSource = (PP_Bool (*)(PP_Resource resource))&Pnacl_M28_PPB_VideoSource_Private_IsVideoSource,
- .Open = (int32_t (*)(PP_Resource source, struct PP_Var stream_url, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoSource_Private_Open,
- .GetFrame = (int32_t (*)(PP_Resource source, struct PP_VideoFrame_Private* frame, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoSource_Private_GetFrame,
- .Close = (void (*)(PP_Resource source))&Pnacl_M28_PPB_VideoSource_Private_Close
-};
-
static const struct PPB_X509Certificate_Private_0_1 Pnacl_Wrappers_PPB_X509Certificate_Private_0_1 = {
.Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M19_PPB_X509Certificate_Private_Create,
.IsX509CertificatePrivate = (PP_Bool (*)(PP_Resource resource))&Pnacl_M19_PPB_X509Certificate_Private_IsX509CertificatePrivate,
@@ -6376,18 +6298,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UMA_Private_0_3 = {
.real_iface = NULL
};
-static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1 = {
- .iface_macro = PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1,
- .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_VideoDestination_Private_0_1,
- .real_iface = NULL
-};
-
-static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1 = {
- .iface_macro = PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1,
- .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_VideoSource_Private_0_1,
- .real_iface = NULL
-};
-
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_X509Certificate_Private_0_1 = {
.iface_macro = PPB_X509CERTIFICATE_PRIVATE_INTERFACE_0_1,
.wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_X509Certificate_Private_0_1,
@@ -6505,8 +6415,6 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_3,
&Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_4,
&Pnacl_WrapperInfo_PPB_UMA_Private_0_3,
- &Pnacl_WrapperInfo_PPB_VideoDestination_Private_0_1,
- &Pnacl_WrapperInfo_PPB_VideoSource_Private_0_1,
&Pnacl_WrapperInfo_PPB_X509Certificate_Private_0_1,
NULL
};
diff --git a/chromium/ppapi/proxy/BUILD.gn b/chromium/ppapi/proxy/BUILD.gn
index 2b8db741697..075e81eefbe 100644
--- a/chromium/ppapi/proxy/BUILD.gn
+++ b/chromium/ppapi/proxy/BUILD.gn
@@ -183,14 +183,10 @@ component("proxy") {
"var_serialization_rules.h",
"video_decoder_resource.cc",
"video_decoder_resource.h",
- "video_destination_resource.cc",
- "video_destination_resource.h",
"video_encoder_resource.cc",
"video_encoder_resource.h",
"video_frame_resource.cc",
"video_frame_resource.h",
- "video_source_resource.cc",
- "video_source_resource.h",
"vpn_provider_resource.cc",
"vpn_provider_resource.h",
"websocket_resource.cc",
diff --git a/chromium/ppapi/proxy/interface_list.cc b/chromium/ppapi/proxy/interface_list.cc
index 3acb3d7d9c0..8e4c9d33845 100644
--- a/chromium/ppapi/proxy/interface_list.cc
+++ b/chromium/ppapi/proxy/interface_list.cc
@@ -98,8 +98,6 @@
#include "ppapi/c/private/ppb_testing_private.h"
#include "ppapi/c/private/ppb_udp_socket_private.h"
#include "ppapi/c/private/ppb_uma_private.h"
-#include "ppapi/c/private/ppb_video_destination_private.h"
-#include "ppapi/c/private/ppb_video_source_private.h"
#include "ppapi/c/private/ppb_x509_certificate_private.h"
#include "ppapi/c/trusted/ppb_broker_trusted.h"
#include "ppapi/c/trusted/ppb_browser_font_trusted.h"
diff --git a/chromium/ppapi/proxy/ppapi_messages.h b/chromium/ppapi/proxy/ppapi_messages.h
index 0c492d4f92c..6e7890d0392 100644
--- a/chromium/ppapi/proxy/ppapi_messages.h
+++ b/chromium/ppapi/proxy/ppapi_messages.h
@@ -1923,30 +1923,6 @@ IPC_SYNC_MESSAGE_CONTROL2_2(PpapiHostMsg_SharedMemory_CreateSharedMemory,
int /* host_handle_id */,
ppapi::proxy::SerializedHandle /* plugin_handle */)
-// MediaStream -----------------------------------------------------------------
-
-// VideoDestination Private.
-IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Create)
-IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoDestination_Open,
- std::string /* stream_url */)
-IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoDestination_OpenReply)
-IPC_MESSAGE_CONTROL2(PpapiHostMsg_VideoDestination_PutFrame,
- ppapi::HostResource /* image_data */,
- PP_TimeTicks /* timestamp */)
-IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoDestination_Close)
-
-// VideoSource Private.
-IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Create)
-IPC_MESSAGE_CONTROL1(PpapiHostMsg_VideoSource_Open,
- std::string /* stream_url */)
-IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VideoSource_OpenReply)
-IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_GetFrame)
-IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoSource_GetFrameReply,
- ppapi::HostResource /* resource_id */,
- PP_ImageDataDesc /* image_data_desc */,
- PP_TimeTicks /* timestamp */)
-IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close)
-
// VpnProvider ----------------------------------------------------------------
IPC_MESSAGE_CONTROL0(PpapiHostMsg_VpnProvider_Create)
diff --git a/chromium/ppapi/proxy/resource_creation_proxy.cc b/chromium/ppapi/proxy/resource_creation_proxy.cc
index 5fad2078b1c..65a92edef3d 100644
--- a/chromium/ppapi/proxy/resource_creation_proxy.cc
+++ b/chromium/ppapi/proxy/resource_creation_proxy.cc
@@ -50,9 +50,7 @@
#include "ppapi/proxy/url_response_info_resource.h"
#include "ppapi/proxy/video_capture_resource.h"
#include "ppapi/proxy/video_decoder_resource.h"
-#include "ppapi/proxy/video_destination_resource.h"
#include "ppapi/proxy/video_encoder_resource.h"
-#include "ppapi/proxy/video_source_resource.h"
#include "ppapi/proxy/vpn_provider_resource.h"
#include "ppapi/proxy/websocket_resource.h"
#include "ppapi/shared_impl/api_id.h"
@@ -388,21 +386,10 @@ PP_Resource ResourceCreationProxy::CreateVideoDecoder(PP_Instance instance) {
return (new VideoDecoderResource(GetConnection(), instance))->GetReference();
}
-PP_Resource ResourceCreationProxy::CreateVideoDestination(
- PP_Instance instance) {
- return (new VideoDestinationResource(GetConnection(),
- instance))->GetReference();
-}
-
PP_Resource ResourceCreationProxy::CreateVideoEncoder(PP_Instance instance) {
return (new VideoEncoderResource(GetConnection(), instance))->GetReference();
}
-PP_Resource ResourceCreationProxy::CreateVideoSource(
- PP_Instance instance) {
- return (new VideoSourceResource(GetConnection(), instance))->GetReference();
-}
-
PP_Resource ResourceCreationProxy::CreateVpnProvider(PP_Instance instance) {
return (new VpnProviderResource(GetConnection(), instance))->GetReference();
}
diff --git a/chromium/ppapi/proxy/resource_creation_proxy.h b/chromium/ppapi/proxy/resource_creation_proxy.h
index 777b516437b..36dd4e01597 100644
--- a/chromium/ppapi/proxy/resource_creation_proxy.h
+++ b/chromium/ppapi/proxy/resource_creation_proxy.h
@@ -154,9 +154,7 @@ class ResourceCreationProxy : public InterfaceProxy,
PP_Resource CreateUDPSocket(PP_Instance instance) override;
PP_Resource CreateUDPSocketPrivate(PP_Instance instance) override;
PP_Resource CreateVideoDecoder(PP_Instance instance) override;
- PP_Resource CreateVideoDestination(PP_Instance instance) override;
PP_Resource CreateVideoEncoder(PP_Instance instance) override;
- PP_Resource CreateVideoSource(PP_Instance instance) override;
PP_Resource CreateVpnProvider(PP_Instance instance) override;
PP_Resource CreateWebSocket(PP_Instance instance) override;
PP_Resource CreateX509CertificatePrivate(PP_Instance instance) override;
diff --git a/chromium/ppapi/proxy/video_destination_resource.cc b/chromium/ppapi/proxy/video_destination_resource.cc
deleted file mode 100644
index 5175705160e..00000000000
--- a/chromium/ppapi/proxy/video_destination_resource.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/proxy/video_destination_resource.h"
-
-#include "base/bind.h"
-#include "ipc/ipc_message.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/pp_video_frame_private.h"
-#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/shared_impl/ppapi_globals.h"
-#include "ppapi/shared_impl/resource_tracker.h"
-#include "ppapi/shared_impl/var.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_image_data_api.h"
-
-using ppapi::thunk::EnterResourceNoLock;
-using ppapi::thunk::PPB_VideoDestination_Private_API;
-
-namespace ppapi {
-namespace proxy {
-
-VideoDestinationResource::VideoDestinationResource(
- Connection connection,
- PP_Instance instance)
- : PluginResource(connection, instance),
- is_open_(false) {
- SendCreate(RENDERER, PpapiHostMsg_VideoDestination_Create());
-}
-
-VideoDestinationResource::~VideoDestinationResource() {
-}
-
-PPB_VideoDestination_Private_API*
- VideoDestinationResource::AsPPB_VideoDestination_Private_API() {
- return this;
-}
-
-int32_t VideoDestinationResource::Open(
- const PP_Var& stream_url,
- scoped_refptr<TrackedCallback> callback) {
- if (TrackedCallback::IsPending(open_callback_))
- return PP_ERROR_INPROGRESS;
-
- open_callback_ = callback;
-
- scoped_refptr<StringVar> stream_url_var = StringVar::FromPPVar(stream_url);
- const uint32_t kMaxStreamIdSizeInBytes = 16384;
- if (!stream_url_var.get() ||
- stream_url_var->value().size() > kMaxStreamIdSizeInBytes)
- return PP_ERROR_BADARGUMENT;
- Call<PpapiPluginMsg_VideoDestination_OpenReply>(RENDERER,
- PpapiHostMsg_VideoDestination_Open(stream_url_var->value()),
- base::Bind(&VideoDestinationResource::OnPluginMsgOpenComplete, this));
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t VideoDestinationResource::PutFrame(
- const PP_VideoFrame_Private& frame) {
- if (!is_open_)
- return PP_ERROR_FAILED;
-
- thunk::EnterResourceNoLock<thunk::PPB_ImageData_API> enter_image(
- frame.image_data, true);
- if (enter_image.failed())
- return PP_ERROR_BADRESOURCE;
-
- // Check that the PP_Instance matches.
- Resource* image_object =
- PpapiGlobals::Get()->GetResourceTracker()->GetResource(frame.image_data);
- if (!image_object || pp_instance() != image_object->pp_instance()) {
- Log(PP_LOGLEVEL_ERROR,
- "VideoDestinationPrivateResource.PutFrame: Bad image resource.");
- return PP_ERROR_BADRESOURCE;
- }
-
- Post(RENDERER,
- PpapiHostMsg_VideoDestination_PutFrame(image_object->host_resource(),
- frame.timestamp));
- return PP_OK;
-}
-
-void VideoDestinationResource::Close() {
- Post(RENDERER, PpapiHostMsg_VideoDestination_Close());
-
- if (TrackedCallback::IsPending(open_callback_))
- open_callback_->PostAbort();
-}
-
-void VideoDestinationResource::OnPluginMsgOpenComplete(
- const ResourceMessageReplyParams& params) {
- if (TrackedCallback::IsPending(open_callback_)) {
- int32_t result = params.result();
- if (result == PP_OK)
- is_open_ = true;
- open_callback_->Run(result);
- }
-}
-
-} // namespace proxy
-} // namespace ppapi
diff --git a/chromium/ppapi/proxy/video_destination_resource.h b/chromium/ppapi/proxy/video_destination_resource.h
deleted file mode 100644
index a74450ef712..00000000000
--- a/chromium/ppapi/proxy/video_destination_resource.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
-#define PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "base/macros.h"
-#include "ppapi/c/pp_var.h"
-#include "ppapi/proxy/connection.h"
-#include "ppapi/proxy/plugin_resource.h"
-#include "ppapi/proxy/ppapi_proxy_export.h"
-#include "ppapi/thunk/ppb_video_destination_private_api.h"
-
-struct PP_VideoFrame_Private;
-
-namespace ppapi {
-
-class TrackedCallback;
-
-namespace proxy {
-
-class PPAPI_PROXY_EXPORT VideoDestinationResource
- : public PluginResource,
- public thunk::PPB_VideoDestination_Private_API {
- public:
- VideoDestinationResource(Connection connection,
- PP_Instance instance);
- ~VideoDestinationResource() override;
-
- // Resource overrides.
- thunk::PPB_VideoDestination_Private_API* AsPPB_VideoDestination_Private_API()
- override;
-
- // PPB_VideoDestination_Private_API implementation.
- int32_t Open(
- const PP_Var& stream_url,
- scoped_refptr<TrackedCallback> callback) override;
- int32_t PutFrame(const PP_VideoFrame_Private& frame) override;
- void Close() override;
-
- private:
- void OnPluginMsgOpenComplete(
- const ResourceMessageReplyParams& params);
-
- scoped_refptr<TrackedCallback> open_callback_;
- bool is_open_;
-
- DISALLOW_COPY_AND_ASSIGN(VideoDestinationResource);
-};
-
-} // namespace proxy
-} // namespace ppapi
-
-#endif // PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
diff --git a/chromium/ppapi/proxy/video_source_resource.cc b/chromium/ppapi/proxy/video_source_resource.cc
deleted file mode 100644
index c2949031883..00000000000
--- a/chromium/ppapi/proxy/video_source_resource.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/proxy/video_source_resource.h"
-
-#include "base/bind.h"
-#include "ipc/ipc_message.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/pp_video_frame_private.h"
-#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/proxy/ppb_image_data_proxy.h"
-#include "ppapi/shared_impl/ppapi_globals.h"
-#include "ppapi/shared_impl/resource_tracker.h"
-#include "ppapi/shared_impl/var.h"
-#include "ppapi/thunk/enter.h"
-
-using ppapi::thunk::EnterResourceNoLock;
-using ppapi::thunk::PPB_VideoSource_Private_API;
-
-namespace ppapi {
-namespace proxy {
-
-VideoSourceResource::VideoSourceResource(
- Connection connection,
- PP_Instance instance)
- : PluginResource(connection, instance),
- is_open_(false) {
- SendCreate(RENDERER, PpapiHostMsg_VideoSource_Create());
-}
-
-VideoSourceResource::~VideoSourceResource() {
-}
-
-PPB_VideoSource_Private_API*
- VideoSourceResource::AsPPB_VideoSource_Private_API() {
- return this;
-}
-
-int32_t VideoSourceResource::Open(
- const PP_Var& stream_url,
- scoped_refptr<TrackedCallback> callback) {
- if (TrackedCallback::IsPending(open_callback_))
- return PP_ERROR_INPROGRESS;
-
- open_callback_ = callback;
-
- scoped_refptr<StringVar> stream_url_var = StringVar::FromPPVar(stream_url);
- const uint32_t kMaxStreamIdSizeInBytes = 16384;
- if (!stream_url_var.get() ||
- stream_url_var->value().size() > kMaxStreamIdSizeInBytes)
- return PP_ERROR_BADARGUMENT;
- Call<PpapiPluginMsg_VideoSource_OpenReply>(RENDERER,
- PpapiHostMsg_VideoSource_Open(stream_url_var->value()),
- base::Bind(&VideoSourceResource::OnPluginMsgOpenComplete, this));
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t VideoSourceResource::GetFrame(
- PP_VideoFrame_Private* frame,
- scoped_refptr<TrackedCallback> callback) {
- if (!is_open_)
- return PP_ERROR_FAILED;
-
- if (TrackedCallback::IsPending(get_frame_callback_))
- return PP_ERROR_INPROGRESS;
-
- get_frame_callback_ = callback;
- Call<PpapiPluginMsg_VideoSource_GetFrameReply>(RENDERER,
- PpapiHostMsg_VideoSource_GetFrame(),
- base::Bind(&VideoSourceResource::OnPluginMsgGetFrameComplete, this,
- frame));
- return PP_OK_COMPLETIONPENDING;
-}
-
-void VideoSourceResource::Close() {
- Post(RENDERER, PpapiHostMsg_VideoSource_Close());
-
- if (TrackedCallback::IsPending(open_callback_))
- open_callback_->PostAbort();
- if (TrackedCallback::IsPending(get_frame_callback_))
- get_frame_callback_->PostAbort();
-}
-
-void VideoSourceResource::OnPluginMsgOpenComplete(
- const ResourceMessageReplyParams& reply_params) {
- if (TrackedCallback::IsPending(open_callback_)) {
- int32_t result = reply_params.result();
- if (result == PP_OK)
- is_open_ = true;
- open_callback_->Run(result);
- }
-}
-
-void VideoSourceResource::OnPluginMsgGetFrameComplete(
- PP_VideoFrame_Private* frame,
- const ResourceMessageReplyParams& reply_params,
- const HostResource& image_data,
- const PP_ImageDataDesc& image_desc,
- PP_TimeTicks timestamp) {
- // The callback may have been aborted by Close().
- if (TrackedCallback::IsPending(get_frame_callback_)) {
- int32_t result = reply_params.result();
- if (result == PP_OK &&
- PPB_ImageData_Shared::IsImageDataDescValid(image_desc)) {
- frame->timestamp = timestamp;
-
- base::SharedMemoryHandle handle;
- if (!reply_params.TakeSharedMemoryHandleAtIndex(0, &handle))
- frame->image_data = 0;
- frame->image_data =
- (new SimpleImageData(
- image_data, image_desc, handle))->GetReference();
- }
- get_frame_callback_->Run(result);
- }
-}
-
-} // namespace proxy
-} // namespace ppapi
diff --git a/chromium/ppapi/proxy/video_source_resource.h b/chromium/ppapi/proxy/video_source_resource.h
deleted file mode 100644
index bbc85b469bb..00000000000
--- a/chromium/ppapi/proxy/video_source_resource.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_PROXY_VIDEO_SOURCE_RESOURCE_H_
-#define PPAPI_PROXY_VIDEO_SOURCE_RESOURCE_H_
-
-#include <stdint.h>
-
-#include <string>
-
-#include "base/macros.h"
-#include "ppapi/c/pp_time.h"
-#include "ppapi/c/pp_var.h"
-#include "ppapi/proxy/connection.h"
-#include "ppapi/proxy/plugin_resource.h"
-#include "ppapi/proxy/ppapi_proxy_export.h"
-#include "ppapi/thunk/ppb_video_source_private_api.h"
-
-struct PP_ImageDataDesc;
-struct PP_VideoFrame_Private;
-
-namespace ppapi {
-
-class TrackedCallback;
-
-namespace proxy {
-
-class PPAPI_PROXY_EXPORT VideoSourceResource
- : public PluginResource,
- public thunk::PPB_VideoSource_Private_API {
- public:
- VideoSourceResource(Connection connection,
- PP_Instance instance);
- ~VideoSourceResource() override;
-
- // Resource overrides.
- thunk::PPB_VideoSource_Private_API* AsPPB_VideoSource_Private_API() override;
-
- // PPB_VideoSource_Private_API implementation.
- int32_t Open(
- const PP_Var& stream_url,
- scoped_refptr<TrackedCallback> callback) override;
- int32_t GetFrame(
- PP_VideoFrame_Private* frame,
- scoped_refptr<TrackedCallback> callback) override;
- void Close() override;
-
- private:
- void OnPluginMsgOpenComplete(
- const ResourceMessageReplyParams& reply_params);
- void OnPluginMsgGetFrameComplete(
- PP_VideoFrame_Private* frame,
- const ResourceMessageReplyParams& reply_params,
- const HostResource& image_data,
- const PP_ImageDataDesc& image_desc_data,
- PP_TimeTicks timestamp);
-
- scoped_refptr<TrackedCallback> open_callback_;
- scoped_refptr<TrackedCallback> get_frame_callback_;
- bool is_open_;
-
- DISALLOW_COPY_AND_ASSIGN(VideoSourceResource);
-};
-
-} // namespace proxy
-} // namespace ppapi
-
-#endif // PPAPI_PROXY_VIDEO_SOURCE_RESOURCE_H_
diff --git a/chromium/ppapi/shared_impl/ppapi_constants.h b/chromium/ppapi/shared_impl/ppapi_constants.h
index 6fdb00e45dc..8e24f951d73 100644
--- a/chromium/ppapi/shared_impl/ppapi_constants.h
+++ b/chromium/ppapi/shared_impl/ppapi_constants.h
@@ -11,10 +11,13 @@
namespace ppapi {
#if defined(OS_WIN)
+const char kCorbTestPluginName[] = "corb_test_plugin.dll";
const char kPowerSaverTestPluginName[] = "power_saver_test_plugin.dll";
#elif defined(OS_MACOSX)
+const char kCorbTestPluginName[] = "corb_test_plugin.plugin";
const char kPowerSaverTestPluginName[] = "power_saver_test_plugin.plugin";
#elif defined(OS_POSIX)
+const char kCorbTestPluginName[] = "libcorb_test_plugin.so";
const char kPowerSaverTestPluginName[] = "libpower_saver_test_plugin.so";
#endif
diff --git a/chromium/ppapi/shared_impl/ppb_tcp_socket_shared.cc b/chromium/ppapi/shared_impl/ppb_tcp_socket_shared.cc
index 94fb45ea381..d4588cd5165 100644
--- a/chromium/ppapi/shared_impl/ppb_tcp_socket_shared.cc
+++ b/chromium/ppapi/shared_impl/ppb_tcp_socket_shared.cc
@@ -36,8 +36,7 @@ void TCPSocketState::CompletePendingTransition(bool success) {
state_ = success ? SSL_CONNECTED : CLOSED;
break;
case LISTEN:
- if (success)
- state_ = LISTENING;
+ state_ = success ? LISTENING : CLOSED;
break;
case CLOSE:
state_ = CLOSED;
diff --git a/chromium/ppapi/shared_impl/resource.h b/chromium/ppapi/shared_impl/resource.h
index 2a264805fce..3044118fde7 100644
--- a/chromium/ppapi/shared_impl/resource.h
+++ b/chromium/ppapi/shared_impl/resource.h
@@ -82,11 +82,9 @@
F(PPB_VideoCapture_API) \
F(PPB_VideoDecoder_API) \
F(PPB_VideoDecoder_Dev_API) \
- F(PPB_VideoDestination_Private_API) \
F(PPB_VideoEncoder_API) \
F(PPB_VideoFrame_API) \
F(PPB_VideoLayer_API) \
- F(PPB_VideoSource_Private_API) \
F(PPB_View_API) \
F(PPB_VpnProvider_API) \
F(PPB_WebSocket_API) \
diff --git a/chromium/ppapi/thunk/BUILD.gn b/chromium/ppapi/thunk/BUILD.gn
index 73a74472669..e1299f62bf4 100644
--- a/chromium/ppapi/thunk/BUILD.gn
+++ b/chromium/ppapi/thunk/BUILD.gn
@@ -137,14 +137,10 @@ source_set("thunk") {
"ppb_video_decoder_api.h",
"ppb_video_decoder_dev_api.h",
"ppb_video_decoder_thunk.cc",
- "ppb_video_destination_private_api.h",
- "ppb_video_destination_private_thunk.cc",
"ppb_video_encoder_api.h",
"ppb_video_encoder_thunk.cc",
"ppb_video_frame_api.h",
"ppb_video_frame_thunk.cc",
- "ppb_video_source_private_api.h",
- "ppb_video_source_private_thunk.cc",
"ppb_view_api.h",
"ppb_view_dev_thunk.cc",
"ppb_view_thunk.cc",
diff --git a/chromium/ppapi/thunk/interfaces_ppb_private_no_permissions.h b/chromium/ppapi/thunk/interfaces_ppb_private_no_permissions.h
index 2b64de2a2c2..50292250083 100644
--- a/chromium/ppapi/thunk/interfaces_ppb_private_no_permissions.h
+++ b/chromium/ppapi/thunk/interfaces_ppb_private_no_permissions.h
@@ -48,11 +48,6 @@ PROXIED_IFACE(PPB_FILEIO_PRIVATE_INTERFACE_0_1,
PROXIED_IFACE(PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE_0_2,
PPB_IsolatedFileSystem_Private_0_2)
-PROXIED_IFACE(PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1,
- PPB_VideoDestination_Private_0_1)
-PROXIED_IFACE(PPB_VIDEOSOURCE_PRIVATE_INTERFACE_0_1,
- PPB_VideoSource_Private_0_1)
-
PROXIED_IFACE(PPB_UMA_PRIVATE_INTERFACE_0_3,
PPB_UMA_Private_0_3)
diff --git a/chromium/ppapi/thunk/ppb_video_destination_private_api.h b/chromium/ppapi/thunk/ppb_video_destination_private_api.h
deleted file mode 100644
index 08b8cb7e131..00000000000
--- a/chromium/ppapi/thunk/ppb_video_destination_private_api.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_THUNK_PPB_VIDEO_DESTINATION_PRIVATE_API_H_
-#define PPAPI_THUNK_PPB_VIDEO_DESTINATION_PRIVATE_API_H_
-
-#include <stdint.h>
-
-#include "base/memory/ref_counted.h"
-#include "ppapi/thunk/ppapi_thunk_export.h"
-
-struct PP_VideoFrame_Private;
-
-namespace ppapi {
-
-class TrackedCallback;
-
-namespace thunk {
-
-class PPAPI_THUNK_EXPORT PPB_VideoDestination_Private_API {
- public:
- virtual ~PPB_VideoDestination_Private_API() {}
-
- virtual int32_t Open(const PP_Var& stream_url,
- scoped_refptr<TrackedCallback> callback) = 0;
- virtual int32_t PutFrame(const PP_VideoFrame_Private& frame) = 0;
- virtual void Close() = 0;
-};
-
-} // namespace thunk
-} // namespace ppapi
-
-#endif // PPAPI_THUNK_PPB_VIDEO_DESTINATION_PRIVATE_API_H_
diff --git a/chromium/ppapi/thunk/ppb_video_destination_private_thunk.cc b/chromium/ppapi/thunk/ppb_video_destination_private_thunk.cc
deleted file mode 100644
index 78c38ad17e6..00000000000
--- a/chromium/ppapi/thunk/ppb_video_destination_private_thunk.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdint.h>
-
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/pp_video_frame_private.h"
-#include "ppapi/c/private/ppb_video_destination_private.h"
-#include "ppapi/shared_impl/tracked_callback.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_instance_api.h"
-#include "ppapi/thunk/ppb_video_destination_private_api.h"
-#include "ppapi/thunk/resource_creation_api.h"
-#include "ppapi/thunk/thunk.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-PP_Resource Create(PP_Instance instance) {
- EnterResourceCreation enter(instance);
- if (enter.failed())
- return 0;
- return enter.functions()->CreateVideoDestination(instance);
-}
-
-PP_Bool IsVideoDestination(PP_Resource resource) {
- EnterResource<PPB_VideoDestination_Private_API> enter(resource, false);
- return PP_FromBool(enter.succeeded());
-}
-
-int32_t Open(PP_Resource destination,
- PP_Var stream_url,
- PP_CompletionCallback callback) {
- EnterResource<PPB_VideoDestination_Private_API> enter(destination,
- callback, true);
- if (enter.failed())
- return enter.retval();
- return enter.SetResult(enter.object()->Open(stream_url, enter.callback()));
-}
-
-int32_t PutFrame(PP_Resource destination,
- const PP_VideoFrame_Private* frame) {
- EnterResource<PPB_VideoDestination_Private_API> enter(destination, true);
- if (enter.failed())
- return enter.retval();
- return enter.object()->PutFrame(*frame);
-}
-
-void Close(PP_Resource destination) {
- EnterResource<PPB_VideoDestination_Private_API> enter(destination, true);
- if (enter.succeeded())
- enter.object()->Close();
-}
-
-const PPB_VideoDestination_Private_0_1
- g_ppb_video_destination_private_thunk_0_1 = {
- &Create,
- &IsVideoDestination,
- &Open,
- &PutFrame,
- &Close
-};
-
-} // namespace
-
-const PPB_VideoDestination_Private_0_1*
- GetPPB_VideoDestination_Private_0_1_Thunk() {
- return &g_ppb_video_destination_private_thunk_0_1;
-}
-
-} // namespace thunk
-} // namespace ppapi
diff --git a/chromium/ppapi/thunk/ppb_video_source_private_api.h b/chromium/ppapi/thunk/ppb_video_source_private_api.h
deleted file mode 100644
index 37260308bf1..00000000000
--- a/chromium/ppapi/thunk/ppb_video_source_private_api.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef PPAPI_THUNK_PPB_VIDEO_SOURCE_PRIVATE_API_H_
-#define PPAPI_THUNK_PPB_VIDEO_SOURCE_PRIVATE_API_H_
-
-#include <stdint.h>
-
-#include "base/memory/ref_counted.h"
-#include "ppapi/thunk/ppapi_thunk_export.h"
-
-struct PP_VideoFrame_Private;
-
-namespace ppapi {
-
-class TrackedCallback;
-
-namespace thunk {
-
-class PPAPI_THUNK_EXPORT PPB_VideoSource_Private_API {
- public:
- virtual ~PPB_VideoSource_Private_API() {}
-
- virtual int32_t Open(const PP_Var& stream_url,
- scoped_refptr<TrackedCallback> callback) = 0;
- virtual int32_t GetFrame(PP_VideoFrame_Private* frame,
- scoped_refptr<TrackedCallback> callback) = 0;
- virtual void Close() = 0;
-};
-
-} // namespace thunk
-} // namespace ppapi
-
-#endif // PPAPI_THUNK_PPB_VIDEO_SOURCE_PRIVATE_API_H_
diff --git a/chromium/ppapi/thunk/ppb_video_source_private_thunk.cc b/chromium/ppapi/thunk/ppb_video_source_private_thunk.cc
deleted file mode 100644
index c507ab8c5f3..00000000000
--- a/chromium/ppapi/thunk/ppb_video_source_private_thunk.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdint.h>
-
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/private/pp_video_frame_private.h"
-#include "ppapi/c/private/ppb_video_source_private.h"
-#include "ppapi/shared_impl/tracked_callback.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_video_source_private_api.h"
-#include "ppapi/thunk/resource_creation_api.h"
-#include "ppapi/thunk/thunk.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-PP_Resource Create(PP_Instance instance) {
- EnterResourceCreation enter(instance);
- if (enter.failed())
- return 0;
- return enter.functions()->CreateVideoSource(instance);
-}
-
-PP_Bool IsVideoSource(PP_Resource resource) {
- EnterResource<PPB_VideoSource_Private_API> enter(resource, false);
- return PP_FromBool(enter.succeeded());
-}
-
-int32_t Open(PP_Resource source,
- PP_Var stream_url,
- PP_CompletionCallback callback) {
- EnterResource<PPB_VideoSource_Private_API> enter(source, callback, true);
- if (enter.failed())
- return enter.retval();
- return enter.SetResult(enter.object()->Open(stream_url, enter.callback()));
-}
-
-int32_t GetFrame(PP_Resource source,
- PP_VideoFrame_Private* frame,
- PP_CompletionCallback callback) {
- EnterResource<PPB_VideoSource_Private_API> enter(source, callback, true);
- if (enter.failed())
- return enter.retval();
- return enter.SetResult(enter.object()->GetFrame(frame, enter.callback()));
-}
-
-void Close(PP_Resource source) {
- EnterResource<PPB_VideoSource_Private_API> enter(source, true);
- if (enter.succeeded())
- enter.object()->Close();
-}
-
-const PPB_VideoSource_Private_0_1 g_ppb_video_source_private_thunk_0_1 = {
- &Create,
- &IsVideoSource,
- &Open,
- &GetFrame,
- &Close
-};
-
-} // namespace
-
-const PPB_VideoSource_Private_0_1* GetPPB_VideoSource_Private_0_1_Thunk() {
- return &g_ppb_video_source_private_thunk_0_1;
-}
-
-} // namespace thunk
-} // namespace ppapi
diff --git a/chromium/ppapi/thunk/resource_creation_api.h b/chromium/ppapi/thunk/resource_creation_api.h
index 637414acddd..3c2080d1d86 100644
--- a/chromium/ppapi/thunk/resource_creation_api.h
+++ b/chromium/ppapi/thunk/resource_creation_api.h
@@ -179,9 +179,7 @@ class ResourceCreationAPI {
virtual PP_Resource CreateUDPSocket(PP_Instance instace) = 0;
virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instace) = 0;
virtual PP_Resource CreateVideoDecoder(PP_Instance instance) = 0;
- virtual PP_Resource CreateVideoDestination(PP_Instance instance) = 0;
virtual PP_Resource CreateVideoEncoder(PP_Instance instance) = 0;
- virtual PP_Resource CreateVideoSource(PP_Instance instance) = 0;
virtual PP_Resource CreateVpnProvider(PP_Instance instance) = 0;
virtual PP_Resource CreateWebSocket(PP_Instance instance) = 0;
virtual PP_Resource CreateX509CertificatePrivate(PP_Instance instance) = 0;