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

Side by Side Diff: chrome/browser/renderer_host/pepper/pepper_flash_drm_host.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 "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h" 5 #include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Windows.h> 8 #include <Windows.h>
9 #endif 9 #endif
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 fetcher_ = new DeviceIDFetcher(render_process_id); 129 fetcher_ = new DeviceIDFetcher(render_process_id);
130 monitor_finder_ = new MonitorFinder(render_process_id, render_frame_id); 130 monitor_finder_ = new MonitorFinder(render_process_id, render_frame_id);
131 monitor_finder_->GetMonitor(); 131 monitor_finder_->GetMonitor();
132 } 132 }
133 133
134 PepperFlashDRMHost::~PepperFlashDRMHost() {} 134 PepperFlashDRMHost::~PepperFlashDRMHost() {}
135 135
136 int32_t PepperFlashDRMHost::OnResourceMessageReceived( 136 int32_t PepperFlashDRMHost::OnResourceMessageReceived(
137 const IPC::Message& msg, 137 const IPC::Message& msg,
138 ppapi::host::HostMessageContext* context) { 138 ppapi::host::HostMessageContext* context) {
139 IPC_BEGIN_MESSAGE_MAP(PepperFlashDRMHost, msg) 139 PPAPI_BEGIN_MESSAGE_MAP(PepperFlashDRMHost, msg)
140 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetDeviceID, 140 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetDeviceID,
141 OnHostMsgGetDeviceID) 141 OnHostMsgGetDeviceID)
142 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetHmonitor, 142 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetHmonitor,
143 OnHostMsgGetHmonitor) 143 OnHostMsgGetHmonitor)
144 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_MonitorIsExternal, 144 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_MonitorIsExternal,
145 OnHostMsgMonitorIsExternal) 145 OnHostMsgMonitorIsExternal)
146 IPC_END_MESSAGE_MAP() 146 PPAPI_END_MESSAGE_MAP()
147 return PP_ERROR_FAILED; 147 return PP_ERROR_FAILED;
148 } 148 }
149 149
150 int32_t PepperFlashDRMHost::OnHostMsgGetDeviceID( 150 int32_t PepperFlashDRMHost::OnHostMsgGetDeviceID(
151 ppapi::host::HostMessageContext* context) { 151 ppapi::host::HostMessageContext* context) {
152 if (!fetcher_->Start(base::Bind(&PepperFlashDRMHost::GotDeviceID, 152 if (!fetcher_->Start(base::Bind(&PepperFlashDRMHost::GotDeviceID,
153 weak_factory_.GetWeakPtr(), 153 weak_factory_.GetWeakPtr(),
154 context->MakeReplyMessageContext()))) { 154 context->MakeReplyMessageContext()))) {
155 return PP_ERROR_INPROGRESS; 155 return PP_ERROR_INPROGRESS;
156 } 156 }
(...skipping 29 matching lines...) Expand all
186 if (id.empty() && result == PP_OK) { 186 if (id.empty() && result == PP_OK) {
187 NOTREACHED(); 187 NOTREACHED();
188 result = PP_ERROR_FAILED; 188 result = PP_ERROR_FAILED;
189 } 189 }
190 reply_context.params.set_result(result); 190 reply_context.params.set_result(result);
191 host()->SendReply(reply_context, 191 host()->SendReply(reply_context,
192 PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id)); 192 PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id));
193 } 193 }
194 194
195 } // namespace chrome 195 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698