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

Side by Side Diff: ppapi/shared_impl/ppb_file_io_shared.cc

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/shared_impl/ppb_file_io_shared.h" 5 #include "ppapi/shared_impl/ppb_file_io_shared.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 18 matching lines...) Expand all
29 PPB_FileIO_Shared::CallbackEntry::CallbackEntry(const CallbackEntry& entry) 29 PPB_FileIO_Shared::CallbackEntry::CallbackEntry(const CallbackEntry& entry)
30 : callback(entry.callback), 30 : callback(entry.callback),
31 read_buffer(entry.read_buffer), 31 read_buffer(entry.read_buffer),
32 info(entry.info) { 32 info(entry.info) {
33 } 33 }
34 34
35 PPB_FileIO_Shared::CallbackEntry::~CallbackEntry() { 35 PPB_FileIO_Shared::CallbackEntry::~CallbackEntry() {
36 } 36 }
37 37
38 PPB_FileIO_Shared::PPB_FileIO_Shared(PP_Instance instance) 38 PPB_FileIO_Shared::PPB_FileIO_Shared(PP_Instance instance)
39 : Resource(instance), 39 : Resource(OBJECT_IS_IMPL, instance),
40 file_system_type_(PP_FILESYSTEMTYPE_INVALID), 40 file_system_type_(PP_FILESYSTEMTYPE_INVALID),
41 file_open_(false), 41 file_open_(false),
42 pending_op_(OPERATION_NONE) { 42 pending_op_(OPERATION_NONE) {
43 } 43 }
44 44
45 PPB_FileIO_Shared::PPB_FileIO_Shared(const HostResource& host_resource) 45 PPB_FileIO_Shared::PPB_FileIO_Shared(const HostResource& host_resource)
46 : Resource(host_resource), 46 : Resource(OBJECT_IS_PROXY, host_resource),
47 file_system_type_(PP_FILESYSTEMTYPE_INVALID), 47 file_system_type_(PP_FILESYSTEMTYPE_INVALID),
48 file_open_(false), 48 file_open_(false),
49 pending_op_(OPERATION_NONE) { 49 pending_op_(OPERATION_NONE) {
50 } 50 }
51 51
52 PPB_FileIO_Shared::~PPB_FileIO_Shared() { 52 PPB_FileIO_Shared::~PPB_FileIO_Shared() {
53 } 53 }
54 54
55 thunk::PPB_FileIO_API* PPB_FileIO_Shared::AsPPB_FileIO_API() { 55 thunk::PPB_FileIO_API* PPB_FileIO_Shared::AsPPB_FileIO_API() {
56 return this; 56 return this;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 CallbackEntry front = callbacks_.front(); 216 CallbackEntry front = callbacks_.front();
217 callbacks_.pop_front(); 217 callbacks_.pop_front();
218 if (callbacks_.empty()) 218 if (callbacks_.empty())
219 pending_op_ = OPERATION_NONE; 219 pending_op_ = OPERATION_NONE;
220 220
221 front.callback->Run(result); 221 front.callback->Run(result);
222 } 222 }
223 223
224 } // namespace ppapi 224 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698