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

Side by Side Diff: chrome/renderer/pepper/pepper_ext_crx_file_system_renderer_host.h

Issue 14188019: CRX FileSystem Pepper private API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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
OLDNEW
(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 CHROME_RENDERER_PEPPER_PEPPER_EXT_CRX_FILE_SYSTEM_RENDERER_HOST_H_
6 #define CHROME_RENDERER_PEPPER_PEPPER_EXT_CRX_FILE_SYSTEM_RENDERER_HOST_H_
7
8 #include "googleurl/src/gurl.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/host/file_system_registry.h"
12 #include "ppapi/host/host_message_context.h"
13 #include "ppapi/host/resource_host.h"
14 #include "ppapi/proxy/resource_message_params.h"
15
16 namespace content {
17 class RendererPpapiHost;
18 }
19
20 namespace chrome {
21
22 // Renderer host of CRX filesystem resource, mainly to allow FileRef direct
23 // access (through FileSystemPeeker) on the host side.
kinuko 2013/04/18 13:45:03 Hmm, this Peeker design is interesting..
24 class PepperExtCrxFileSystemRendererHost
25 : public ppapi::host::ResourceHost,
26 public ppapi::host::FileSystemRegistry::FileSystemPeeker {
27 public:
28 PepperExtCrxFileSystemRendererHost(content::RendererPpapiHost* host,
29 PP_Instance instance,
30 PP_Resource resource);
31 virtual ~PepperExtCrxFileSystemRendererHost();
32
33 // ResourceHost override.
34 virtual int32_t OnResourceMessageReceived(
35 const IPC::Message& msg,
36 ppapi::host::HostMessageContext* context) OVERRIDE;
37
38 // PepperFileSystemRegistry::FileSystemPeeker override.
39 virtual PP_FileSystemType GetType() const OVERRIDE;
40 virtual bool IsOpened() const OVERRIDE;
41 virtual GURL GetRootUrl() const OVERRIDE;
teravest 2013/04/18 16:10:38 This can probably return const GURL&
victorhsieh 2013/04/18 19:28:38 Done.
42
43 private:
44 int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context,
45 const std::string& origin,
46 const std::string& fsid);
47
48 bool opened_;
49 GURL root_url_;
50
51 DISALLOW_COPY_AND_ASSIGN(PepperExtCrxFileSystemRendererHost);
52 };
53
54 } // namespace chrome
55
56 #endif // CHROME_RENDERER_PEPPER_PEPPER_EXT_CRX_FILE_SYSTEM_RENDERER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698