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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_file_ref_interface.h

Issue 2435323002: [NaCl SDK] Refactor FakeFileRefInterface. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_file_ref_interface.h
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_file_ref_interface.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_file_ref_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..cb8dc36b7831db6bf0c506fffb740973d7d117db
--- /dev/null
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_file_ref_interface.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef LIBRARIES_NACL_IO_TEST_FAKE_FILE_REF_INTERFACE_H_
+#define LIBRARIES_NACL_IO_TEST_FAKE_FILE_REF_INTERFACE_H_
+
+#include "fake_ppapi/fake_core_interface.h"
+#include "fake_ppapi/fake_var_interface.h"
+#include "fake_ppapi/fake_var_manager.h"
+#include "sdk_util/macros.h"
+
+class FakeFileRefInterface : public nacl_io::FileRefInterface {
+ public:
+ FakeFileRefInterface(FakeCoreInterface* core_interface,
+ FakeVarInterface* var_interface);
+
+ virtual PP_Resource Create(PP_Resource file_system, const char* path);
+ virtual PP_Var GetName(PP_Resource file_ref);
+ virtual int32_t MakeDirectory(PP_Resource directory_ref,
+ PP_Bool make_parents,
+ PP_CompletionCallback callback);
+ virtual int32_t Delete(PP_Resource file_ref, PP_CompletionCallback callback);
+ virtual int32_t Query(PP_Resource file_ref,
+ PP_FileInfo* info,
+ PP_CompletionCallback callback);
+ virtual int32_t ReadDirectoryEntries(PP_Resource file_ref,
+ const PP_ArrayOutput& output,
+ PP_CompletionCallback callback);
+ virtual int32_t Rename(PP_Resource file_ref,
+ PP_Resource new_file_ref,
+ PP_CompletionCallback callback);
+
+ private:
+ FakeCoreInterface* core_interface_; // Weak reference.
+ FakeVarInterface* var_interface_; // Weak reference.
+ FakeVarManager* var_manager_; // Weak reference
+
+ DISALLOW_COPY_AND_ASSIGN(FakeFileRefInterface);
+};
+
+#endif // LIBRARIES_NACL_IO_TEST_FAKE_FILE_REF_INTERFACE_H_

Powered by Google App Engine
This is Rietveld 408576698