summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 20:08:40 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 20:08:40 +0000
commitdafab7597fe21cb8eb08e384a09636e7cd7c88dc (patch)
tree95d272f43d790e66398ee4b615e37b16ec6aa20b
parent1c4164cfa27f4c12089cd5836cd016f2f859a276 (diff)
downloadchromium_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
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.cc4
-rw-r--r--ppapi/api/private/ppb_flash_fullscreen.idl48
-rw-r--r--ppapi/c/private/ppb_flash_fullscreen.h62
-rw-r--r--ppapi/cpp/private/flash_fullscreen.cc50
-rw-r--r--ppapi/cpp/private/flash_fullscreen.h29
-rw-r--r--ppapi/ppapi_cpp.gypi3
-rw-r--r--ppapi/ppapi_shared.gypi1
-rw-r--r--ppapi/proxy/interface_list.cc1
-rw-r--r--ppapi/proxy/ppapi_messages.h4
-rw-r--r--ppapi/proxy/ppb_instance_proxy.cc39
-rw-r--r--ppapi/proxy/ppb_instance_proxy.h21
-rw-r--r--ppapi/proxy/ppp_instance_proxy.cc8
-rw-r--r--ppapi/tests/all_cpp_includes.h1
-rw-r--r--ppapi/tests/testing_instance.cc6
-rw-r--r--ppapi/thunk/interfaces_ppb_private.h3
-rw-r--r--ppapi/thunk/ppb_broker_thunk.cc2
-rw-r--r--ppapi/thunk/ppb_flash_fullscreen_thunk.cc51
-rw-r--r--ppapi/thunk/ppb_fullscreen_thunk.cc6
-rw-r--r--ppapi/thunk/ppb_instance_api.h9
-rw-r--r--ppapi/thunk/thunk.h1
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc1
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc10
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.h9
23 files changed, 311 insertions, 58 deletions
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index cd0cefb..c21353f 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -1315,7 +1315,7 @@ int32_t PepperPluginDelegateImpl::ShowContextMenu(
webkit::ppapi::PPB_Flash_Menu_Impl* menu,
const gfx::Point& position) {
int32 render_widget_id = render_view_->routing_id();
- if (instance->IsFullscreen(instance->pp_instance())) {
+ if (instance->FlashIsFullscreen(instance->pp_instance())) {
webkit::ppapi::FullscreenContainer* container =
instance->fullscreen_container();
DCHECK(container);
@@ -1335,7 +1335,7 @@ int32_t PepperPluginDelegateImpl::ShowContextMenu(
params.custom_items = menu->menu_data();
// Transform the position to be in render view's coordinates.
- if (instance->IsFullscreen(instance->pp_instance())) {
+ if (instance->FlashIsFullscreen(instance->pp_instance())) {
WebKit::WebRect rect = render_view_->windowRect();
params.x -= rect.x;
params.y -= rect.y;
diff --git a/ppapi/api/private/ppb_flash_fullscreen.idl b/ppapi/api/private/ppb_flash_fullscreen.idl
new file mode 100644
index 0000000..9019366
--- /dev/null
+++ b/ppapi/api/private/ppb_flash_fullscreen.idl
@@ -0,0 +1,48 @@
+/* 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.
+ */
+
+
+/**
+ * This file defines the <code>PPB_FlashFullscreen</code> interface.
+ */
+
+label Chrome {
+ M16 = 0.1
+};
+
+interface PPB_FlashFullscreen {
+ /**
+ * Checks whether the plugin instance is currently in fullscreen mode.
+ */
+ PP_Bool IsFullscreen(
+ [in] PP_Instance instance);
+
+ /**
+ * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
+ * success, PP_FALSE on failure.
+ *
+ * This unbinds the current Graphics2D or Surface3D. Pending flushes and
+ * swapbuffers will execute as if the resource was off-screen. The transition
+ * is asynchronous. During the transition, IsFullscreen will return PP_False,
+ * and no Graphics2D or Surface3D can be bound. The transition ends at the
+ * next DidChangeView.
+ *
+ * Note: when switching to and from fullscreen, Context3D and Surface3D
+ * resources need to be re-created. This is a current limitation that will be
+ * lifted in a later revision.
+ */
+ PP_Bool SetFullscreen(
+ [in] PP_Instance instance,
+ [in] PP_Bool fullscreen);
+
+ /**
+ * Gets the size of the screen. When going fullscreen, the instance will be
+ * resized to that size.
+ */
+ PP_Bool GetScreenSize(
+ [in] PP_Instance instance,
+ [out] PP_Size size);
+};
+
diff --git a/ppapi/c/private/ppb_flash_fullscreen.h b/ppapi/c/private/ppb_flash_fullscreen.h
new file mode 100644
index 0000000..d751e9e
--- /dev/null
+++ b/ppapi/c/private/ppb_flash_fullscreen.h
@@ -0,0 +1,62 @@
+/* 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.
+ */
+
+/* From private/ppb_flash_fullscreen.idl modified Fri Aug 26 10:51:16 2011. */
+
+#ifndef PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_
+#define PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_FLASHFULLSCREEN_INTERFACE_0_1 "PPB_FlashFullscreen;0.1"
+#define PPB_FLASHFULLSCREEN_INTERFACE PPB_FLASHFULLSCREEN_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPB_FlashFullscreen</code> interface.
+ */
+
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_FlashFullscreen {
+ /**
+ * Checks whether the plugin instance is currently in fullscreen mode.
+ */
+ PP_Bool (*IsFullscreen)(PP_Instance instance);
+ /**
+ * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on
+ * success, PP_FALSE on failure.
+ *
+ * This unbinds the current Graphics2D or Surface3D. Pending flushes and
+ * swapbuffers will execute as if the resource was off-screen. The transition
+ * is asynchronous. During the transition, IsFullscreen will return PP_False,
+ * and no Graphics2D or Surface3D can be bound. The transition ends at the
+ * next DidChangeView when going into fullscreen mode. The transition out of
+ * fullscreen mode is synchronous.
+ *
+ * Note: when switching to and from fullscreen, Context3D and Surface3D
+ * resources need to be re-created. This is a current limitation that will be
+ * lifted in a later revision.
+ */
+ PP_Bool (*SetFullscreen)(PP_Instance instance, PP_Bool fullscreen);
+ /**
+ * Gets the size of the screen in pixels. When going fullscreen, the instance
+ * will be resized to that size.
+ */
+ PP_Bool (*GetScreenSize)(PP_Instance instance, struct PP_Size* size);
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPB_FLASH_FULLSCREEN_H_ */
+
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_
diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi
index 2089828..4edbf0d 100644
--- a/ppapi/ppapi_cpp.gypi
+++ b/ppapi/ppapi_cpp.gypi
@@ -95,6 +95,7 @@
'c/private/ppb_flash.h',
'c/private/ppb_flash_clipboard.h',
'c/private/ppb_flash_file.h',
+ 'c/private/ppb_flash_fullscreen.h',
'c/private/ppb_flash_menu.h',
'c/private/ppb_flash_net_connector.h',
'c/private/ppb_flash_tcp_socket.h',
@@ -243,6 +244,8 @@
'cpp/dev/scriptable_object_deprecated.cc',
# Private interfaces.
+ 'cpp/private/flash_fullscreen.cc',
+ 'cpp/private/flash_fullscreen.h',
'cpp/private/instance_private.cc',
'cpp/private/instance_private.h',
'cpp/private/var_private.cc',
diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi
index 4ae1078..1f30063 100644
--- a/ppapi/ppapi_shared.gypi
+++ b/ppapi/ppapi_shared.gypi
@@ -120,6 +120,7 @@
'thunk/ppb_file_system_api.h',
'thunk/ppb_file_system_thunk.cc',
'thunk/ppb_find_thunk.cc',
+ 'thunk/ppb_flash_fullscreen_thunk.cc',
'thunk/ppb_flash_menu_api.h',
'thunk/ppb_flash_menu_thunk.cc',
'thunk/ppb_flash_net_connector_api.h',
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index 2ced0fd..afec017 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -41,6 +41,7 @@
#include "ppapi/c/private/ppb_flash.h"
#include "ppapi/c/private/ppb_flash_clipboard.h"
#include "ppapi/c/private/ppb_flash_file.h"
+#include "ppapi/c/private/ppb_flash_fullscreen.h"
#include "ppapi/c/private/ppb_flash_menu.h"
#include "ppapi/c/private/ppb_flash_net_connector.h"
#include "ppapi/c/private/ppb_flash_tcp_socket.h"
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index ac7992d..cd54b60 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -822,11 +822,11 @@ IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBInstance_LogWithSource,
int /* log_level */,
ppapi::proxy::SerializedVar /* source */,
ppapi::proxy::SerializedVar /* value */)
-IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_SetFullscreen,
+IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBInstance_FlashSetFullscreen,
PP_Instance /* instance */,
PP_Bool /* fullscreen */,
PP_Bool /* result */)
-IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetScreenSize,
+IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_FlashGetScreenSize,
PP_Instance /* instance */,
PP_Bool /* result */,
PP_Size /* size */)
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index e08e73a..21a429a 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -4,7 +4,6 @@
#include "ppapi/proxy/ppb_instance_proxy.h"
-#include "ppapi/c/dev/ppb_fullscreen_dev.h"
#include "ppapi/c/dev/ppb_mouse_lock_dev.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_var.h"
@@ -84,10 +83,10 @@ bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgLogWithSource)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage,
OnMsgPostMessage)
- IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen,
- OnMsgSetFullscreen)
- IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetScreenSize,
- OnMsgGetScreenSize)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashSetFullscreen,
+ OnMsgFlashSetFullscreen)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashGetScreenSize,
+ OnMsgFlashGetScreenSize)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents,
OnMsgRequestInputEvents)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents,
@@ -182,7 +181,7 @@ void PPB_Instance_Proxy::SelectedFindResultChanged(PP_Instance instance,
NOTIMPLEMENTED(); // Not proxied yet.
}
-PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) {
+PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) {
InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
GetInstanceData(instance);
if (!data)
@@ -190,18 +189,18 @@ PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) {
return data->fullscreen;
}
-PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance,
- PP_Bool fullscreen) {
+PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen) {
PP_Bool result = PP_FALSE;
- dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen(
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashSetFullscreen(
INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result));
return result;
}
-PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance,
- PP_Size* size) {
+PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance,
+ PP_Size* size) {
PP_Bool result = PP_FALSE;
- dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize(
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashGetScreenSize(
INTERFACE_ID_PPB_INSTANCE, instance, &result, size));
return result;
}
@@ -350,20 +349,20 @@ void PPB_Instance_Proxy::OnMsgLogWithSource(PP_Instance instance,
}
}
-void PPB_Instance_Proxy::OnMsgSetFullscreen(PP_Instance instance,
- PP_Bool fullscreen,
- PP_Bool* result) {
+void PPB_Instance_Proxy::OnMsgFlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen,
+ PP_Bool* result) {
EnterInstanceNoLock enter(instance, false);
if (enter.succeeded())
- *result = enter.functions()->SetFullscreen(instance, fullscreen);
+ *result = enter.functions()->FlashSetFullscreen(instance, fullscreen);
}
-void PPB_Instance_Proxy::OnMsgGetScreenSize(PP_Instance instance,
- PP_Bool* result,
- PP_Size* size) {
+void PPB_Instance_Proxy::OnMsgFlashGetScreenSize(PP_Instance instance,
+ PP_Bool* result,
+ PP_Size* size) {
EnterInstanceNoLock enter(instance, false);
if (enter.succeeded())
- *result = enter.functions()->GetScreenSize(instance, size);
+ *result = enter.functions()->FlashGetScreenSize(instance, size);
}
void PPB_Instance_Proxy::OnMsgRequestInputEvents(PP_Instance instance,
diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h
index 74784a1..15d7b4e 100644
--- a/ppapi/proxy/ppb_instance_proxy.h
+++ b/ppapi/proxy/ppb_instance_proxy.h
@@ -57,10 +57,11 @@ class PPB_Instance_Proxy : public InterfaceProxy,
PP_Bool final_result) OVERRIDE;
virtual void SelectedFindResultChanged(PP_Instance instance,
int32_t index) OVERRIDE;
- virtual PP_Bool IsFullscreen(PP_Instance instance) OVERRIDE;
- virtual PP_Bool SetFullscreen(PP_Instance instance,
- PP_Bool fullscreen) OVERRIDE;
- virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE;
+ virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE;
+ virtual PP_Bool FlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen) OVERRIDE;
+ virtual PP_Bool FlashGetScreenSize(PP_Instance instance,
+ PP_Size* size) OVERRIDE;
virtual int32_t RequestInputEvents(PP_Instance instance,
uint32_t event_classes) OVERRIDE;
virtual int32_t RequestFilteringInputEvents(PP_Instance instance,
@@ -100,12 +101,12 @@ class PPB_Instance_Proxy : public InterfaceProxy,
int log_level,
SerializedVarReceiveInput source,
SerializedVarReceiveInput value);
- void OnMsgSetFullscreen(PP_Instance instance,
- PP_Bool fullscreen,
- PP_Bool* result);
- void OnMsgGetScreenSize(PP_Instance instance,
- PP_Bool* result,
- PP_Size* size);
+ void OnMsgFlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen,
+ PP_Bool* result);
+ void OnMsgFlashGetScreenSize(PP_Instance instance,
+ PP_Bool* result,
+ PP_Size* size);
void OnMsgRequestInputEvents(PP_Instance instance,
bool is_filtering,
uint32_t event_classes);
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index aa4b7e7..19b23f8 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_proxy.cc
@@ -6,10 +6,10 @@
#include <algorithm>
-#include "ppapi/c/dev/ppb_fullscreen_dev.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppp_instance.h"
+#include "ppapi/c/private/ppb_flash_fullscreen.h"
#include "ppapi/proxy/host_dispatcher.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/plugin_resource_tracker.h"
@@ -48,9 +48,9 @@ void DidChangeView(PP_Instance instance,
const PP_Rect* position,
const PP_Rect* clip) {
HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
- const PPB_Fullscreen_Dev* fullscreen_interface =
- static_cast<const PPB_Fullscreen_Dev*>(
- dispatcher->local_get_interface()(PPB_FULLSCREEN_DEV_INTERFACE));
+ const PPB_FlashFullscreen* fullscreen_interface =
+ static_cast<const PPB_FlashFullscreen*>(
+ dispatcher->local_get_interface()(PPB_FLASHFULLSCREEN_INTERFACE));
DCHECK(fullscreen_interface);
PP_Bool fullscreen = fullscreen_interface->IsFullscreen(instance);
dispatcher->Send(
diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h
index efd8561..c42a820 100644
--- a/ppapi/tests/all_cpp_includes.h
+++ b/ppapi/tests/all_cpp_includes.h
@@ -49,6 +49,7 @@
#include "ppapi/cpp/non_thread_safe_ref_count.h"
#include "ppapi/cpp/paint_aggregator.h"
#include "ppapi/cpp/paint_manager.h"
+#include "ppapi/cpp/private/flash_fullscreen.h"
#include "ppapi/cpp/private/instance_private.h"
#include "ppapi/cpp/point.h"
#include "ppapi/cpp/rect.h"
diff --git a/ppapi/tests/testing_instance.cc b/ppapi/tests/testing_instance.cc
index 2f925bc..9332bbc 100644
--- a/ppapi/tests/testing_instance.cc
+++ b/ppapi/tests/testing_instance.cc
@@ -78,7 +78,8 @@ pp::Var TestingInstance::GetInstanceObject() {
#endif
void TestingInstance::HandleMessage(const pp::Var& message_data) {
- current_case_->HandleMessage(message_data);
+ if (current_case_)
+ current_case_->HandleMessage(message_data);
}
void TestingInstance::DidChangeView(const pp::Rect& position,
@@ -89,7 +90,8 @@ void TestingInstance::DidChangeView(const pp::Rect& position,
0,
callback_factory_.NewCallback(&TestingInstance::ExecuteTests));
}
- current_case_->DidChangeView(position, clip);
+ if (current_case_)
+ current_case_->DidChangeView(position, clip);
}
void TestingInstance::LogTest(const std::string& test_name,
diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h
index 19e9065..f276315 100644
--- a/ppapi/thunk/interfaces_ppb_private.h
+++ b/ppapi/thunk/interfaces_ppb_private.h
@@ -9,6 +9,7 @@
PROXIED_API(PPB_Broker)
-PROXIED_IFACE(PPB_Broker, PPB_BROKER_TRUSTED_INTERFACE_0_2, PPB_Broker)
+PROXIED_IFACE(PPB_Broker, PPB_BROKER_TRUSTED_INTERFACE_0_2, PPB_BrokerTrusted)
+PROXIED_IFACE(PPB_Instance, PPB_FLASHFULLSCREEN_INTERFACE, PPB_FlashFullscreen)
#include "ppapi/thunk/interfaces_postamble.h"
diff --git a/ppapi/thunk/ppb_broker_thunk.cc b/ppapi/thunk/ppb_broker_thunk.cc
index 1bfcea0..c6c1cd1 100644
--- a/ppapi/thunk/ppb_broker_thunk.cc
+++ b/ppapi/thunk/ppb_broker_thunk.cc
@@ -52,7 +52,7 @@ const PPB_BrokerTrusted g_ppb_broker_thunk = {
} // namespace
-const PPB_BrokerTrusted* GetPPB_Broker_Thunk() {
+const PPB_BrokerTrusted* GetPPB_BrokerTrusted_Thunk() {
return &g_ppb_broker_thunk;
}
diff --git a/ppapi/thunk/ppb_flash_fullscreen_thunk.cc b/ppapi/thunk/ppb_flash_fullscreen_thunk.cc
new file mode 100644
index 0000000..594089e
--- /dev/null
+++ b/ppapi/thunk/ppb_flash_fullscreen_thunk.cc
@@ -0,0 +1,51 @@
+// 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/c/dev/ppb_fullscreen_dev.h"
+#include "ppapi/c/private/ppb_flash_fullscreen.h"
+#include "ppapi/thunk/thunk.h"
+#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_instance_api.h"
+#include "ppapi/thunk/resource_creation_api.h"
+
+namespace ppapi {
+namespace thunk {
+
+namespace {
+
+PP_Bool IsFullscreen(PP_Instance instance) {
+ EnterInstance enter(instance);
+ if (enter.failed())
+ return PP_FALSE;
+ return enter.functions()->FlashIsFullscreen(instance);
+}
+
+PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) {
+ EnterInstance enter(instance);
+ if (enter.failed())
+ return PP_FALSE;
+ return enter.functions()->FlashSetFullscreen(instance, fullscreen);
+}
+
+PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) {
+ EnterInstance enter(instance);
+ if (enter.failed())
+ return PP_FALSE;
+ return enter.functions()->FlashGetScreenSize(instance, size);
+}
+
+const PPB_FlashFullscreen g_ppb_flash_fullscreen_thunk = {
+ &IsFullscreen,
+ &SetFullscreen,
+ &GetScreenSize
+};
+
+} // namespace
+
+const PPB_FlashFullscreen* GetPPB_FlashFullscreen_Thunk() {
+ return &g_ppb_flash_fullscreen_thunk;
+}
+
+} // namespace thunk
+} // namespace ppapi
diff --git a/ppapi/thunk/ppb_fullscreen_thunk.cc b/ppapi/thunk/ppb_fullscreen_thunk.cc
index 72081f5..bac3b7a 100644
--- a/ppapi/thunk/ppb_fullscreen_thunk.cc
+++ b/ppapi/thunk/ppb_fullscreen_thunk.cc
@@ -17,21 +17,21 @@ PP_Bool IsFullscreen(PP_Instance instance) {
EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->IsFullscreen(instance);
+ return enter.functions()->FlashIsFullscreen(instance);
}
PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) {
EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->SetFullscreen(instance, fullscreen);
+ return enter.functions()->FlashSetFullscreen(instance, fullscreen);
}
PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) {
EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true);
if (enter.failed())
return PP_FALSE;
- return enter.functions()->GetScreenSize(instance, size);
+ return enter.functions()->FlashGetScreenSize(instance, size);
}
const PPB_Fullscreen_Dev g_ppb_fullscreen_thunk = {
diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h
index 0af3f91..598b951 100644
--- a/ppapi/thunk/ppb_instance_api.h
+++ b/ppapi/thunk/ppb_instance_api.h
@@ -45,10 +45,11 @@ class PPB_Instance_FunctionAPI {
virtual void SelectedFindResultChanged(PP_Instance instance,
int32_t index) = 0;
- // Fullscreen.
- virtual PP_Bool IsFullscreen(PP_Instance instance) = 0;
- virtual PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) = 0;
- virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) = 0;
+ // FlashFullscreen.
+ virtual PP_Bool FlashIsFullscreen(PP_Instance instance) = 0;
+ virtual PP_Bool FlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen) = 0;
+ virtual PP_Bool FlashGetScreenSize(PP_Instance instance, PP_Size* size) = 0;
// InputEvent.
virtual int32_t RequestInputEvents(PP_Instance instance,
diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h
index c10c248..e33a5ee 100644
--- a/ppapi/thunk/thunk.h
+++ b/ppapi/thunk/thunk.h
@@ -19,6 +19,7 @@
#define PROXIED_IFACE IFACE
#define UNPROXIED_IFACE IFACE
+#include "ppapi/thunk/interfaces_ppb_private.h"
#include "ppapi/thunk/interfaces_ppb_public_stable.h"
#include "ppapi/thunk/interfaces_ppb_public_dev.h"
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index a5dc215..f3c92bb 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -64,6 +64,7 @@
#include "ppapi/c/private/ppb_flash.h"
#include "ppapi/c/private/ppb_flash_clipboard.h"
#include "ppapi/c/private/ppb_flash_file.h"
+#include "ppapi/c/private/ppb_flash_fullscreen.h"
#include "ppapi/c/private/ppb_flash_tcp_socket.h"
#include "ppapi/c/private/ppb_gpu_blacklist_private.h"
#include "ppapi/c/private/ppb_instance_private.h"
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 2e099c0..13934ef 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -11,7 +11,6 @@
#include "base/utf_string_conversions.h"
#include "ppapi/c/dev/ppb_console_dev.h"
#include "ppapi/c/dev/ppb_find_dev.h"
-#include "ppapi/c/dev/ppb_fullscreen_dev.h"
#include "ppapi/c/dev/ppb_memory_dev.h"
#include "ppapi/c/dev/ppb_zoom_dev.h"
#include "ppapi/c/dev/ppp_find_dev.h"
@@ -1506,17 +1505,18 @@ void PluginInstance::SelectedFindResultChanged(PP_Instance instance,
delegate_->SelectedFindResultChanged(find_identifier_, index);
}
-PP_Bool PluginInstance::IsFullscreen(PP_Instance instance) {
+PP_Bool PluginInstance::FlashIsFullscreen(PP_Instance instance) {
return PP_FromBool(fullscreen_);
}
-PP_Bool PluginInstance::SetFullscreen(PP_Instance instance,
- PP_Bool fullscreen) {
+PP_Bool PluginInstance::FlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen) {
SetFullscreen(PP_ToBool(fullscreen), true);
return PP_TRUE;
}
-PP_Bool PluginInstance::GetScreenSize(PP_Instance instance, PP_Size* size) {
+PP_Bool PluginInstance::FlashGetScreenSize(PP_Instance instance,
+ PP_Size* size) {
gfx::Size screen_size = delegate()->GetScreenSize();
*size = PP_MakeSize(screen_size.width(), screen_size.height());
return PP_TRUE;
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index 54a2b90..346e157 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -274,10 +274,11 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
PP_Bool final_result) OVERRIDE;
virtual void SelectedFindResultChanged(PP_Instance instance,
int32_t index) OVERRIDE;
- virtual PP_Bool IsFullscreen(PP_Instance instance) OVERRIDE;
- virtual PP_Bool SetFullscreen(PP_Instance instance,
- PP_Bool fullscreen) OVERRIDE;
- virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE;
+ virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE;
+ virtual PP_Bool FlashSetFullscreen(PP_Instance instance,
+ PP_Bool fullscreen) OVERRIDE;
+ virtual PP_Bool FlashGetScreenSize(PP_Instance instance,
+ PP_Size* size) OVERRIDE;
virtual int32_t RequestInputEvents(PP_Instance instance,
uint32_t event_classes) OVERRIDE;
virtual int32_t RequestFilteringInputEvents(PP_Instance instance,