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

Side by Side Diff: ppapi/cpp/dev/video_decoder_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/video_decoder_dev.h ('k') | ppapi/cpp/dev/widget_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 "ppapi/cpp/dev/video_decoder_dev.h" 5 #include "ppapi/cpp/dev/video_decoder_dev.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/cpp/common.h" 8 #include "ppapi/cpp/common.h"
9 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
(...skipping 19 matching lines...) Expand all
30 return; 30 return;
31 PassRefFromConstructor(video_decoder_f->Create(instance.pp_instance(), 31 PassRefFromConstructor(video_decoder_f->Create(instance.pp_instance(),
32 &decoder_config)); 32 &decoder_config));
33 } 33 }
34 34
35 VideoDecoder_Dev::VideoDecoder_Dev(const VideoDecoder_Dev& other) 35 VideoDecoder_Dev::VideoDecoder_Dev(const VideoDecoder_Dev& other)
36 : Resource(other) { 36 : Resource(other) {
37 } 37 }
38 38
39 VideoDecoder_Dev& VideoDecoder_Dev::operator=(const VideoDecoder_Dev& other) { 39 VideoDecoder_Dev& VideoDecoder_Dev::operator=(const VideoDecoder_Dev& other) {
40 VideoDecoder_Dev copy(other); 40 Resource::operator=(other);
41 swap(copy);
42 return *this; 41 return *this;
43 } 42 }
44 43
45 void VideoDecoder_Dev::swap(VideoDecoder_Dev& other) {
46 Resource::swap(other);
47 }
48
49 // static 44 // static
50 bool VideoDecoder_Dev::GetConfig(const Instance& instance, 45 bool VideoDecoder_Dev::GetConfig(const Instance& instance,
51 PP_VideoCodecId_Dev codec, 46 PP_VideoCodecId_Dev codec,
52 PP_VideoConfig_Dev* configs, 47 PP_VideoConfig_Dev* configs,
53 int32_t config_size, 48 int32_t config_size,
54 int32_t* num_config) { 49 int32_t* num_config) {
55 if (!video_decoder_f) 50 if (!video_decoder_f)
56 return false; 51 return false;
57 return PPBoolToBool(video_decoder_f->GetConfig(instance.pp_instance(), 52 return PPBoolToBool(video_decoder_f->GetConfig(instance.pp_instance(),
58 codec, 53 codec,
(...skipping 17 matching lines...) Expand all
76 bool VideoDecoder_Dev::ReturnUncompressedDataBuffer( 71 bool VideoDecoder_Dev::ReturnUncompressedDataBuffer(
77 PP_VideoUncompressedDataBuffer_Dev& buffer) { 72 PP_VideoUncompressedDataBuffer_Dev& buffer) {
78 if (!video_decoder_f || !pp_resource()) 73 if (!video_decoder_f || !pp_resource())
79 return false; 74 return false;
80 return PPBoolToBool( 75 return PPBoolToBool(
81 video_decoder_f->ReturnUncompressedDataBuffer(pp_resource(), 76 video_decoder_f->ReturnUncompressedDataBuffer(pp_resource(),
82 &buffer)); 77 &buffer));
83 } 78 }
84 79
85 } // namespace pp 80 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/video_decoder_dev.h ('k') | ppapi/cpp/dev/widget_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698