Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: ppapi/thunk/ppb_flash_fullscreen_thunk.cc

Issue 11421066: Refactor PPB_Flash_Fullscreen to the new resource model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_flash_fullscreen_api.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_flash_fullscreen_thunk.cc
diff --git a/ppapi/thunk/ppb_flash_fullscreen_thunk.cc b/ppapi/thunk/ppb_flash_fullscreen_thunk.cc
index 598dc715da59739b3d5a90be85f4bf5d9533068a..f64ad992fda4644a70dbb337bc66a0ec0215d039 100644
--- a/ppapi/thunk/ppb_flash_fullscreen_thunk.cc
+++ b/ppapi/thunk/ppb_flash_fullscreen_thunk.cc
@@ -6,8 +6,8 @@
#include "ppapi/c/private/ppb_flash_fullscreen.h"
#include "ppapi/thunk/thunk.h"
#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_flash_fullscreen_api.h"
#include "ppapi/thunk/ppb_instance_api.h"
-#include "ppapi/thunk/ppb_flash_api.h"
#include "ppapi/thunk/resource_creation_api.h"
namespace ppapi {
@@ -16,25 +16,26 @@ namespace thunk {
namespace {
PP_Bool IsFullscreen(PP_Instance instance) {
- EnterInstance enter(instance);
+ EnterInstanceAPI<PPB_Flash_Fullscreen_API> enter(instance);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->GetFlashAPI()->FlashIsFullscreen(instance);
+ return enter.functions()->IsFullscreen(instance);
}
PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) {
- EnterInstance enter(instance);
+ EnterInstanceAPI<PPB_Flash_Fullscreen_API> enter(instance);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->GetFlashAPI()->FlashSetFullscreen(instance,
- fullscreen);
+ return enter.functions()->SetFullscreen(instance, fullscreen);
}
+// TODO(raymes): The codepaths for GetScreenSize in PPB_Fullscreen and
+// PPB_Flash_Fullscreen are the same. Consider deprecating the flash version.
PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) {
EnterInstance enter(instance);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->GetFlashAPI()->FlashGetScreenSize(instance, size);
+ return enter.functions()->GetScreenSize(instance, size);
}
const PPB_FlashFullscreen_0_1 g_ppb_flash_fullscreen_thunk = {
« no previous file with comments | « ppapi/thunk/ppb_flash_fullscreen_api.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698