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/c/ppb_fullscreen.h"
6 #include "ppapi/shared_impl/ppb_view_shared.h"
7 #include "ppapi/thunk/thunk.h"
8 #include "ppapi/thunk/enter.h"
9 #include "ppapi/thunk/ppb_instance_api.h"
10 #include "ppapi/thunk/resource_creation_api.h"
17 PP_Bool
IsFullscreen(PP_Instance instance
) {
18 EnterInstance
enter(instance
);
21 const ViewData
* view
= enter
.functions()->GetViewData(instance
);
24 return PP_FromBool(view
->is_fullscreen
);
27 PP_Bool
SetFullscreen(PP_Instance instance
, PP_Bool fullscreen
) {
28 EnterInstance
enter(instance
);
31 return enter
.functions()->SetFullscreen(instance
, fullscreen
);
34 PP_Bool
GetScreenSize(PP_Instance instance
, PP_Size
* size
) {
35 EnterInstance
enter(instance
);
38 return enter
.functions()->GetScreenSize(instance
, size
);
41 const PPB_Fullscreen g_ppb_fullscreen_thunk
= {
49 const PPB_Fullscreen_1_0
* GetPPB_Fullscreen_1_0_Thunk() {
50 return &g_ppb_fullscreen_thunk
;