Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / renderer_host / pepper / xwalk_browser_pepper_host_factory.h
1 // Copyright (c) 2014 Intel Corporation. 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 XWALK_RUNTIME_BROWSER_RENDERER_HOST_PEPPER_XWALK_BROWSER_PEPPER_HOST_FACTORY_H_
6 #define XWALK_RUNTIME_BROWSER_RENDERER_HOST_PEPPER_XWALK_BROWSER_PEPPER_HOST_FACTORY_H_
7
8 #include "ppapi/host/host_factory.h"
9
10 namespace content {
11 class BrowserPpapiHost;
12 }  // namespace content
13
14 namespace xwalk {
15
16 class XWalkBrowserPepperHostFactory : public ppapi::host::HostFactory {
17  public:
18   // Non-owning pointer to the filter must outlive this class.
19   explicit XWalkBrowserPepperHostFactory(content::BrowserPpapiHost* host);
20   virtual ~XWalkBrowserPepperHostFactory();
21
22   scoped_ptr<ppapi::host::ResourceHost> CreateResourceHost(
23       ppapi::host::PpapiHost* host,
24       const ppapi::proxy::ResourceMessageCallParams& params,
25       PP_Instance instance,
26       const IPC::Message& message) override;
27
28  private:
29   // Non-owning pointer.
30   content::BrowserPpapiHost* host_;
31
32   DISALLOW_COPY_AND_ASSIGN(XWalkBrowserPepperHostFactory);
33 };
34
35 }  // namespace xwalk
36
37 #endif  // XWALK_RUNTIME_BROWSER_RENDERER_HOST_PEPPER_XWALK_BROWSER_PEPPER_HOST_FACTORY_H_