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

Side by Side Diff: ppapi/cpp/dev/scrollbar_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/graphics_3d_dev.cc ('k') | ppapi/cpp/dev/selection_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 <vector> 5 #include <vector>
6 6
7 #include "ppapi/cpp/dev/scrollbar_dev.h" 7 #include "ppapi/cpp/dev/scrollbar_dev.h"
8 8
9 #include "ppapi/cpp/common.h"
9 #include "ppapi/cpp/instance.h" 10 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h" 11 #include "ppapi/cpp/module.h"
11 #include "ppapi/cpp/module_impl.h" 12 #include "ppapi/cpp/module_impl.h"
12 #include "ppapi/cpp/rect.h" 13 #include "ppapi/cpp/rect.h"
13 14
14 namespace { 15 namespace {
15 16
16 DeviceFuncs<PPB_Scrollbar_Dev> scrollbar_f(PPB_SCROLLBAR_DEV_INTERFACE); 17 DeviceFuncs<PPB_Scrollbar_Dev> scrollbar_f(PPB_SCROLLBAR_DEV_INTERFACE);
17 18
18 } // namespace 19 } // namespace
19 20
20 namespace pp { 21 namespace pp {
21 22
22 Scrollbar_Dev::Scrollbar_Dev(PP_Resource resource) : Widget_Dev(resource) { 23 Scrollbar_Dev::Scrollbar_Dev(PP_Resource resource) : Widget_Dev(resource) {
23 } 24 }
24 25
25 Scrollbar_Dev::Scrollbar_Dev(const Instance& instance, bool vertical) { 26 Scrollbar_Dev::Scrollbar_Dev(const Instance& instance, bool vertical) {
26 if (!scrollbar_f) 27 if (!scrollbar_f)
27 return; 28 return;
28 PassRefFromConstructor(scrollbar_f->Create(instance.pp_instance(), vertical)); 29 PassRefFromConstructor(scrollbar_f->Create(instance.pp_instance(),
30 BoolToPPBool(vertical)));
29 } 31 }
30 32
31 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) 33 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other)
32 : Widget_Dev(other) { 34 : Widget_Dev(other) {
33 } 35 }
34 36
35 Scrollbar_Dev& Scrollbar_Dev::operator=(const Scrollbar_Dev& other) { 37 Scrollbar_Dev& Scrollbar_Dev::operator=(const Scrollbar_Dev& other) {
36 Scrollbar_Dev copy(other); 38 Scrollbar_Dev copy(other);
37 swap(copy); 39 swap(copy);
38 return *this; 40 return *this;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 77
76 scrollbar_f->SetTickMarks(pp_resource(), count ? &temp[0] : NULL, count); 78 scrollbar_f->SetTickMarks(pp_resource(), count ? &temp[0] : NULL, count);
77 } 79 }
78 80
79 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { 81 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) {
80 if (scrollbar_f) 82 if (scrollbar_f)
81 scrollbar_f->ScrollBy(pp_resource(), unit, multiplier); 83 scrollbar_f->ScrollBy(pp_resource(), unit, multiplier);
82 } 84 }
83 85
84 } // namespace pp 86 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/graphics_3d_dev.cc ('k') | ppapi/cpp/dev/selection_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698