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

Side by Side Diff: ppapi/proxy/flash_fullscreen_resource.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 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/flash_fullscreen_resource.h ('k') | ppapi/proxy/plugin_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ppapi/proxy/flash_fullscreen_resource.h"
6
7 #include "ppapi/c/pp_bool.h"
8 #include "ppapi/proxy/ppapi_messages.h"
9
10 namespace ppapi {
11 namespace proxy {
12
13 FlashFullscreenResource::FlashFullscreenResource(Connection connection,
14 PP_Instance instance)
15 : PluginResource(connection, instance),
16 is_fullscreen_(PP_FALSE) {
17 }
18
19 FlashFullscreenResource::~FlashFullscreenResource() {
20 }
21
22 thunk::PPB_Flash_Fullscreen_API*
23 FlashFullscreenResource::AsPPB_Flash_Fullscreen_API() {
24 return this;
25 }
26
27 PP_Bool FlashFullscreenResource::IsFullscreen(PP_Instance instance) {
28 return is_fullscreen_;
29 }
30
31 PP_Bool FlashFullscreenResource::SetFullscreen(PP_Instance instance,
32 PP_Bool fullscreen) {
33 if (!sent_create_to_renderer())
34 SendCreate(RENDERER, PpapiHostMsg_FlashFullscreen_Create());
35 int32_t result = SyncCall<IPC::Message>(RENDERER,
36 PpapiHostMsg_FlashFullscreen_SetFullscreen(PP_ToBool(fullscreen)));
37 return PP_FromBool(result == PP_OK);
38 }
39
40 void FlashFullscreenResource::SetLocalIsFullscreen(PP_Instance instance,
41 PP_Bool is_fullscreen) {
42 is_fullscreen_ = is_fullscreen;
43 }
44
45 } // namespace proxy
46 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/flash_fullscreen_resource.h ('k') | ppapi/proxy/plugin_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698