OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_FILE_REF_RENDERER_HOST_H_ | |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_FILE_REF_RENDERER_HOST_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "base/files/file_path.h" | |
12 #include "base/memory/weak_ptr.h" | |
13 #include "content/public/renderer/renderer_ppapi_host.h" | |
14 #include "content/renderer/pepper/pepper_file_system_host.h" | |
15 #include "ipc/ipc_message.h" | |
16 #include "ppapi/c/pp_file_info.h" | |
17 #include "ppapi/c/pp_instance.h" | |
18 #include "ppapi/c/pp_resource.h" | |
19 #include "ppapi/host/host_message_context.h" | |
20 #include "ppapi/host/resource_host.h" | |
21 | |
22 namespace content { | |
23 | |
24 class PepperFileRefRendererHost | |
25 : public ppapi::host::ResourceHost, | |
26 public base::SupportsWeakPtr<PepperFileRefRendererHost> { | |
dmichael (off chromium)
2013/09/03 22:34:50
I don't see you using SupportsWeakPtr for this cla
teravest
2013/09/04 14:46:25
Removed.
| |
27 public: | |
28 PepperFileRefRendererHost(RendererPpapiHost* host, | |
29 PP_Instance instance, | |
30 PP_Resource resource, | |
31 PP_Resource file_system, | |
32 const std::string& internal_path); | |
33 | |
34 PepperFileRefRendererHost(RendererPpapiHost* host, | |
35 PP_Instance instance, | |
36 PP_Resource resource, | |
37 const base::FilePath& external_path); | |
38 | |
39 virtual ~PepperFileRefRendererHost(); | |
40 | |
41 PP_FileSystemType GetFileSystemType() const; | |
42 std::string GetFileSystemURLSpec() const; | |
43 base::FilePath GetExternalFilePath() const; | |
44 | |
45 // ppapi::host::ResourceHost override. | |
46 virtual int32_t OnResourceMessageReceived( | |
dmichael (off chromium)
2013/09/03 22:34:50
nit: this and IsFileRefHost could be private
teravest
2013/09/04 14:46:25
I guess it's legal C++, but it seems weird; why bo
dmichael (off chromium)
2013/09/04 17:23:54
Okay, if this matches our other Resource hosts, th
| |
47 const IPC::Message& msg, | |
48 ppapi::host::HostMessageContext* context) OVERRIDE; | |
49 virtual bool IsFileRefHost() OVERRIDE; | |
50 | |
51 private: | |
52 PP_FileSystemType file_system_type_; | |
53 std::string internal_path_; | |
54 base::FilePath external_path_; | |
55 base::WeakPtr<PepperFileSystemHost> fs_host_; | |
56 | |
57 DISALLOW_COPY_AND_ASSIGN(PepperFileRefRendererHost); | |
58 }; | |
59 | |
60 } // namespace content | |
61 | |
62 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FILE_REF_RENDERER_HOST_H_ | |
OLD | NEW |