| 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/ppp_instance_proxy.h" | 5 #include "ppapi/proxy/ppp_instance_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "ppapi/shared_impl/ppb_view_shared.h" | 21 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 22 #include "ppapi/shared_impl/scoped_pp_resource.h" | 22 #include "ppapi/shared_impl/scoped_pp_resource.h" |
| 23 #include "ppapi/thunk/enter.h" | 23 #include "ppapi/thunk/enter.h" |
| 24 #include "ppapi/thunk/ppb_view_api.h" | 24 #include "ppapi/thunk/ppb_view_api.h" |
| 25 | 25 |
| 26 namespace ppapi { | 26 namespace ppapi { |
| 27 namespace proxy { | 27 namespace proxy { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 void GetFullscreenStates(PP_Instance instance, | |
| 32 HostDispatcher* dispatcher, | |
| 33 PP_Bool* fullscreen, | |
| 34 PP_Bool* flash_fullscreen) { | |
| 35 const PPB_Fullscreen* fullscreen_interface = | |
| 36 static_cast<const PPB_Fullscreen*>( | |
| 37 dispatcher->local_get_interface()(PPB_FULLSCREEN_INTERFACE)); | |
| 38 DCHECK(fullscreen_interface); | |
| 39 *fullscreen = fullscreen_interface->IsFullscreen(instance); | |
| 40 } | |
| 41 | |
| 42 PP_Bool IsFlashFullscreen(PP_Instance instance, | 31 PP_Bool IsFlashFullscreen(PP_Instance instance, |
| 43 HostDispatcher* dispatcher) { | 32 HostDispatcher* dispatcher) { |
| 44 const PPB_FlashFullscreen* flash_fullscreen_interface = | 33 const PPB_FlashFullscreen* flash_fullscreen_interface = |
| 45 static_cast<const PPB_FlashFullscreen*>( | 34 static_cast<const PPB_FlashFullscreen*>( |
| 46 dispatcher->local_get_interface()(PPB_FLASHFULLSCREEN_INTERFACE)); | 35 dispatcher->local_get_interface()(PPB_FLASHFULLSCREEN_INTERFACE)); |
| 47 DCHECK(flash_fullscreen_interface); | 36 DCHECK(flash_fullscreen_interface); |
| 48 return flash_fullscreen_interface->IsFullscreen(instance); | 37 return flash_fullscreen_interface->IsFullscreen(instance); |
| 49 } | 38 } |
| 50 | 39 |
| 51 PP_Bool DidCreate(PP_Instance instance, | 40 PP_Bool DidCreate(PP_Instance instance, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 // with. The plugin will normally take an additional reference which will keep | 250 // with. The plugin will normally take an additional reference which will keep |
| 262 // the resource alive in the plugin (and the one reference in the renderer | 251 // the resource alive in the plugin (and the one reference in the renderer |
| 263 // representing all plugin references). | 252 // representing all plugin references). |
| 264 // Once all references at the plugin side are released, the renderer side will | 253 // Once all references at the plugin side are released, the renderer side will |
| 265 // be notified and release the reference added in HandleDocumentLoad() above. | 254 // be notified and release the reference added in HandleDocumentLoad() above. |
| 266 PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(plugin_loader); | 255 PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(plugin_loader); |
| 267 } | 256 } |
| 268 | 257 |
| 269 } // namespace proxy | 258 } // namespace proxy |
| 270 } // namespace ppapi | 259 } // namespace ppapi |
| OLD | NEW |