OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/files/file.h" |
10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/task_runner.h" | 13 #include "base/task_runner.h" |
13 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h" | 14 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h" |
14 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_time.h" | 17 #include "ppapi/c/pp_time.h" |
17 #include "ppapi/host/ppapi_host.h" | 18 #include "ppapi/host/ppapi_host.h" |
18 | 19 |
19 namespace content { | 20 namespace content { |
(...skipping 25 matching lines...) Expand all Loading... |
45 | 46 |
46 virtual int32_t CanRead() const OVERRIDE; | 47 virtual int32_t CanRead() const OVERRIDE; |
47 virtual int32_t CanWrite() const OVERRIDE; | 48 virtual int32_t CanWrite() const OVERRIDE; |
48 virtual int32_t CanCreate() const OVERRIDE; | 49 virtual int32_t CanCreate() const OVERRIDE; |
49 virtual int32_t CanReadWrite() const OVERRIDE; | 50 virtual int32_t CanReadWrite() const OVERRIDE; |
50 | 51 |
51 private: | 52 private: |
52 // Generic reply callback. | 53 // Generic reply callback. |
53 void DidFinish(ppapi::host::ReplyMessageContext reply_context, | 54 void DidFinish(ppapi::host::ReplyMessageContext reply_context, |
54 const IPC::Message& msg, | 55 const IPC::Message& msg, |
55 base::PlatformFileError error); | 56 base::File::Error error); |
56 | 57 |
57 // Operation specific callbacks. | 58 // Operation specific callbacks. |
58 void GetMetadataComplete( | 59 void GetMetadataComplete( |
59 ppapi::host::ReplyMessageContext reply_context, | 60 ppapi::host::ReplyMessageContext reply_context, |
60 base::PlatformFileError error, | 61 base::File::Error error, |
61 const base::PlatformFileInfo& file_info); | 62 const base::File::Info& file_info); |
62 | 63 |
63 ppapi::host::PpapiHost* host_; | 64 ppapi::host::PpapiHost* host_; |
64 base::FilePath path_; | 65 base::FilePath path_; |
65 int render_process_id_; | 66 int render_process_id_; |
66 | 67 |
67 scoped_refptr<base::TaskRunner> task_runner_; | 68 scoped_refptr<base::TaskRunner> task_runner_; |
68 | 69 |
69 base::WeakPtrFactory<PepperExternalFileRefBackend> weak_factory_; | 70 base::WeakPtrFactory<PepperExternalFileRefBackend> weak_factory_; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(PepperExternalFileRefBackend); | 72 DISALLOW_COPY_AND_ASSIGN(PepperExternalFileRefBackend); |
72 }; | 73 }; |
73 | 74 |
74 } // namespace content | 75 } // namespace content |
75 | 76 |
76 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND
_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND
_H_ |
OLD | NEW |