summaryrefslogtreecommitdiff
path: root/chromium/ppapi
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-08 10:28:10 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-20 13:40:30 +0000
commite733310db58160074f574c429d48f8308c0afe17 (patch)
treef8aef4b7e62a69928dbcf880620eece20f98c6df /chromium/ppapi
parent2f583e4aec1ae3a86fa047829c96b310dc12ecdf (diff)
downloadqtwebengine-chromium-e733310db58160074f574c429d48f8308c0afe17.tar.gz
BASELINE: Update Chromium to 56.0.2924.122
Change-Id: I4e04de8f47e47e501c46ed934c76a431c6337ced Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/ppapi')
-rw-r--r--chromium/ppapi/BUILD.gn1
-rw-r--r--chromium/ppapi/api/private/pp_content_decryptor.idl18
-rw-r--r--chromium/ppapi/api/private/ppb_camera_device_private.idl4
-rw-r--r--chromium/ppapi/c/private/pp_content_decryptor.h20
-rw-r--r--chromium/ppapi/c/private/ppb_camera_device_private.h6
-rw-r--r--chromium/ppapi/cpp/private/camera_device_private.h2
-rw-r--r--chromium/ppapi/cpp/private/var_private.h2
-rw-r--r--chromium/ppapi/cpp/var.h2
-rw-r--r--chromium/ppapi/examples/video_effects/video_effects.html1
-rw-r--r--chromium/ppapi/features/BUILD.gn15
-rw-r--r--chromium/ppapi/features/features.gni12
-rw-r--r--chromium/ppapi/nacl_irt/irt_start.cc12
-rw-r--r--chromium/ppapi/nacl_irt/plugin_startup.cc11
-rw-r--r--chromium/ppapi/proxy/host_dispatcher.cc8
-rw-r--r--chromium/ppapi/proxy/plugin_dispatcher.cc4
-rw-r--r--chromium/ppapi/proxy/plugin_globals.cc5
-rw-r--r--chromium/ppapi/proxy/ppapi_messages.h12
-rw-r--r--chromium/ppapi/proxy/ppapi_proxy_test.cc19
-rw-r--r--chromium/ppapi/proxy/proxy_channel.cc7
-rw-r--r--chromium/ppapi/proxy/proxy_channel.h4
-rw-r--r--chromium/ppapi/proxy/proxy_completion_callback_factory.h24
-rw-r--r--chromium/ppapi/proxy/url_loader_resource.cc12
-rw-r--r--chromium/ppapi/thunk/interfaces_ppb_private.h8
23 files changed, 108 insertions, 101 deletions
diff --git a/chromium/ppapi/BUILD.gn b/chromium/ppapi/BUILD.gn
index 323dd021014..697dc0ce137 100644
--- a/chromium/ppapi/BUILD.gn
+++ b/chromium/ppapi/BUILD.gn
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import("//build/config/features.gni")
-import("//build/config/features.gni")
import("//build/config/nacl/config.gni")
import("//build/config/nacl/rules.gni")
import("//testing/test.gni")
diff --git a/chromium/ppapi/api/private/pp_content_decryptor.idl b/chromium/ppapi/api/private/pp_content_decryptor.idl
index da62b14c272..9ac7e2f6486 100644
--- a/chromium/ppapi/api/private/pp_content_decryptor.idl
+++ b/chromium/ppapi/api/private/pp_content_decryptor.idl
@@ -402,7 +402,8 @@ struct PP_VideoDecoderConfig {
[assert_size(4)]
enum PP_DecryptorStreamType {
PP_DECRYPTORSTREAMTYPE_AUDIO = 0,
- PP_DECRYPTORSTREAMTYPE_VIDEO = 1
+ PP_DECRYPTORSTREAMTYPE_VIDEO = 1,
+ PP_DECRYPTORSTREAMTYPE_MAX = PP_DECRYPTORSTREAMTYPE_VIDEO
};
/**
@@ -412,7 +413,8 @@ enum PP_DecryptorStreamType {
enum PP_SessionType {
PP_SESSIONTYPE_TEMPORARY = 0,
PP_SESSIONTYPE_PERSISTENT_LICENSE = 1,
- PP_SESSIONTYPE_PERSISTENT_RELEASE = 2
+ PP_SESSIONTYPE_PERSISTENT_RELEASE = 2,
+ PP_SESSIONTYPE_MAX = PP_SESSIONTYPE_PERSISTENT_RELEASE
};
/**
@@ -422,7 +424,8 @@ enum PP_SessionType {
enum PP_InitDataType {
PP_INITDATATYPE_CENC = 0,
PP_INITDATATYPE_KEYIDS = 1,
- PP_INITDATATYPE_WEBM = 2
+ PP_INITDATATYPE_WEBM = 2,
+ PP_INITDATATYPE_MAX = PP_INITDATATYPE_WEBM
};
/**
@@ -436,7 +439,8 @@ enum PP_CdmExceptionCode {
PP_CDMEXCEPTIONCODE_QUOTAEXCEEDEDERROR = 4,
PP_CDMEXCEPTIONCODE_UNKNOWNERROR = 5,
PP_CDMEXCEPTIONCODE_CLIENTERROR = 6,
- PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7
+ PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7,
+ PP_CDMEXCEPTIONCODE_MAX = PP_CDMEXCEPTIONCODE_OUTPUTERROR
};
/**
@@ -446,7 +450,8 @@ enum PP_CdmExceptionCode {
enum PP_CdmMessageType {
PP_CDMMESSAGETYPE_LICENSE_REQUEST = 0,
PP_CDMMESSAGETYPE_LICENSE_RENEWAL = 1,
- PP_CDMMESSAGETYPE_LICENSE_RELEASE = 2
+ PP_CDMMESSAGETYPE_LICENSE_RELEASE = 2,
+ PP_CDMMESSAGETYPE_MAX = PP_CDMMESSAGETYPE_LICENSE_RELEASE
};
/**
@@ -460,7 +465,8 @@ enum PP_CdmKeyStatus {
PP_CDMKEYSTATUS_OUTPUTRESTRICTED = 3,
PP_CDMKEYSTATUS_OUTPUTDOWNSCALED = 4,
PP_CDMKEYSTATUS_STATUSPENDING = 5,
- PP_CDMKEYSTATUS_RELEASED = 6
+ PP_CDMKEYSTATUS_RELEASED = 6,
+ PP_CDMKEYSTATUS_MAX = PP_CDMKEYSTATUS_RELEASED
};
/**
diff --git a/chromium/ppapi/api/private/ppb_camera_device_private.idl b/chromium/ppapi/api/private/ppb_camera_device_private.idl
index d87ac2059a8..9d304074161 100644
--- a/chromium/ppapi/api/private/ppb_camera_device_private.idl
+++ b/chromium/ppapi/api/private/ppb_camera_device_private.idl
@@ -51,8 +51,8 @@ interface PPB_CameraDevice_Private {
* @param[in] camera_device A <code>PP_Resource</code> corresponding to a
* camera device resource.
* @param[in] device_id A <code>PP_Var</code> identifying a camera device. The
- * type is string. The ID can be obtained from MediaStreamTrack.getSources()
- * or MediaStreamVideoTrack.id.
+ * type is string. The ID can be obtained from
+ * navigator.mediaDevices.enumerateDevices() or MediaStreamVideoTrack.id.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of <code>Open()</code>.
*
diff --git a/chromium/ppapi/c/private/pp_content_decryptor.h b/chromium/ppapi/c/private/pp_content_decryptor.h
index 5f02efb969a..126456048b0 100644
--- a/chromium/ppapi/c/private/pp_content_decryptor.h
+++ b/chromium/ppapi/c/private/pp_content_decryptor.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From private/pp_content_decryptor.idl modified Tue Oct 20 12:50:15 2015. */
+/* From private/pp_content_decryptor.idl modified Mon Nov 21 11:44:43 2016. */
#ifndef PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_
#define PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_
@@ -451,7 +451,8 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoDecoderConfig, 24);
*/
typedef enum {
PP_DECRYPTORSTREAMTYPE_AUDIO = 0,
- PP_DECRYPTORSTREAMTYPE_VIDEO = 1
+ PP_DECRYPTORSTREAMTYPE_VIDEO = 1,
+ PP_DECRYPTORSTREAMTYPE_MAX = PP_DECRYPTORSTREAMTYPE_VIDEO
} PP_DecryptorStreamType;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4);
@@ -461,7 +462,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptorStreamType, 4);
typedef enum {
PP_SESSIONTYPE_TEMPORARY = 0,
PP_SESSIONTYPE_PERSISTENT_LICENSE = 1,
- PP_SESSIONTYPE_PERSISTENT_RELEASE = 2
+ PP_SESSIONTYPE_PERSISTENT_RELEASE = 2,
+ PP_SESSIONTYPE_MAX = PP_SESSIONTYPE_PERSISTENT_RELEASE
} PP_SessionType;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_SessionType, 4);
@@ -471,7 +473,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_SessionType, 4);
typedef enum {
PP_INITDATATYPE_CENC = 0,
PP_INITDATATYPE_KEYIDS = 1,
- PP_INITDATATYPE_WEBM = 2
+ PP_INITDATATYPE_WEBM = 2,
+ PP_INITDATATYPE_MAX = PP_INITDATATYPE_WEBM
} PP_InitDataType;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_InitDataType, 4);
@@ -485,7 +488,8 @@ typedef enum {
PP_CDMEXCEPTIONCODE_QUOTAEXCEEDEDERROR = 4,
PP_CDMEXCEPTIONCODE_UNKNOWNERROR = 5,
PP_CDMEXCEPTIONCODE_CLIENTERROR = 6,
- PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7
+ PP_CDMEXCEPTIONCODE_OUTPUTERROR = 7,
+ PP_CDMEXCEPTIONCODE_MAX = PP_CDMEXCEPTIONCODE_OUTPUTERROR
} PP_CdmExceptionCode;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CdmExceptionCode, 4);
@@ -495,7 +499,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CdmExceptionCode, 4);
typedef enum {
PP_CDMMESSAGETYPE_LICENSE_REQUEST = 0,
PP_CDMMESSAGETYPE_LICENSE_RENEWAL = 1,
- PP_CDMMESSAGETYPE_LICENSE_RELEASE = 2
+ PP_CDMMESSAGETYPE_LICENSE_RELEASE = 2,
+ PP_CDMMESSAGETYPE_MAX = PP_CDMMESSAGETYPE_LICENSE_RELEASE
} PP_CdmMessageType;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CdmMessageType, 4);
@@ -509,7 +514,8 @@ typedef enum {
PP_CDMKEYSTATUS_OUTPUTRESTRICTED = 3,
PP_CDMKEYSTATUS_OUTPUTDOWNSCALED = 4,
PP_CDMKEYSTATUS_STATUSPENDING = 5,
- PP_CDMKEYSTATUS_RELEASED = 6
+ PP_CDMKEYSTATUS_RELEASED = 6,
+ PP_CDMKEYSTATUS_MAX = PP_CDMKEYSTATUS_RELEASED
} PP_CdmKeyStatus;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CdmKeyStatus, 4);
/**
diff --git a/chromium/ppapi/c/private/ppb_camera_device_private.h b/chromium/ppapi/c/private/ppb_camera_device_private.h
index 821ad299db9..93c0c531211 100644
--- a/chromium/ppapi/c/private/ppb_camera_device_private.h
+++ b/chromium/ppapi/c/private/ppb_camera_device_private.h
@@ -4,7 +4,7 @@
*/
/* From private/ppb_camera_device_private.idl,
- * modified Fri Feb 20 13:48:52 2015.
+ * modified Wed Nov 2 15:54:24 2016.
*/
#ifndef PPAPI_C_PRIVATE_PPB_CAMERA_DEVICE_PRIVATE_H_
@@ -68,8 +68,8 @@ struct PPB_CameraDevice_Private_0_1 {
* @param[in] camera_device A <code>PP_Resource</code> corresponding to a
* camera device resource.
* @param[in] device_id A <code>PP_Var</code> identifying a camera device. The
- * type is string. The ID can be obtained from MediaStreamTrack.getSources()
- * or MediaStreamVideoTrack.id.
+ * type is string. The ID can be obtained from
+ * navigator.mediaDevices.enumerateDevices() or MediaStreamVideoTrack.id.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of <code>Open()</code>.
*
diff --git a/chromium/ppapi/cpp/private/camera_device_private.h b/chromium/ppapi/cpp/private/camera_device_private.h
index d6c774eeb18..2e504a31117 100644
--- a/chromium/ppapi/cpp/private/camera_device_private.h
+++ b/chromium/ppapi/cpp/private/camera_device_private.h
@@ -66,7 +66,7 @@ class CameraDevice_Private : public Resource {
///
/// @param[in] device_id A <code>Var</code> identifying a camera
/// device. The type is string. The ID can be obtained from
- /// MediaStreamTrack.getSources() or MediaStreamVideoTrack.id.
+ /// navigator.mediaDevices.enumerateDevices() or MediaStreamVideoTrack.id.
/// @param[in] callback A <code>CompletionCallback</code> to be called upon
/// completion of <code>Open()</code>.
///
diff --git a/chromium/ppapi/cpp/private/var_private.h b/chromium/ppapi/cpp/private/var_private.h
index 63522ca00d3..b7d95b26365 100644
--- a/chromium/ppapi/cpp/private/var_private.h
+++ b/chromium/ppapi/cpp/private/var_private.h
@@ -116,7 +116,7 @@ class VarPrivate : public Var {
private:
// Prevent an arbitrary pointer argument from being implicitly converted to
- // a bool at Var construction. If somebody makes such a mistake, (s)he will
+ // a bool at Var construction. If somebody makes such a mistake, they will
// get a compilation error.
VarPrivate(void* non_scriptable_object_pointer);
};
diff --git a/chromium/ppapi/cpp/var.h b/chromium/ppapi/cpp/var.h
index 1b2435606a2..7b02b9d202b 100644
--- a/chromium/ppapi/cpp/var.h
+++ b/chromium/ppapi/cpp/var.h
@@ -315,7 +315,7 @@ class Var {
private:
// Prevent an arbitrary pointer argument from being implicitly converted to
- // a bool at Var construction. If somebody makes such a mistake, (s)he will
+ // a bool at Var construction. If somebody makes such a mistake, they will
// get a compilation error.
Var(void* non_scriptable_object_pointer);
};
diff --git a/chromium/ppapi/examples/video_effects/video_effects.html b/chromium/ppapi/examples/video_effects/video_effects.html
index fa37d59b81c..54697534ca2 100644
--- a/chromium/ppapi/examples/video_effects/video_effects.html
+++ b/chromium/ppapi/examples/video_effects/video_effects.html
@@ -49,7 +49,6 @@ textarea {
width="320" height="240"/>
<script>
-var RTCPeerConnection = webkitRTCPeerConnection;
var getUserMedia = navigator.webkitGetUserMedia.bind(navigator);
var attachMediaStream = function(element, stream) {
element.src = URL.createObjectURL(stream);
diff --git a/chromium/ppapi/features/BUILD.gn b/chromium/ppapi/features/BUILD.gn
new file mode 100644
index 00000000000..3917d1ee992
--- /dev/null
+++ b/chromium/ppapi/features/BUILD.gn
@@ -0,0 +1,15 @@
+# Copyright 2016 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("//build/buildflag_header.gni")
+import("//ppapi/features/features.gni")
+
+# This file is in a separate directory so all targets in the build can refer to
+# the buildflag header to get the necessary preprocessor defines without
+# bringing in all of Pepper.
+
+buildflag_header("features") {
+ header = "features.h"
+ flags = [ "ENABLE_PEPPER_CDMS=$enable_pepper_cdms" ]
+}
diff --git a/chromium/ppapi/features/features.gni b/chromium/ppapi/features/features.gni
new file mode 100644
index 00000000000..b28feac0fdf
--- /dev/null
+++ b/chromium/ppapi/features/features.gni
@@ -0,0 +1,12 @@
+# Copyright 2016 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("//build/config/features.gni")
+
+# Enables the use of CDMs in pepper plugins.
+#
+# This is available as a buildflag for C++ preprocessor, see
+# //ppapi:features.
+enable_pepper_cdms =
+ enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast
diff --git a/chromium/ppapi/nacl_irt/irt_start.cc b/chromium/ppapi/nacl_irt/irt_start.cc
index d25a6ab5eb1..cce1c1d33bf 100644
--- a/chromium/ppapi/nacl_irt/irt_start.cc
+++ b/chromium/ppapi/nacl_irt/irt_start.cc
@@ -18,9 +18,8 @@
#include "ppapi/nacl_irt/plugin_startup.h"
namespace {
-IPC::ChannelHandle MakeIPCHandle(const char* name, int fd) {
- return IPC::ChannelHandle(name,
- base::FileDescriptor(fd, false /* auto_close */));
+IPC::ChannelHandle MakeIPCHandle(int fd) {
+ return IPC::ChannelHandle(base::FileDescriptor(fd, false /* auto_close */));
}
} // namespace
@@ -32,10 +31,9 @@ void nacl_irt_start(uint32_t* info) {
// In SFI mode, the FDs of IPC channels are NACL_CHROME_DESC_BASE and its
// successor, which is set in nacl_listener.cc.
- ppapi::SetIPCChannelHandles(
- MakeIPCHandle("NaCl Browser", NACL_CHROME_DESC_BASE),
- MakeIPCHandle("NaCl Renderer", NACL_CHROME_DESC_BASE + 1),
- MakeIPCHandle("NaCl Manifest", NACL_CHROME_DESC_BASE + 2));
+ ppapi::SetIPCChannelHandles(MakeIPCHandle(NACL_CHROME_DESC_BASE),
+ MakeIPCHandle(NACL_CHROME_DESC_BASE + 1),
+ MakeIPCHandle(NACL_CHROME_DESC_BASE + 2));
// The Mojo EDK must be initialized before using IPC.
mojo::edk::Init();
ppapi::StartUpPlugin();
diff --git a/chromium/ppapi/nacl_irt/plugin_startup.cc b/chromium/ppapi/nacl_irt/plugin_startup.cc
index b90f14ae801..2e9392c73ce 100644
--- a/chromium/ppapi/nacl_irt/plugin_startup.cc
+++ b/chromium/ppapi/nacl_irt/plugin_startup.cc
@@ -27,8 +27,15 @@ base::Thread* g_io_thread = NULL;
ManifestService* g_manifest_service = NULL;
bool IsValidChannelHandle(IPC::ChannelHandle* handle) {
- // ChannelMojo not yet supported.
- return handle && handle->socket.fd != -1 && !handle->mojo_handle.is_valid();
+ // In SFI mode the underlying handle is wrapped by a NaClIPCAdapter, which is
+ // exposed as an FD. Otherwise, the handle is the underlying mojo message
+ // pipe.
+ return handle &&
+#if defined(OS_NACL_SFI)
+ handle->socket.fd != -1;
+#else
+ handle->is_mojo_channel_handle();
+#endif
}
// Creates the manifest service on IO thread so that its Listener's thread and
diff --git a/chromium/ppapi/proxy/host_dispatcher.cc b/chromium/ppapi/proxy/host_dispatcher.cc
index 5d61429fa4b..a5fdfcaf1c9 100644
--- a/chromium/ppapi/proxy/host_dispatcher.cc
+++ b/chromium/ppapi/proxy/host_dispatcher.cc
@@ -156,11 +156,11 @@ bool HostDispatcher::Send(IPC::Message* msg) {
// destroys the plugin module and in turn the dispatcher.
ScopedModuleReference scoped_ref(this);
- FOR_EACH_OBSERVER(SyncMessageStatusObserver, sync_status_observer_list_,
- BeginBlockOnSyncMessage());
+ for (auto& observer : sync_status_observer_list_)
+ observer.BeginBlockOnSyncMessage();
bool result = Dispatcher::Send(msg);
- FOR_EACH_OBSERVER(SyncMessageStatusObserver, sync_status_observer_list_,
- EndBlockOnSyncMessage());
+ for (auto& observer : sync_status_observer_list_)
+ observer.EndBlockOnSyncMessage();
return result;
} else {
diff --git a/chromium/ppapi/proxy/plugin_dispatcher.cc b/chromium/ppapi/proxy/plugin_dispatcher.cc
index f4621b3c328..c14a0196942 100644
--- a/chromium/ppapi/proxy/plugin_dispatcher.cc
+++ b/chromium/ppapi/proxy/plugin_dispatcher.cc
@@ -36,10 +36,6 @@
#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/resource.h"
-#if defined(OS_POSIX) && !defined(OS_NACL)
-#include "ipc/ipc_channel_posix.h"
-#endif
-
namespace ppapi {
namespace proxy {
diff --git a/chromium/ppapi/proxy/plugin_globals.cc b/chromium/ppapi/proxy/plugin_globals.cc
index 765ec647897..f2ee4efa500 100644
--- a/chromium/ppapi/proxy/plugin_globals.cc
+++ b/chromium/ppapi/proxy/plugin_globals.cc
@@ -4,11 +4,10 @@
#include "ppapi/proxy/plugin_globals.h"
-#include "base/location.h"
#include "base/macros.h"
-#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_sender.h"
#include "ppapi/proxy/plugin_dispatcher.h"
@@ -189,7 +188,7 @@ base::TaskRunner* PluginGlobals::GetFileTaskRunner() {
void PluginGlobals::MarkPluginIsActive() {
if (!plugin_recently_active_) {
plugin_recently_active_ = true;
- if (!GetBrowserSender() || !base::MessageLoop::current())
+ if (!GetBrowserSender() || !base::ThreadTaskRunnerHandle::IsSet())
return;
GetBrowserSender()->Send(new PpapiHostMsg_Keepalive());
DCHECK(keepalive_throttle_interval_milliseconds_);
diff --git a/chromium/ppapi/proxy/ppapi_messages.h b/chromium/ppapi/proxy/ppapi_messages.h
index 968fe57bf36..f30a6946df2 100644
--- a/chromium/ppapi/proxy/ppapi_messages.h
+++ b/chromium/ppapi/proxy/ppapi_messages.h
@@ -94,18 +94,18 @@ IPC_ENUM_TRAITS_MAX_VALUE(ppapi::TCPSocketVersion,
ppapi::TCP_SOCKET_VERSION_1_1_OR_ABOVE)
IPC_ENUM_TRAITS(PP_AudioSampleRate)
IPC_ENUM_TRAITS_MAX_VALUE(PP_BlendMode, PP_BLENDMODE_LAST)
-IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmExceptionCode, PP_CDMEXCEPTIONCODE_OUTPUTERROR)
-IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmKeyStatus, PP_CDMKEYSTATUS_STATUSPENDING)
-IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmMessageType, PP_CDMMESSAGETYPE_LICENSE_RELEASE)
+IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmExceptionCode, PP_CDMEXCEPTIONCODE_MAX)
+IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmKeyStatus, PP_CDMKEYSTATUS_MAX)
+IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmMessageType, PP_CDMMESSAGETYPE_MAX)
IPC_ENUM_TRAITS(PP_DeviceType_Dev)
-IPC_ENUM_TRAITS(PP_DecryptorStreamType)
+IPC_ENUM_TRAITS_MAX_VALUE(PP_DecryptorStreamType, PP_DECRYPTORSTREAMTYPE_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(PP_FileSystemType, PP_FILESYSTEMTYPE_ISOLATED)
IPC_ENUM_TRAITS_MAX_VALUE(PP_FileType, PP_FILETYPE_OTHER)
IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_Permission)
IPC_ENUM_TRAITS(PP_Flash_BrowserOperations_SettingType)
IPC_ENUM_TRAITS(PP_FlashSetting)
IPC_ENUM_TRAITS(PP_ImageDataFormat)
-IPC_ENUM_TRAITS_MAX_VALUE(PP_InitDataType, PP_INITDATATYPE_WEBM)
+IPC_ENUM_TRAITS_MAX_VALUE(PP_InitDataType, PP_INITDATATYPE_MAX)
IPC_ENUM_TRAITS(PP_InputEvent_MouseButton)
IPC_ENUM_TRAITS(PP_InputEvent_Type)
IPC_ENUM_TRAITS_MAX_VALUE(PP_IsolatedFileSystemType_Private,
@@ -119,7 +119,7 @@ IPC_ENUM_TRAITS(PP_PrintOutputFormat_Dev)
IPC_ENUM_TRAITS(PP_PrintScalingOption_Dev)
IPC_ENUM_TRAITS_MAX_VALUE(PP_PrivateDuplexMode_Dev, PP_PRIVATEDUPLEXMODE_LAST)
IPC_ENUM_TRAITS(PP_PrivateFontCharset)
-IPC_ENUM_TRAITS_MAX_VALUE(PP_SessionType, PP_SESSIONTYPE_PERSISTENT_RELEASE)
+IPC_ENUM_TRAITS_MAX_VALUE(PP_SessionType, PP_SESSIONTYPE_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(PP_TCPSocket_Option,
PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE)
IPC_ENUM_TRAITS(PP_TextInput_Type)
diff --git a/chromium/ppapi/proxy/ppapi_proxy_test.cc b/chromium/ppapi/proxy/ppapi_proxy_test.cc
index ed70bb575b3..587d0de315d 100644
--- a/chromium/ppapi/proxy/ppapi_proxy_test.cc
+++ b/chromium/ppapi/proxy/ppapi_proxy_test.cc
@@ -67,10 +67,8 @@ PPB_Proxy_Private ppb_proxy_private = {
base::ObserverList<ProxyTestHarnessBase> get_interface_handlers_;
const void* MockGetInterface(const char* name) {
- base::ObserverList<ProxyTestHarnessBase>::Iterator it(
- &get_interface_handlers_);
- while (ProxyTestHarnessBase* observer = it.GetNext()) {
- const void* interface = observer->GetInterface(name);
+ for (auto& observer : get_interface_handlers_) {
+ const void* interface = observer.GetInterface(name);
if (interface)
return interface;
}
@@ -549,19 +547,18 @@ void TwoWayTest::SetUp() {
io_thread_.StartWithOptions(options);
plugin_thread_.Start();
- IPC::ChannelHandle local_handle, remote_handle;
- IPC::Channel::GenerateMojoChannelHandlePair("TwoWayTestChannel",
- &local_handle, &remote_handle);
+ mojo::MessagePipe pipe;
base::WaitableEvent remote_harness_set_up(
base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED);
plugin_thread_.task_runner()->PostTask(
- FROM_HERE, base::Bind(&SetUpRemoteHarness, remote_harness_, remote_handle,
- base::RetainedRef(io_thread_.task_runner()),
- &shutdown_event_, &remote_harness_set_up));
+ FROM_HERE,
+ base::Bind(&SetUpRemoteHarness, remote_harness_, pipe.handle0.release(),
+ base::RetainedRef(io_thread_.task_runner()), &shutdown_event_,
+ &remote_harness_set_up));
remote_harness_set_up.Wait();
local_harness_->SetUpHarnessWithChannel(
- local_handle, io_thread_.task_runner().get(), &shutdown_event_,
+ pipe.handle1.release(), io_thread_.task_runner().get(), &shutdown_event_,
true); // is_client
}
diff --git a/chromium/ppapi/proxy/proxy_channel.cc b/chromium/ppapi/proxy/proxy_channel.cc
index 23b0449fbae..fb4c8150070 100644
--- a/chromium/ppapi/proxy/proxy_channel.cc
+++ b/chromium/ppapi/proxy/proxy_channel.cc
@@ -53,13 +53,6 @@ void ProxyChannel::OnChannelError() {
channel_.reset();
}
-#if defined(OS_POSIX) && !defined(OS_NACL)
-base::ScopedFD ProxyChannel::TakeRendererFD() {
- DCHECK(channel());
- return channel()->TakeClientFileDescriptor();
-}
-#endif
-
IPC::PlatformFileForTransit ProxyChannel::ShareHandleWithRemote(
base::PlatformFile handle,
bool should_close_source) {
diff --git a/chromium/ppapi/proxy/proxy_channel.h b/chromium/ppapi/proxy/proxy_channel.h
index 9d981da9e0e..8a6af71ebfa 100644
--- a/chromium/ppapi/proxy/proxy_channel.h
+++ b/chromium/ppapi/proxy/proxy_channel.h
@@ -102,9 +102,7 @@ class PPAPI_PROXY_EXPORT ProxyChannel
return channel_.get();
}
-#if defined(OS_POSIX) && !defined(OS_NACL)
- base::ScopedFD TakeRendererFD();
-#endif
+ base::ProcessId peer_pid() { return peer_pid_; }
protected:
explicit ProxyChannel();
diff --git a/chromium/ppapi/proxy/proxy_completion_callback_factory.h b/chromium/ppapi/proxy/proxy_completion_callback_factory.h
index 71322b0ad66..4b8bafe676a 100644
--- a/chromium/ppapi/proxy/proxy_completion_callback_factory.h
+++ b/chromium/ppapi/proxy/proxy_completion_callback_factory.h
@@ -8,7 +8,7 @@
#include <stdint.h>
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/sequence_checker.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/utility/completion_callback_factory.h"
@@ -21,38 +21,26 @@ class ProxyNonThreadSafeThreadTraits {
public:
class RefCount {
public:
- RefCount() : ref_(0) {
-#ifndef NDEBUG
- message_loop_ = base::MessageLoop::current();
-#endif
- }
+ RefCount() : ref_(0) {}
~RefCount() {
-#ifndef NDEBUG
- DCHECK(message_loop_ == base::MessageLoop::current());
-#endif
+ DCHECK(sequence_checker_.CalledOnValidSequence());
}
int32_t AddRef() {
-#ifndef NDEBUG
- DCHECK(message_loop_ == base::MessageLoop::current());
-#endif
+ DCHECK(sequence_checker_.CalledOnValidSequence());
return ++ref_;
}
int32_t Release() {
-#ifndef NDEBUG
- DCHECK(message_loop_ == base::MessageLoop::current());
-#endif
+ DCHECK(sequence_checker_.CalledOnValidSequence());
DCHECK(ref_ > 0);
return --ref_;
}
private:
int32_t ref_;
-#ifndef NDEBUG
- base::MessageLoop* message_loop_;
-#endif
+ base::SequenceChecker sequence_checker_;
};
// No-op lock class.
diff --git a/chromium/ppapi/proxy/url_loader_resource.cc b/chromium/ppapi/proxy/url_loader_resource.cc
index 4ac345a2b80..e94901dda6c 100644
--- a/chromium/ppapi/proxy/url_loader_resource.cc
+++ b/chromium/ppapi/proxy/url_loader_resource.cc
@@ -4,6 +4,8 @@
#include "ppapi/proxy/url_loader_resource.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "ppapi/c/pp_completion_callback.h"
@@ -23,11 +25,6 @@ using ppapi::thunk::EnterResourceNoLock;
using ppapi::thunk::PPB_URLLoader_API;
using ppapi::thunk::PPB_URLRequestInfo_API;
-#ifdef _MSC_VER
-// Do not warn about use of std::copy with raw pointers.
-#pragma warning(disable : 4996)
-#endif
-
namespace ppapi {
namespace proxy {
@@ -219,7 +216,6 @@ void URLLoaderResource::Close() {
Post(RENDERER, PpapiHostMsg_URLLoader_Close());
// Abort the callbacks, the plugin doesn't want to be called back after this.
- // TODO(brettw) this should fix bug 69457, mark it fixed. ============
if (TrackedCallback::IsPending(pending_callback_))
pending_callback_->PostAbort();
}
@@ -322,13 +318,15 @@ void URLLoaderResource::OnPluginMsgUpdateProgress(
bytes_received_ = bytes_received;
total_bytes_to_be_received_ = total_bytes_to_be_received;
- if (status_callback_)
+ if (status_callback_) {
status_callback_(pp_instance(), pp_resource(),
bytes_sent_, total_bytes_to_be_sent_,
bytes_received_, total_bytes_to_be_received_);
+ }
}
void URLLoaderResource::SetDefersLoading(bool defers_loading) {
+ is_asynchronous_load_suspended_ = defers_loading;
Post(RENDERER, PpapiHostMsg_URLLoader_SetDeferLoading(defers_loading));
}
diff --git a/chromium/ppapi/thunk/interfaces_ppb_private.h b/chromium/ppapi/thunk/interfaces_ppb_private.h
index 636cf203ffe..8de695095dd 100644
--- a/chromium/ppapi/thunk/interfaces_ppb_private.h
+++ b/chromium/ppapi/thunk/interfaces_ppb_private.h
@@ -39,18 +39,14 @@ PROXIED_IFACE(PPB_FLASHFULLSCREEN_INTERFACE_0_1,
PPB_FlashFullscreen_0_1)
PROXIED_IFACE(PPB_FLASHFULLSCREEN_INTERFACE_1_0,
PPB_FlashFullscreen_0_1)
+PROXIED_IFACE(PPB_OUTPUTPROTECTION_PRIVATE_INTERFACE_0_1,
+ PPB_OutputProtection_Private_0_1)
PROXIED_IFACE(PPB_PDF_INTERFACE,
PPB_PDF)
-#if defined(OS_CHROMEOS)
PROXIED_IFACE(PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2,
PPB_PlatformVerification_Private_0_2)
-#endif
-
PROXIED_IFACE(PPB_URLLOADERTRUSTED_INTERFACE_0_3,
PPB_URLLoaderTrusted_0_3)
-
-PROXIED_IFACE(PPB_OUTPUTPROTECTION_PRIVATE_INTERFACE_0_1,
- PPB_OutputProtection_Private_0_1)
#endif // !defined(OS_NACL)
#include "ppapi/thunk/interfaces_postamble.h"