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

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

Issue 11358247: Revert 167727 - Add PPAPI permissions for file chooser, PDF, testing, video capture, and video deco… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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_pdf_proxy.cc ('k') | ppapi/proxy/ppb_video_capture_proxy.cc » ('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) 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/ppb_testing_proxy.h" 5 #include "ppapi/proxy/ppb_testing_proxy.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "ppapi/c/dev/ppb_testing_dev.h" 8 #include "ppapi/c/dev/ppb_testing_dev.h"
9 #include "ppapi/proxy/enter_proxy.h" 9 #include "ppapi/proxy/enter_proxy.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 &testing_interface, 150 &testing_interface,
151 PPB_TESTING_DEV_INTERFACE, 151 PPB_TESTING_DEV_INTERFACE,
152 API_ID_PPB_TESTING, 152 API_ID_PPB_TESTING,
153 false, 153 false,
154 &CreateTestingProxy, 154 &CreateTestingProxy,
155 }; 155 };
156 return &info; 156 return &info;
157 } 157 }
158 158
159 bool PPB_Testing_Proxy::OnMessageReceived(const IPC::Message& msg) { 159 bool PPB_Testing_Proxy::OnMessageReceived(const IPC::Message& msg) {
160 if (!dispatcher()->permissions().HasPermission(PERMISSION_TESTING))
161 return false;
162
163 bool handled = true; 160 bool handled = true;
164 IPC_BEGIN_MESSAGE_MAP(PPB_Testing_Proxy, msg) 161 IPC_BEGIN_MESSAGE_MAP(PPB_Testing_Proxy, msg)
165 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_ReadImageData, 162 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_ReadImageData,
166 OnMsgReadImageData) 163 OnMsgReadImageData)
167 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance, 164 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_GetLiveObjectsForInstance,
168 OnMsgGetLiveObjectsForInstance) 165 OnMsgGetLiveObjectsForInstance)
169 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_SimulateInputEvent, 166 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTesting_SimulateInputEvent,
170 OnMsgSimulateInputEvent) 167 OnMsgSimulateInputEvent)
171 IPC_MESSAGE_UNHANDLED(handled = false) 168 IPC_MESSAGE_UNHANDLED(handled = false)
172 IPC_END_MESSAGE_MAP() 169 IPC_END_MESSAGE_MAP()
(...skipping 26 matching lines...) Expand all
199 PP_Instance instance, 196 PP_Instance instance,
200 const InputEventData& input_event) { 197 const InputEventData& input_event) {
201 scoped_refptr<PPB_InputEvent_Shared> input_event_impl( 198 scoped_refptr<PPB_InputEvent_Shared> input_event_impl(
202 new PPB_InputEvent_Shared(OBJECT_IS_PROXY, instance, input_event)); 199 new PPB_InputEvent_Shared(OBJECT_IS_PROXY, instance, input_event));
203 ppb_testing_impl_->SimulateInputEvent(instance, 200 ppb_testing_impl_->SimulateInputEvent(instance,
204 input_event_impl->pp_resource()); 201 input_event_impl->pp_resource());
205 } 202 }
206 203
207 } // namespace proxy 204 } // namespace proxy
208 } // namespace ppapi 205 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_pdf_proxy.cc ('k') | ppapi/proxy/ppb_video_capture_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698