OLD | NEW |
| (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 #ifndef NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_FILE_REF_H_ | |
8 #define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_FILE_REF_H_ | |
9 | |
10 #include <string> | |
11 | |
12 #include "native_client/src/include/nacl_macros.h" | |
13 #include "native_client/tests/fake_browser_ppapi/fake_resource.h" | |
14 #include "ppapi/c/dev/ppb_file_ref_dev.h" | |
15 | |
16 namespace fake_browser_ppapi { | |
17 | |
18 // Implements the PPB_FileRef_Dev interface. | |
19 class FileRef : public Resource { | |
20 public: | |
21 explicit FileRef(const std::string& path) : path_(path) {} | |
22 | |
23 FileRef* AsFileRef() { return this; } | |
24 | |
25 const std::string& path() const { return path_; } | |
26 | |
27 // Return an interface pointer usable by PPAPI. | |
28 static const PPB_FileRef_Dev* GetInterface(); | |
29 | |
30 private: | |
31 std::string path_; | |
32 | |
33 NACL_DISALLOW_COPY_AND_ASSIGN(FileRef); | |
34 }; | |
35 | |
36 } // namespace fake_browser_ppapi | |
37 | |
38 #endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_FILE_REF_H_ | |
OLD | NEW |