OLD | NEW |
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_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/c/pp_time.h" | 10 #include "ppapi/c/pp_time.h" |
11 #include "ppapi/c/pp_var.h" | 11 #include "ppapi/c/pp_var.h" |
12 #include "ppapi/c/ppb_audio_config.h" | 12 #include "ppapi/c/ppb_audio_config.h" |
13 #include "ppapi/c/ppb_instance.h" | 13 #include "ppapi/c/ppb_instance.h" |
14 #include "ppapi/c/ppb_messaging.h" | 14 #include "ppapi/c/ppb_messaging.h" |
15 #include "ppapi/c/ppb_mouse_lock.h" | 15 #include "ppapi/c/ppb_mouse_lock.h" |
16 #include "ppapi/c/private/pp_content_decryptor.h" | 16 #include "ppapi/c/private/pp_content_decryptor.h" |
17 #include "ppapi/proxy/content_decryptor_private_serializer.h" | 17 #include "ppapi/proxy/content_decryptor_private_serializer.h" |
18 #include "ppapi/proxy/enter_proxy.h" | 18 #include "ppapi/proxy/enter_proxy.h" |
19 #include "ppapi/proxy/flash_clipboard_resource.h" | 19 #include "ppapi/proxy/flash_clipboard_resource.h" |
| 20 #include "ppapi/proxy/flash_fullscreen_resource.h" |
20 #include "ppapi/proxy/flash_resource.h" | 21 #include "ppapi/proxy/flash_resource.h" |
21 #include "ppapi/proxy/gamepad_resource.h" | 22 #include "ppapi/proxy/gamepad_resource.h" |
22 #include "ppapi/proxy/host_dispatcher.h" | 23 #include "ppapi/proxy/host_dispatcher.h" |
23 #include "ppapi/proxy/plugin_dispatcher.h" | 24 #include "ppapi/proxy/plugin_dispatcher.h" |
24 #include "ppapi/proxy/plugin_proxy_delegate.h" | 25 #include "ppapi/proxy/plugin_proxy_delegate.h" |
25 #include "ppapi/proxy/ppapi_messages.h" | 26 #include "ppapi/proxy/ppapi_messages.h" |
26 #include "ppapi/proxy/ppb_flash_proxy.h" | 27 #include "ppapi/proxy/ppb_flash_proxy.h" |
27 #include "ppapi/proxy/serialized_var.h" | 28 #include "ppapi/proxy/serialized_var.h" |
28 #include "ppapi/shared_impl/ppapi_globals.h" | 29 #include "ppapi/shared_impl/ppapi_globals.h" |
29 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 30 #include "ppapi/shared_impl/ppb_url_util_shared.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 222 } |
222 | 223 |
223 const ViewData* PPB_Instance_Proxy::GetViewData(PP_Instance instance) { | 224 const ViewData* PPB_Instance_Proxy::GetViewData(PP_Instance instance) { |
224 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 225 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
225 GetInstanceData(instance); | 226 GetInstanceData(instance); |
226 if (!data) | 227 if (!data) |
227 return NULL; | 228 return NULL; |
228 return &data->view; | 229 return &data->view; |
229 } | 230 } |
230 | 231 |
| 232 PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) { |
| 233 // This function is only used for proxying in the renderer process. It is not |
| 234 // implemented in the plugin process. |
| 235 NOTREACHED(); |
| 236 return PP_FALSE; |
| 237 } |
| 238 |
231 PP_Var PPB_Instance_Proxy::GetWindowObject(PP_Instance instance) { | 239 PP_Var PPB_Instance_Proxy::GetWindowObject(PP_Instance instance) { |
232 ReceiveSerializedVarReturnValue result; | 240 ReceiveSerializedVarReturnValue result; |
233 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetWindowObject( | 241 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetWindowObject( |
234 API_ID_PPB_INSTANCE, instance, &result)); | 242 API_ID_PPB_INSTANCE, instance, &result)); |
235 return result.Return(dispatcher()); | 243 return result.Return(dispatcher()); |
236 } | 244 } |
237 | 245 |
238 PP_Var PPB_Instance_Proxy::GetOwnerElementObject(PP_Instance instance) { | 246 PP_Var PPB_Instance_Proxy::GetOwnerElementObject(PP_Instance instance) { |
239 ReceiveSerializedVarReturnValue result; | 247 ReceiveSerializedVarReturnValue result; |
240 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetOwnerElementObject( | 248 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetOwnerElementObject( |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 new_singleton = new GamepadResource(connection, instance); | 360 new_singleton = new GamepadResource(connection, instance); |
353 break; | 361 break; |
354 // Flash resources aren't needed for NaCl. | 362 // Flash resources aren't needed for NaCl. |
355 #if !defined(OS_NACL) && !defined(NACL_WIN64) | 363 #if !defined(OS_NACL) && !defined(NACL_WIN64) |
356 case FLASH_SINGLETON_ID: | 364 case FLASH_SINGLETON_ID: |
357 new_singleton = new FlashResource(connection, instance); | 365 new_singleton = new FlashResource(connection, instance); |
358 break; | 366 break; |
359 case FLASH_CLIPBOARD_SINGLETON_ID: | 367 case FLASH_CLIPBOARD_SINGLETON_ID: |
360 new_singleton = new FlashClipboardResource(connection, instance); | 368 new_singleton = new FlashClipboardResource(connection, instance); |
361 break; | 369 break; |
| 370 case FLASH_FULLSCREEN_SINGLETON_ID: |
| 371 new_singleton = new FlashFullscreenResource(connection, instance); |
| 372 break; |
362 #else | 373 #else |
363 case FLASH_SINGLETON_ID: | 374 case FLASH_SINGLETON_ID: |
364 case FLASH_CLIPBOARD_SINGLETON_ID: | 375 case FLASH_CLIPBOARD_SINGLETON_ID: |
| 376 case FLASH_FULLSCREEN_SINGLETON_ID: |
365 NOTREACHED(); | 377 NOTREACHED(); |
366 break; | 378 break; |
367 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) | 379 #endif // !defined(OS_NACL) && !defined(NACL_WIN64) |
368 } | 380 } |
369 | 381 |
370 if (!new_singleton) { | 382 if (!new_singleton) { |
371 // Getting here implies that a constructor is missing in the above switch. | 383 // Getting here implies that a constructor is missing in the above switch. |
372 NOTREACHED(); | 384 NOTREACHED(); |
373 return NULL; | 385 return NULL; |
374 } | 386 } |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 PP_Instance instance) { | 1187 PP_Instance instance) { |
1176 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1188 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1177 GetInstanceData(instance); | 1189 GetInstanceData(instance); |
1178 if (!data) | 1190 if (!data) |
1179 return; // Instance was probably deleted. | 1191 return; // Instance was probably deleted. |
1180 data->should_do_request_surrounding_text = false; | 1192 data->should_do_request_surrounding_text = false; |
1181 } | 1193 } |
1182 | 1194 |
1183 } // namespace proxy | 1195 } // namespace proxy |
1184 } // namespace ppapi | 1196 } // namespace ppapi |
OLD | NEW |