diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 20:08:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-20 20:08:40 +0000 |
commit | dafab7597fe21cb8eb08e384a09636e7cd7c88dc (patch) | |
tree | 95d272f43d790e66398ee4b615e37b16ec6aa20b /ppapi/cpp | |
parent | 1c4164cfa27f4c12089cd5836cd016f2f859a276 (diff) | |
download | chromium_src-dafab7597fe21cb8eb08e384a09636e7cd7c88dc.zip chromium_src-dafab7597fe21cb8eb08e384a09636e7cd7c88dc.tar.gz chromium_src-dafab7597fe21cb8eb08e384a09636e7cd7c88dc.tar.bz2 |
Rename PPB_Fullscreen_Dev to PPB_FlashFullscreen.
This is to make way for the new PPB_Fullscreen interface which will hopefully replace the old one at some point. This maintains backwards binary compat.
I renamed two things related to the broker because the file wasn't being included in the proxy properly, and we never noticed they were wrong.
This also fixes a crash in the test harness generating the list of tests, since there is no current test case for the DidChangeView call.
Review URL: http://codereview.chromium.org/7917019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/private/flash_fullscreen.cc | 50 | ||||
-rw-r--r-- | ppapi/cpp/private/flash_fullscreen.h | 29 |
2 files changed, 79 insertions, 0 deletions
diff --git a/ppapi/cpp/private/flash_fullscreen.cc b/ppapi/cpp/private/flash_fullscreen.cc new file mode 100644 index 0000000..7a37a54 --- /dev/null +++ b/ppapi/cpp/private/flash_fullscreen.cc @@ -0,0 +1,50 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ppapi/cpp/private/flash_fullscreen.h" + +#include "ppapi/c/private/ppb_flash_fullscreen.h" +#include "ppapi/cpp/instance.h" +#include "ppapi/cpp/module.h" +#include "ppapi/cpp/module_impl.h" +#include "ppapi/cpp/size.h" + +namespace pp { + +namespace { + +template <> const char* interface_name<PPB_FlashFullscreen>() { + return PPB_FLASHFULLSCREEN_INTERFACE; +} + +} // namespace + +FlashFullscreen::FlashFullscreen(Instance* instance) + : instance_(instance) { +} + +FlashFullscreen::~FlashFullscreen() { +} + +bool FlashFullscreen::IsFullscreen() { + return has_interface<PPB_FlashFullscreen>() && + get_interface<PPB_FlashFullscreen>()->IsFullscreen( + instance_->pp_instance()); +} + +bool FlashFullscreen::SetFullscreen(bool fullscreen) { + if (!has_interface<PPB_FlashFullscreen>()) + return false; + return PP_ToBool(get_interface<PPB_FlashFullscreen>()->SetFullscreen( + instance_->pp_instance(), PP_FromBool(fullscreen))); +} + +bool FlashFullscreen::GetScreenSize(Size* size) { + if (!has_interface<PPB_FlashFullscreen>()) + return false; + return PP_ToBool(get_interface<PPB_FlashFullscreen>()->GetScreenSize( + instance_->pp_instance(), &size->pp_size())); +} + +} // namespace pp diff --git a/ppapi/cpp/private/flash_fullscreen.h b/ppapi/cpp/private/flash_fullscreen.h new file mode 100644 index 0000000..539f249 --- /dev/null +++ b/ppapi/cpp/private/flash_fullscreen.h @@ -0,0 +1,29 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_CPP_PRIVATE_FLASH_FULLSCREEN_H_ +#define PPAPI_CPP_PRIVATE_FLASH_FULLSCREEN_H_ + +namespace pp { + +class Instance; +class Size; + +class FlashFullscreen { + public: + FlashFullscreen(Instance* instance); + virtual ~FlashFullscreen(); + + // PPB_FlashFullscreen methods. + bool IsFullscreen(); + bool SetFullscreen(bool fullscreen); + bool GetScreenSize(Size* size); + + private: + Instance* instance_; +}; + +} // namespace pp + +#endif // PPAPI_CPP_PRIVATE_FLASH_FULLSCREEN_H_ |