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

Side by Side Diff: ppapi/cpp/dev/fullscreen_dev.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/dev/font_dev.cc ('k') | ppapi/cpp/dev/graphics_3d_dev.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/cpp/dev/fullscreen_dev.h" 5 #include "ppapi/cpp/dev/fullscreen_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" 7 #include "ppapi/c/dev/ppb_fullscreen_dev.h"
8 #include "ppapi/cpp/common.h"
8 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
9 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
10 #include "ppapi/cpp/module_impl.h" 11 #include "ppapi/cpp/module_impl.h"
11 12
12 namespace pp { 13 namespace pp {
13 14
14 namespace { 15 namespace {
15 16
16 DeviceFuncs<PPB_Fullscreen_Dev> ppb_fullscreen_f(PPB_FULLSCREEN_DEV_INTERFACE); 17 DeviceFuncs<PPB_Fullscreen_Dev> ppb_fullscreen_f(PPB_FULLSCREEN_DEV_INTERFACE);
17 18
18 } // anonymous namespace 19 } // anonymous namespace
19 20
20 Fullscreen_Dev::Fullscreen_Dev(Instance* instance) 21 Fullscreen_Dev::Fullscreen_Dev(Instance* instance)
21 : associated_instance_(instance) { 22 : associated_instance_(instance) {
22 } 23 }
23 24
24 Fullscreen_Dev::~Fullscreen_Dev() { 25 Fullscreen_Dev::~Fullscreen_Dev() {
25 } 26 }
26 27
27 bool Fullscreen_Dev::IsFullscreen() { 28 bool Fullscreen_Dev::IsFullscreen() {
28 return ppb_fullscreen_f && ppb_fullscreen_f->IsFullscreen( 29 return ppb_fullscreen_f && ppb_fullscreen_f->IsFullscreen(
29 associated_instance_->pp_instance()); 30 associated_instance_->pp_instance());
30 } 31 }
31 32
32 bool Fullscreen_Dev::SetFullscreen(bool fullscreen) { 33 bool Fullscreen_Dev::SetFullscreen(bool fullscreen) {
33 if (!ppb_fullscreen_f) 34 if (!ppb_fullscreen_f)
34 return false; 35 return false;
35 return ppb_fullscreen_f->SetFullscreen(associated_instance_->pp_instance(), 36 return PPBoolToBool(
36 fullscreen); 37 ppb_fullscreen_f->SetFullscreen(associated_instance_->pp_instance(),
38 BoolToPPBool(fullscreen)));
37 } 39 }
38 40
39 } // namespace pp 41 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/font_dev.cc ('k') | ppapi/cpp/dev/graphics_3d_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698