| OLD | NEW |
| 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/directory_reader_dev.h" | 5 #include "ppapi/cpp/dev/directory_reader_dev.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/cpp/completion_callback.h" | 8 #include "ppapi/cpp/completion_callback.h" |
| 9 #include "ppapi/cpp/dev/directory_entry_dev.h" | 9 #include "ppapi/cpp/dev/directory_entry_dev.h" |
| 10 #include "ppapi/cpp/dev/file_ref_dev.h" | 10 #include "ppapi/cpp/dev/file_ref_dev.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 PassRefFromConstructor( | 26 PassRefFromConstructor( |
| 27 directory_reader_f->Create(directory_ref.pp_resource())); | 27 directory_reader_f->Create(directory_ref.pp_resource())); |
| 28 } | 28 } |
| 29 | 29 |
| 30 DirectoryReader_Dev::DirectoryReader_Dev(const DirectoryReader_Dev& other) | 30 DirectoryReader_Dev::DirectoryReader_Dev(const DirectoryReader_Dev& other) |
| 31 : Resource(other) { | 31 : Resource(other) { |
| 32 } | 32 } |
| 33 | 33 |
| 34 DirectoryReader_Dev& DirectoryReader_Dev::operator=( | 34 DirectoryReader_Dev& DirectoryReader_Dev::operator=( |
| 35 const DirectoryReader_Dev& other) { | 35 const DirectoryReader_Dev& other) { |
| 36 DirectoryReader_Dev copy(other); | 36 Resource::operator=(other); |
| 37 swap(copy); | |
| 38 return *this; | 37 return *this; |
| 39 } | 38 } |
| 40 | 39 |
| 41 void DirectoryReader_Dev::swap(DirectoryReader_Dev& other) { | |
| 42 Resource::swap(other); | |
| 43 } | |
| 44 | |
| 45 int32_t DirectoryReader_Dev::GetNextEntry(DirectoryEntry_Dev* entry, | 40 int32_t DirectoryReader_Dev::GetNextEntry(DirectoryEntry_Dev* entry, |
| 46 const CompletionCallback& cc) { | 41 const CompletionCallback& cc) { |
| 47 if (!directory_reader_f) | 42 if (!directory_reader_f) |
| 48 return PP_ERROR_NOINTERFACE; | 43 return PP_ERROR_NOINTERFACE; |
| 49 return directory_reader_f->GetNextEntry(pp_resource(), &entry->data_, | 44 return directory_reader_f->GetNextEntry(pp_resource(), &entry->data_, |
| 50 cc.pp_completion_callback()); | 45 cc.pp_completion_callback()); |
| 51 } | 46 } |
| 52 | 47 |
| 53 } // namespace pp | 48 } // namespace pp |
| OLD | NEW |