OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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_IN_PROCESS_RESOURCE_CREATION_H_ | |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_IN_PROCESS_RESOURCE_CREATION_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "webkit/plugins/ppapi/resource_creation_impl.h" | |
11 | |
12 class RenderViewImpl; | |
13 | |
14 namespace content { | |
15 | |
16 // This class provides creation functions for the new resources with IPC | |
17 // backends that live in content/renderer/pepper. | |
18 // | |
19 // This is a bit confusing. The "old-style" resources live in | |
20 // webkit/plugins/ppapi and are created by the ResourceCreationImpl in that | |
21 // directory. The "new-style" IPC-only resources are in ppapi/proxy and are | |
22 // created by the RessourceCreationProxy in that directory. | |
23 // | |
24 // This class allows us to run new-style IPC-only resources in-process. We have | |
25 // an IPC reflector to run it in process. But then we have a problem with | |
26 // allocating the resources since src/webkit can't depend on IPC or see our IPC | |
27 // backend in content. This class overrides the normal in-process resource | |
28 // creation and adds in the resources that we implement in ppapi/proxy. | |
29 // | |
30 // When we convert all resources to use the new-style, we can just use the | |
31 // ResourceCreationProxy for all resources. This class is just glue to manage | |
32 // the temporary "two different classes." | |
dmichael (off chromium)
2012/07/02 19:34:57
nit: classes->styles?
| |
33 class PepperInProcessResourceCreation | |
34 : public webkit::ppapi::ResourceCreationImpl { | |
35 public: | |
36 PepperInProcessResourceCreation(RenderViewImpl* render_view, | |
37 webkit::ppapi::PluginInstance* instance); | |
38 virtual ~PepperInProcessResourceCreation(); | |
39 | |
40 private: | |
41 class HostToPluginRouter; | |
42 scoped_ptr<HostToPluginRouter> host_to_plugin_router_; | |
43 | |
44 class PluginToHostRouter; | |
45 scoped_ptr<PluginToHostRouter> plugin_to_host_router_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(PepperInProcessResourceCreation); | |
48 }; | |
49 | |
50 } // namespace content | |
51 | |
52 #endif // CONTENT_RENDERER_PEPPER_PEPPER_IN_PROCESS_RESOURCE_CREATION_H_ | |
OLD | NEW |