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

Unified Diff: chrome/renderer/pepper/pepper_flash_fullscreen_host.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 | « chrome/renderer/pepper/pepper_flash_fullscreen_host.h ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/pepper/pepper_flash_fullscreen_host.cc
diff --git a/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc b/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..45ca836bb1dd49a83f7e4d880f79f264bcdde813
--- /dev/null
+++ b/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc
@@ -0,0 +1,52 @@
+// Copyright (c) 2012 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 "chrome/renderer/pepper/pepper_flash_fullscreen_host.h"
+
+#include "content/public/renderer/renderer_ppapi_host.h"
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/host/dispatch_host_message.h"
+#include "ppapi/host/host_message_context.h"
+#include "ppapi/host/ppapi_host.h"
+#include "ppapi/proxy/ppapi_messages.h"
+#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+
+namespace chrome {
+
+PepperFlashFullscreenHost::PepperFlashFullscreenHost(
+ content::RendererPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource)
+ : ResourceHost(host->GetPpapiHost(), instance, resource),
+ renderer_ppapi_host_(host) {
+}
+
+PepperFlashFullscreenHost::~PepperFlashFullscreenHost() {
+}
+
+int32_t PepperFlashFullscreenHost::OnResourceMessageReceived(
+ const IPC::Message& msg,
+ ppapi::host::HostMessageContext* context) {
+ IPC_BEGIN_MESSAGE_MAP(PepperFlashFullscreenHost, msg)
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL(
+ PpapiHostMsg_FlashFullscreen_SetFullscreen,
+ OnMsgSetFullscreen)
+ IPC_END_MESSAGE_MAP()
+ return PP_ERROR_FAILED;
+}
+
+int32_t PepperFlashFullscreenHost::OnMsgSetFullscreen(
+ ppapi::host::HostMessageContext* context,
+ bool fullscreen) {
+ webkit::ppapi::PluginInstance* plugin_instance =
+ renderer_ppapi_host_->GetPluginInstance(pp_instance());
+ if (plugin_instance) {
+ plugin_instance->FlashSetFullscreen(fullscreen, true);
+ return PP_OK;
+ }
+ return PP_ERROR_FAILED;
+}
+
+} // namespace chrome
+
« no previous file with comments | « chrome/renderer/pepper/pepper_flash_fullscreen_host.h ('k') | chrome/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698