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

Side by Side Diff: ppapi/cpp/dev/zoom_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/widget_dev.cc ('k') | ppapi/cpp/graphics_2d.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/zoom_dev.h" 5 #include "ppapi/cpp/dev/zoom_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_zoom_dev.h" 7 #include "ppapi/c/dev/ppb_zoom_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 static const char kPPPZoomInterface[] = PPP_ZOOM_DEV_INTERFACE; 17 static const char kPPPZoomInterface[] = PPP_ZOOM_DEV_INTERFACE;
17 18
18 void Zoom(PP_Instance instance, 19 void Zoom(PP_Instance instance,
19 double factor, 20 double factor,
20 bool text_only) { 21 PP_Bool text_only) {
21 void* object = 22 void* object =
22 pp::Instance::GetPerInstanceObject(instance, kPPPZoomInterface); 23 pp::Instance::GetPerInstanceObject(instance, kPPPZoomInterface);
23 if (!object) 24 if (!object)
24 return; 25 return;
25 static_cast<Zoom_Dev*>(object)->Zoom(factor, text_only); 26 static_cast<Zoom_Dev*>(object)->Zoom(factor,
27 PPBoolToBool(text_only));
26 } 28 }
27 29
28 const PPP_Zoom_Dev ppp_zoom = { 30 const PPP_Zoom_Dev ppp_zoom = {
29 &Zoom 31 &Zoom
30 }; 32 };
31 33
32 DeviceFuncs<PPB_Zoom_Dev> ppb_zoom_f(PPB_ZOOM_DEV_INTERFACE); 34 DeviceFuncs<PPB_Zoom_Dev> ppb_zoom_f(PPB_ZOOM_DEV_INTERFACE);
33 35
34 } // namespace 36 } // namespace
35 37
(...skipping 13 matching lines...) Expand all
49 51
50 void Zoom_Dev::ZoomLimitsChanged(double minimum_factor, 52 void Zoom_Dev::ZoomLimitsChanged(double minimum_factor,
51 double maximium_factor) { 53 double maximium_factor) {
52 if (!ppb_zoom_f) 54 if (!ppb_zoom_f)
53 return; 55 return;
54 ppb_zoom_f->ZoomLimitsChanged( 56 ppb_zoom_f->ZoomLimitsChanged(
55 associated_instance_->pp_instance(), minimum_factor, maximium_factor); 57 associated_instance_->pp_instance(), minimum_factor, maximium_factor);
56 } 58 }
57 59
58 } // namespace pp 60 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/widget_dev.cc ('k') | ppapi/cpp/graphics_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698