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

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

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/device_enumeration_resource_helper.h" 5 #include "ppapi/proxy/device_enumeration_resource_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 owner_->Post(PluginResource::RENDERER, 87 owner_->Post(PluginResource::RENDERER,
88 PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange()); 88 PpapiHostMsg_DeviceEnumeration_StopMonitoringDeviceChange());
89 } 89 }
90 return PP_OK; 90 return PP_OK;
91 } 91 }
92 92
93 bool DeviceEnumerationResourceHelper::HandleReply( 93 bool DeviceEnumerationResourceHelper::HandleReply(
94 const ResourceMessageReplyParams& params, 94 const ResourceMessageReplyParams& params,
95 const IPC::Message& msg) { 95 const IPC::Message& msg) {
96 IPC_BEGIN_MESSAGE_MAP(DeviceEnumerationResourceHelper, msg) 96 PPAPI_BEGIN_MESSAGE_MAP(DeviceEnumerationResourceHelper, msg)
97 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( 97 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL(
98 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange, 98 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange,
99 OnPluginMsgNotifyDeviceChange) 99 OnPluginMsgNotifyDeviceChange)
100 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED(return false) 100 PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED(return false)
101 IPC_END_MESSAGE_MAP() 101 PPAPI_END_MESSAGE_MAP()
102 102
103 return true; 103 return true;
104 } 104 }
105 105
106 void DeviceEnumerationResourceHelper::LastPluginRefWasDeleted() { 106 void DeviceEnumerationResourceHelper::LastPluginRefWasDeleted() {
107 // Make sure that no further notifications are sent to the plugin. 107 // Make sure that no further notifications are sent to the plugin.
108 monitor_callback_id_++; 108 monitor_callback_id_++;
109 monitor_callback_.reset(NULL); 109 monitor_callback_.reset(NULL);
110 monitor_user_data_ = NULL; 110 monitor_user_data_ = NULL;
111 111
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 OBJECT_IS_PROXY, owner_->pp_instance(), devices[i])); 175 OBJECT_IS_PROXY, owner_->pp_instance(), devices[i]));
176 } 176 }
177 if (!writer.StoreResourceVector(device_resources)) 177 if (!writer.StoreResourceVector(device_resources))
178 return PP_ERROR_FAILED; 178 return PP_ERROR_FAILED;
179 179
180 return PP_OK; 180 return PP_OK;
181 } 181 }
182 182
183 } // namespace proxy 183 } // namespace proxy
184 } // namespace ppapi 184 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698