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

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

Issue 7826017: Add PPB_Fullscreen;0.5. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_instance_proxy.h ('k') | ppapi/proxy/ppp_instance_proxy.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_instance_proxy.h" 5 #include "ppapi/proxy/ppb_instance_proxy.h"
6 6
7 #include "ppapi/c/dev/ppb_mouse_lock_dev.h" 7 #include "ppapi/c/dev/ppb_mouse_lock_dev.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/pp_var.h" 9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/ppb_instance.h" 10 #include "ppapi/c/ppb_instance.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_Log, 80 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_Log,
81 OnMsgLog) 81 OnMsgLog)
82 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_LogWithSource, 82 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_LogWithSource,
83 OnMsgLogWithSource) 83 OnMsgLogWithSource)
84 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage, 84 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage,
85 OnMsgPostMessage) 85 OnMsgPostMessage)
86 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashSetFullscreen, 86 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashSetFullscreen,
87 OnMsgFlashSetFullscreen) 87 OnMsgFlashSetFullscreen)
88 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashGetScreenSize, 88 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_FlashGetScreenSize,
89 OnMsgFlashGetScreenSize) 89 OnMsgFlashGetScreenSize)
90 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen,
91 OnMsgSetFullscreen)
92 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetScreenSize,
93 OnMsgGetScreenSize)
90 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents, 94 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents,
91 OnMsgRequestInputEvents) 95 OnMsgRequestInputEvents)
92 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents, 96 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents,
93 OnMsgClearInputEvents) 97 OnMsgClearInputEvents)
94 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_LockMouse, 98 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_LockMouse,
95 OnMsgLockMouse) 99 OnMsgLockMouse)
96 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_UnlockMouse, 100 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_UnlockMouse,
97 OnMsgUnlockMouse) 101 OnMsgUnlockMouse)
98 IPC_MESSAGE_UNHANDLED(handled = false) 102 IPC_MESSAGE_UNHANDLED(handled = false)
99 IPC_END_MESSAGE_MAP() 103 IPC_END_MESSAGE_MAP()
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 int32_t total, 178 int32_t total,
175 PP_Bool final_result) { 179 PP_Bool final_result) {
176 NOTIMPLEMENTED(); // Not proxied yet. 180 NOTIMPLEMENTED(); // Not proxied yet.
177 } 181 }
178 182
179 void PPB_Instance_Proxy::SelectedFindResultChanged(PP_Instance instance, 183 void PPB_Instance_Proxy::SelectedFindResultChanged(PP_Instance instance,
180 int32_t index) { 184 int32_t index) {
181 NOTIMPLEMENTED(); // Not proxied yet. 185 NOTIMPLEMENTED(); // Not proxied yet.
182 } 186 }
183 187
184 PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) { 188 PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) {
185 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> 189 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
186 GetInstanceData(instance); 190 GetInstanceData(instance);
187 if (!data) 191 if (!data)
188 return PP_FALSE; 192 return PP_FALSE;
189 return data->fullscreen; 193 return data->fullscreen;
190 } 194 }
191 195
196 PP_Bool PPB_Instance_Proxy::FlashIsFullscreen(PP_Instance instance) {
197 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
198 GetInstanceData(instance);
199 if (!data)
200 return PP_FALSE;
201 return data->flash_fullscreen;
202 }
203
204 PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance,
205 PP_Bool fullscreen) {
206 PP_Bool result = PP_FALSE;
207 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen(
208 INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result));
209 return result;
210 }
211
192 PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance, 212 PP_Bool PPB_Instance_Proxy::FlashSetFullscreen(PP_Instance instance,
193 PP_Bool fullscreen) { 213 PP_Bool fullscreen) {
194 PP_Bool result = PP_FALSE; 214 PP_Bool result = PP_FALSE;
195 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashSetFullscreen( 215 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashSetFullscreen(
196 INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result)); 216 INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result));
197 return result; 217 return result;
198 } 218 }
199 219
220 PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance,
221 PP_Size* size) {
222 PP_Bool result = PP_FALSE;
223 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize(
224 INTERFACE_ID_PPB_INSTANCE, instance, &result, size));
225 return result;
226 }
227
200 PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance, 228 PP_Bool PPB_Instance_Proxy::FlashGetScreenSize(PP_Instance instance,
201 PP_Size* size) { 229 PP_Size* size) {
202 PP_Bool result = PP_FALSE; 230 PP_Bool result = PP_FALSE;
203 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashGetScreenSize( 231 dispatcher()->Send(new PpapiHostMsg_PPBInstance_FlashGetScreenSize(
204 INTERFACE_ID_PPB_INSTANCE, instance, &result, size)); 232 INTERFACE_ID_PPB_INSTANCE, instance, &result, size));
205 return result; 233 return result;
206 } 234 }
207 235
208 int32_t PPB_Instance_Proxy::RequestInputEvents(PP_Instance instance, 236 int32_t PPB_Instance_Proxy::RequestInputEvents(PP_Instance instance,
209 uint32_t event_classes) { 237 uint32_t event_classes) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 SerializedVarReceiveInput source, 370 SerializedVarReceiveInput source,
343 SerializedVarReceiveInput value) { 371 SerializedVarReceiveInput value) {
344 EnterInstanceNoLock enter(instance, false); 372 EnterInstanceNoLock enter(instance, false);
345 if (enter.succeeded()) { 373 if (enter.succeeded()) {
346 enter.functions()->LogWithSource(instance, log_level, 374 enter.functions()->LogWithSource(instance, log_level,
347 source.Get(dispatcher()), 375 source.Get(dispatcher()),
348 value.Get(dispatcher())); 376 value.Get(dispatcher()));
349 } 377 }
350 } 378 }
351 379
380 void PPB_Instance_Proxy::OnMsgSetFullscreen(PP_Instance instance,
381 PP_Bool fullscreen,
382 PP_Bool* result) {
383 EnterInstanceNoLock enter(instance, false);
384 if (enter.succeeded())
385 *result = enter.functions()->SetFullscreen(instance, fullscreen);
386 }
387
388
352 void PPB_Instance_Proxy::OnMsgFlashSetFullscreen(PP_Instance instance, 389 void PPB_Instance_Proxy::OnMsgFlashSetFullscreen(PP_Instance instance,
353 PP_Bool fullscreen, 390 PP_Bool fullscreen,
354 PP_Bool* result) { 391 PP_Bool* result) {
392 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
393 if (enter.succeeded())
394 *result = enter.functions()->FlashSetFullscreen(instance, fullscreen);
395 }
396
397 void PPB_Instance_Proxy::OnMsgGetScreenSize(PP_Instance instance,
398 PP_Bool* result,
399 PP_Size* size) {
355 EnterInstanceNoLock enter(instance, false); 400 EnterInstanceNoLock enter(instance, false);
356 if (enter.succeeded()) 401 if (enter.succeeded())
357 *result = enter.functions()->FlashSetFullscreen(instance, fullscreen); 402 *result = enter.functions()->GetScreenSize(instance, size);
358 } 403 }
359 404
360 void PPB_Instance_Proxy::OnMsgFlashGetScreenSize(PP_Instance instance, 405 void PPB_Instance_Proxy::OnMsgFlashGetScreenSize(PP_Instance instance,
361 PP_Bool* result, 406 PP_Bool* result,
362 PP_Size* size) { 407 PP_Size* size) {
363 EnterInstanceNoLock enter(instance, false); 408 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false);
364 if (enter.succeeded()) 409 if (enter.succeeded())
365 *result = enter.functions()->FlashGetScreenSize(instance, size); 410 *result = enter.functions()->FlashGetScreenSize(instance, size);
366 } 411 }
367 412
368 void PPB_Instance_Proxy::OnMsgRequestInputEvents(PP_Instance instance, 413 void PPB_Instance_Proxy::OnMsgRequestInputEvents(PP_Instance instance,
369 bool is_filtering, 414 bool is_filtering,
370 uint32_t event_classes) { 415 uint32_t event_classes) {
371 EnterInstanceNoLock enter(instance, false); 416 EnterInstanceNoLock enter(instance, false);
372 if (enter.succeeded()) { 417 if (enter.succeeded()) {
373 if (is_filtering) 418 if (is_filtering)
(...skipping 29 matching lines...) Expand all
403 } 448 }
404 449
405 void PPB_Instance_Proxy::OnMsgUnlockMouse(PP_Instance instance) { 450 void PPB_Instance_Proxy::OnMsgUnlockMouse(PP_Instance instance) {
406 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, true); 451 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, true);
407 if (enter.succeeded()) 452 if (enter.succeeded())
408 enter.functions()->UnlockMouse(instance); 453 enter.functions()->UnlockMouse(instance);
409 } 454 }
410 455
411 } // namespace proxy 456 } // namespace proxy
412 } // namespace ppapi 457 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/proxy/ppp_instance_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698