OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_var.h" | 7 #include "ppapi/c/pp_var.h" |
8 #include "ppapi/c/ppb_instance.h" | 8 #include "ppapi/c/ppb_instance.h" |
| 9 #include "ppapi/proxy/host_dispatcher.h" |
9 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
10 #include "ppapi/proxy/plugin_resource.h" | 11 #include "ppapi/proxy/plugin_resource.h" |
11 #include "ppapi/proxy/plugin_resource_tracker.h" | 12 #include "ppapi/proxy/plugin_resource_tracker.h" |
12 #include "ppapi/proxy/ppapi_messages.h" | 13 #include "ppapi/proxy/ppapi_messages.h" |
13 #include "ppapi/proxy/serialized_var.h" | 14 #include "ppapi/proxy/serialized_var.h" |
14 | 15 |
15 namespace pp { | 16 namespace pp { |
16 namespace proxy { | 17 namespace proxy { |
17 | 18 |
18 namespace { | 19 namespace { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void PPB_Instance_Proxy::OnMsgIsFullFrame(PP_Instance instance, | 161 void PPB_Instance_Proxy::OnMsgIsFullFrame(PP_Instance instance, |
161 PP_Bool* result) { | 162 PP_Bool* result) { |
162 *result = ppb_instance_target()->IsFullFrame(instance); | 163 *result = ppb_instance_target()->IsFullFrame(instance); |
163 } | 164 } |
164 | 165 |
165 void PPB_Instance_Proxy::OnMsgExecuteScript( | 166 void PPB_Instance_Proxy::OnMsgExecuteScript( |
166 PP_Instance instance, | 167 PP_Instance instance, |
167 SerializedVarReceiveInput script, | 168 SerializedVarReceiveInput script, |
168 SerializedVarOutParam out_exception, | 169 SerializedVarOutParam out_exception, |
169 SerializedVarReturnValue result) { | 170 SerializedVarReturnValue result) { |
| 171 if (dispatcher()->IsPlugin()) |
| 172 NOTREACHED(); |
| 173 else |
| 174 static_cast<HostDispatcher*>(dispatcher())->set_allow_plugin_reentrancy(); |
| 175 |
170 result.Return(dispatcher(), ppb_instance_target()->ExecuteScript( | 176 result.Return(dispatcher(), ppb_instance_target()->ExecuteScript( |
171 instance, | 177 instance, |
172 script.Get(dispatcher()), | 178 script.Get(dispatcher()), |
173 out_exception.OutParam(dispatcher()))); | 179 out_exception.OutParam(dispatcher()))); |
174 } | 180 } |
175 | 181 |
176 } // namespace proxy | 182 } // namespace proxy |
177 } // namespace pp | 183 } // namespace pp |
OLD | NEW |