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

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

Issue 5539001: Remove all the swap() stuff in the PPAPI C++ wrappers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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/cpp/dev/scrollbar_dev.h ('k') | ppapi/cpp/dev/video_decoder_dev.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) 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/common.h"
10 #include "ppapi/cpp/instance.h" 10 #include "ppapi/cpp/instance.h"
(...skipping 17 matching lines...) Expand all
28 return; 28 return;
29 PassRefFromConstructor(scrollbar_f->Create(instance.pp_instance(), 29 PassRefFromConstructor(scrollbar_f->Create(instance.pp_instance(),
30 BoolToPPBool(vertical))); 30 BoolToPPBool(vertical)));
31 } 31 }
32 32
33 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) 33 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other)
34 : Widget_Dev(other) { 34 : Widget_Dev(other) {
35 } 35 }
36 36
37 Scrollbar_Dev& Scrollbar_Dev::operator=(const Scrollbar_Dev& other) { 37 Scrollbar_Dev& Scrollbar_Dev::operator=(const Scrollbar_Dev& other) {
38 Scrollbar_Dev copy(other); 38 Resource::operator=(other);
39 swap(copy);
40 return *this; 39 return *this;
41 } 40 }
42 41
43 void Scrollbar_Dev::swap(Scrollbar_Dev& other) {
44 Resource::swap(other);
45 }
46
47 uint32_t Scrollbar_Dev::GetThickness() { 42 uint32_t Scrollbar_Dev::GetThickness() {
48 if (!scrollbar_f) 43 if (!scrollbar_f)
49 return 0; 44 return 0;
50 return scrollbar_f->GetThickness(); 45 return scrollbar_f->GetThickness();
51 } 46 }
52 47
53 uint32_t Scrollbar_Dev::GetValue() { 48 uint32_t Scrollbar_Dev::GetValue() {
54 if (!scrollbar_f) 49 if (!scrollbar_f)
55 return 0; 50 return 0;
56 return scrollbar_f->GetValue(pp_resource()); 51 return scrollbar_f->GetValue(pp_resource());
(...skipping 20 matching lines...) Expand all
77 72
78 scrollbar_f->SetTickMarks(pp_resource(), count ? &temp[0] : NULL, count); 73 scrollbar_f->SetTickMarks(pp_resource(), count ? &temp[0] : NULL, count);
79 } 74 }
80 75
81 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { 76 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) {
82 if (scrollbar_f) 77 if (scrollbar_f)
83 scrollbar_f->ScrollBy(pp_resource(), unit, multiplier); 78 scrollbar_f->ScrollBy(pp_resource(), unit, multiplier);
84 } 79 }
85 80
86 } // namespace pp 81 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/scrollbar_dev.h ('k') | ppapi/cpp/dev/video_decoder_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698