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

Side by Side Diff: tests/fake_browser_ppapi/fake_file_ref.cc

Issue 7292002: Remove plugin connection to PPAPI scriptable objects (var deprecated). Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « tests/fake_browser_ppapi/fake_file_ref.h ('k') | tests/fake_browser_ppapi/fake_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file.
5 */
6
7 #include "native_client/tests/fake_browser_ppapi/fake_file_ref.h"
8
9 #include <stdio.h>
10
11 #include "native_client/src/include/nacl_macros.h"
12 #include "native_client/src/include/portability.h"
13
14 #include "native_client/tests/fake_browser_ppapi/fake_resource.h"
15 #include "native_client/tests/fake_browser_ppapi/utility.h"
16
17 #include "ppapi/c/pp_errors.h"
18 #include "ppapi/c/pp_completion_callback.h"
19 #include "ppapi/c/pp_resource.h"
20
21 using fake_browser_ppapi::DebugPrintf;
22
23 namespace fake_browser_ppapi {
24
25 namespace {
26
27 PP_Resource Create(PP_Resource file_system_id,
28 const char* path) {
29 DebugPrintf("FileRef::Create: file_system_id=%"NACL_PRId32" path=%s\n",
30 file_system_id, path);
31 NACL_UNIMPLEMENTED();
32 return Resource::Invalid()->resource_id();
33 }
34
35 PP_Bool IsFileRef(PP_Resource resource_id) {
36 DebugPrintf("FileRef::IsFileRef: resource_id=%"NACL_PRId32"\n", resource_id);
37 NACL_UNIMPLEMENTED();
38 return PP_FALSE;
39 }
40
41 PP_FileSystemType_Dev GetFileSystemType(PP_Resource file_ref_id) {
42 DebugPrintf("FileRef::GetFileSystemType: file_ref_id=%"NACL_PRId32"\n",
43 file_ref_id);
44 NACL_UNIMPLEMENTED();
45 return PP_FILESYSTEMTYPE_EXTERNAL;
46 }
47
48 PP_Var GetName(PP_Resource file_ref_id) {
49 DebugPrintf("FileRef::GetName: file_ref_id=%"NACL_PRId32"\n", file_ref_id);
50 NACL_UNIMPLEMENTED();
51 return PP_MakeUndefined();
52 }
53
54 PP_Var GetPath(PP_Resource file_ref_id) {
55 DebugPrintf("FileRef::GetPath: file_ref_id=%"NACL_PRId32"\n", file_ref_id);
56 NACL_UNIMPLEMENTED();
57 return PP_MakeUndefined();
58 }
59
60 PP_Resource GetParent(PP_Resource file_ref_id) {
61 DebugPrintf("FileRef::GetParent: file_ref_id=%"NACL_PRId32"\n", file_ref_id);
62 NACL_UNIMPLEMENTED();
63 return Resource::Invalid()->resource_id();
64 }
65
66 int32_t MakeDirectory(PP_Resource directory_ref_id,
67 PP_Bool make_ancestors,
68 struct PP_CompletionCallback callback) {
69 DebugPrintf("FileRef::MakDirectory: directory_ref_id=%"NACL_PRId32"\n",
70 directory_ref_id);
71 UNREFERENCED_PARAMETER(make_ancestors);
72 UNREFERENCED_PARAMETER(callback);
73 NACL_UNIMPLEMENTED();
74 return PP_ERROR_BADRESOURCE;
75 }
76
77 int32_t Touch(PP_Resource file_ref_id,
78 PP_Time last_access_time,
79 PP_Time last_modified_time,
80 struct PP_CompletionCallback callback) {
81 DebugPrintf("FileRef::Touch: file_ref_id=%"NACL_PRId32"\n", file_ref_id);
82 UNREFERENCED_PARAMETER(last_access_time);
83 UNREFERENCED_PARAMETER(last_modified_time);
84 UNREFERENCED_PARAMETER(callback);
85 NACL_UNIMPLEMENTED();
86 return PP_ERROR_BADRESOURCE;
87 }
88
89 int32_t Delete(PP_Resource file_ref_id,
90 struct PP_CompletionCallback callback) {
91 DebugPrintf("FileRef::Delete: file_ref_id=%"NACL_PRId32"\n", file_ref_id);
92 UNREFERENCED_PARAMETER(callback);
93 NACL_UNIMPLEMENTED();
94 return PP_ERROR_BADRESOURCE;
95 }
96
97 int32_t Rename(PP_Resource file_ref_id,
98 PP_Resource new_file_ref,
99 struct PP_CompletionCallback callback) {
100 DebugPrintf("FileRef::Rename: file_ref_id=%"NACL_PRId32"\n", file_ref_id);
101 UNREFERENCED_PARAMETER(new_file_ref);
102 UNREFERENCED_PARAMETER(callback);
103 NACL_UNIMPLEMENTED();
104 return PP_ERROR_BADRESOURCE;
105 }
106
107 } // namespace
108
109
110 const PPB_FileRef_Dev* FileRef::GetInterface() {
111 static const PPB_FileRef_Dev file_ref_interface = {
112 Create,
113 IsFileRef,
114 GetFileSystemType,
115 GetName,
116 GetPath,
117 GetParent,
118 MakeDirectory,
119 Touch,
120 Delete,
121 Rename
122 };
123 return &file_ref_interface;
124 }
125
126 } // namespace fake_browser_ppapi
OLDNEW
« no previous file with comments | « tests/fake_browser_ppapi/fake_file_ref.h ('k') | tests/fake_browser_ppapi/fake_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698