Switch Linux and CrOS to BoringSSL.
[chromium-blink-merge.git] / ppapi / proxy / flash_fullscreen_resource.cc
blob90a68fcf6b562710e7546b84adf075418f0a3008
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
3 // found in the LICENSE file.
5 #include "ppapi/proxy/flash_fullscreen_resource.h"
7 #include "ppapi/c/pp_bool.h"
8 #include "ppapi/proxy/ppapi_messages.h"
10 namespace ppapi {
11 namespace proxy {
13 FlashFullscreenResource::FlashFullscreenResource(Connection connection,
14 PP_Instance instance)
15 : PluginResource(connection, instance),
16 is_fullscreen_(PP_FALSE) {
19 FlashFullscreenResource::~FlashFullscreenResource() {
22 thunk::PPB_Flash_Fullscreen_API*
23 FlashFullscreenResource::AsPPB_Flash_Fullscreen_API() {
24 return this;
27 PP_Bool FlashFullscreenResource::IsFullscreen(PP_Instance instance) {
28 return is_fullscreen_;
31 PP_Bool FlashFullscreenResource::SetFullscreen(PP_Instance instance,
32 PP_Bool fullscreen) {
33 if (!sent_create_to_renderer())
34 SendCreate(RENDERER, PpapiHostMsg_FlashFullscreen_Create());
35 int32_t result = SyncCall<IPC::Message>(RENDERER,
36 PpapiHostMsg_FlashFullscreen_SetFullscreen(PP_ToBool(fullscreen)));
37 return PP_FromBool(result == PP_OK);
40 void FlashFullscreenResource::SetLocalIsFullscreen(PP_Instance instance,
41 PP_Bool is_fullscreen) {
42 is_fullscreen_ = is_fullscreen;
45 } // namespace proxy
46 } // namespace ppapi