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

Side by Side Diff: ppapi/proxy/ppb_fullscreen_proxy.cc

Issue 6282007: First pass at making the proxy handle multiple renderers. This associates the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_font_proxy.cc ('k') | ppapi/proxy/ppb_graphics_2d_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppb_fullscreen_proxy.h" 5 #include "ppapi/proxy/ppb_fullscreen_proxy.h"
6 6
7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" 7 #include "ppapi/c/dev/ppb_fullscreen_dev.h"
8 #include "ppapi/proxy/plugin_dispatcher.h" 8 #include "ppapi/proxy/plugin_dispatcher.h"
9 #include "ppapi/proxy/ppapi_messages.h" 9 #include "ppapi/proxy/ppapi_messages.h"
10 10
11 namespace pp { 11 namespace pp {
12 namespace proxy { 12 namespace proxy {
13 13
14 namespace { 14 namespace {
15 15
16 PP_Bool IsFullscreen(PP_Instance instance) { 16 PP_Bool IsFullscreen(PP_Instance instance) {
17 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
18 if (!dispatcher)
19 return PP_FALSE;
20
17 PP_Bool result = PP_FALSE; 21 PP_Bool result = PP_FALSE;
18 PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFullscreen_IsFullscreen( 22 dispatcher->Send(new PpapiHostMsg_PPBFullscreen_IsFullscreen(
19 INTERFACE_ID_PPB_FULLSCREEN, instance, &result)); 23 INTERFACE_ID_PPB_FULLSCREEN, instance, &result));
20 return result; 24 return result;
21 } 25 }
22 26
23 PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) { 27 PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) {
28 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
29 if (!dispatcher)
30 return PP_FALSE;
31
24 PP_Bool result = PP_FALSE; 32 PP_Bool result = PP_FALSE;
25 PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFullscreen_SetFullscreen( 33 dispatcher->Send(new PpapiHostMsg_PPBFullscreen_SetFullscreen(
26 INTERFACE_ID_PPB_FULLSCREEN, instance, fullscreen, &result)); 34 INTERFACE_ID_PPB_FULLSCREEN, instance, fullscreen, &result));
27 return result; 35 return result;
28 } 36 }
29 37
30 const PPB_Fullscreen_Dev ppb_fullscreen = { 38 const PPB_Fullscreen_Dev ppb_fullscreen = {
31 &IsFullscreen, 39 &IsFullscreen,
32 &SetFullscreen 40 &SetFullscreen
33 }; 41 };
34 42
35 } // namespace 43 } // namespace
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 77 }
70 78
71 void PPB_Fullscreen_Proxy::OnMsgSetFullscreen(PP_Instance instance, 79 void PPB_Fullscreen_Proxy::OnMsgSetFullscreen(PP_Instance instance,
72 PP_Bool fullscreen, 80 PP_Bool fullscreen,
73 PP_Bool* result) { 81 PP_Bool* result) {
74 *result = ppb_fullscreen_target()->SetFullscreen(instance, fullscreen); 82 *result = ppb_fullscreen_target()->SetFullscreen(instance, fullscreen);
75 } 83 }
76 84
77 } // namespace proxy 85 } // namespace proxy
78 } // namespace pp 86 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_font_proxy.cc ('k') | ppapi/proxy/ppb_graphics_2d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698