summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2016-02-22 12:28:12 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-22 20:29:25 +0000
commita1faef23466e8786b2733c0f24902c9cc5363bfb (patch)
tree8174fb0e1984aa16d324d498bb0d9122c2a4c068 /ppapi
parent3a29bc21c7060ce68061dc68f2f72511730b10d7 (diff)
downloadchromium_src-a1faef23466e8786b2733c0f24902c9cc5363bfb.zip
chromium_src-a1faef23466e8786b2733c0f24902c9cc5363bfb.tar.gz
chromium_src-a1faef23466e8786b2733c0f24902c9cc5363bfb.tar.bz2
Remove the method BrokerDuplicateSharedMemoryHandle.
Now that Chrome IPC brokers SharedMemoryHandles, there is no need for consumers of Chrome IPC to manually duplicate handles into the destination process. BUG=493414 Review URL: https://codereview.chromium.org/1674123002 Cr-Commit-Position: refs/heads/master@{#376797}
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/ppb_image_data_proxy.cc19
-rw-r--r--ppapi/proxy/ppb_image_data_proxy.h1
-rw-r--r--ppapi/proxy/serialized_structs.h4
3 files changed, 1 insertions, 23 deletions
diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc
index 4142f65..5e4ebe1 100644
--- a/ppapi/proxy/ppb_image_data_proxy.cc
+++ b/ppapi/proxy/ppb_image_data_proxy.cc
@@ -376,8 +376,7 @@ PlatformImageData::PlatformImageData(const HostResource& resource,
ImageHandle handle)
: ImageData(resource, PPB_ImageData_Shared::PLATFORM, desc) {
#if defined(OS_WIN)
- transport_dib_.reset(TransportDIB::CreateWithHandle(
- base::SharedMemoryHandle(handle, base::GetCurrentProcId())));
+ transport_dib_.reset(TransportDIB::CreateWithHandle(handle));
#else
transport_dib_.reset(TransportDIB::Map(handle));
#endif // defined(OS_WIN)
@@ -420,19 +419,7 @@ SkCanvas* PlatformImageData::GetCanvas() {
// static
ImageHandle PlatformImageData::NullHandle() {
-#if defined(OS_WIN)
- return NULL;
-#else
return ImageHandle();
-#endif
-}
-
-ImageHandle PlatformImageData::HandleFromInt(int32_t i) {
-#if defined(OS_WIN)
- return reinterpret_cast<ImageHandle>(i);
-#else
- return ImageHandle(i, false);
-#endif
}
#endif // !defined(OS_NACL)
@@ -633,11 +620,7 @@ void PPB_ImageData_Proxy::OnHostMsgCreatePlatform(
desc, &image_handle, &byte_count);
result->SetHostResource(instance, resource);
if (resource) {
-#if defined(OS_WIN)
- *result_image_handle = image_handle.GetHandle();
-#else
*result_image_handle = image_handle;
-#endif
} else {
*result_image_handle = PlatformImageData::NullHandle();
}
diff --git a/ppapi/proxy/ppb_image_data_proxy.h b/ppapi/proxy/ppb_image_data_proxy.h
index 82abb4a..46fb9af 100644
--- a/ppapi/proxy/ppb_image_data_proxy.h
+++ b/ppapi/proxy/ppb_image_data_proxy.h
@@ -98,7 +98,6 @@ class PPAPI_PROXY_EXPORT PlatformImageData : public ImageData {
SkCanvas* GetCanvas() override;
static ImageHandle NullHandle();
- static ImageHandle HandleFromInt(int32_t i);
private:
scoped_ptr<TransportDIB> transport_dib_;
diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h
index 3820056..bec991f 100644
--- a/ppapi/proxy/serialized_structs.h
+++ b/ppapi/proxy/serialized_structs.h
@@ -134,11 +134,7 @@ struct PPB_AudioEncodeParameters {
};
// TODO(raymes): Make ImageHandle compatible with SerializedHandle.
-#if defined(OS_WIN)
-typedef HANDLE ImageHandle;
-#else
typedef base::SharedMemoryHandle ImageHandle;
-#endif
} // namespace proxy
} // namespace ppapi