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

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

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.h ('k') | ppapi/proxy/ppb_instance_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppb_image_data_proxy.h" 5 #include "ppapi/proxy/ppb_image_data_proxy.h"
6 6
7 #include <string.h> // For memcpy 7 #include <string.h> // For memcpy
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 const void* PPB_ImageData_Proxy::GetSourceInterface() const { 114 const void* PPB_ImageData_Proxy::GetSourceInterface() const {
115 return &ppb_imagedata; 115 return &ppb_imagedata;
116 } 116 }
117 117
118 InterfaceID PPB_ImageData_Proxy::GetInterfaceId() const { 118 InterfaceID PPB_ImageData_Proxy::GetInterfaceId() const {
119 return INTERFACE_ID_PPB_IMAGE_DATA; 119 return INTERFACE_ID_PPB_IMAGE_DATA;
120 } 120 }
121 121
122 void PPB_ImageData_Proxy::OnMessageReceived(const IPC::Message& msg) { 122 bool PPB_ImageData_Proxy::OnMessageReceived(const IPC::Message& msg) {
123 bool handled = true;
123 IPC_BEGIN_MESSAGE_MAP(PPB_ImageData_Proxy, msg) 124 IPC_BEGIN_MESSAGE_MAP(PPB_ImageData_Proxy, msg)
124 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_GetNativeImageDataFormat, 125 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_GetNativeImageDataFormat,
125 OnMsgGetNativeImageDataFormat) 126 OnMsgGetNativeImageDataFormat)
126 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_IsImageDataFormatSupported, 127 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_IsImageDataFormatSupported,
127 OnMsgIsImageDataFormatSupported) 128 OnMsgIsImageDataFormatSupported)
128 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_Create, OnMsgCreate) 129 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBImageData_Create, OnMsgCreate)
130 IPC_MESSAGE_UNHANDLED(handled = false)
129 IPC_END_MESSAGE_MAP() 131 IPC_END_MESSAGE_MAP()
130 // FIXME(brettw) handle bad messages! 132 // FIXME(brettw) handle bad messages!
133 return handled;
131 } 134 }
132 135
133 void PPB_ImageData_Proxy::OnMsgGetNativeImageDataFormat(int32* result) { 136 void PPB_ImageData_Proxy::OnMsgGetNativeImageDataFormat(int32* result) {
134 *result = ppb_image_data_target()->GetNativeImageDataFormat(); 137 *result = ppb_image_data_target()->GetNativeImageDataFormat();
135 } 138 }
136 139
137 void PPB_ImageData_Proxy::OnMsgIsImageDataFormatSupported(int32 format, 140 void PPB_ImageData_Proxy::OnMsgIsImageDataFormatSupported(int32 format,
138 PP_Bool* result) { 141 PP_Bool* result) {
139 *result = ppb_image_data_target()->IsImageDataFormatSupported( 142 *result = ppb_image_data_target()->IsImageDataFormatSupported(
140 static_cast<PP_ImageDataFormat>(format)); 143 static_cast<PP_ImageDataFormat>(format));
(...skipping 25 matching lines...) Expand all
166 if (trusted) { 169 if (trusted) {
167 int32_t handle; 170 int32_t handle;
168 if (trusted->GetSharedMemory(*result, &handle, &byte_count) == PP_OK) 171 if (trusted->GetSharedMemory(*result, &handle, &byte_count) == PP_OK)
169 *result_image_handle = ImageData::HandleFromInt(handle); 172 *result_image_handle = ImageData::HandleFromInt(handle);
170 } 173 }
171 } 174 }
172 } 175 }
173 176
174 } // namespace proxy 177 } // namespace proxy
175 } // namespace pp 178 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_image_data_proxy.h ('k') | ppapi/proxy/ppb_instance_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698