blob: d4b8ea76cd8a48b8e71e9b9f74020bfac4696c1b [file] [log] [blame]
[email protected]4dec5802012-06-30 05:26:521// 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 PPAPI_HOST_HOST_FACTORY_H_
6#define PPAPI_HOST_HOST_FACTORY_H_
7
8#include "base/memory/scoped_ptr.h"
9#include "ppapi/c/pp_instance.h"
10
11namespace IPC {
12class Message;
13}
14
15namespace ppapi {
16
17namespace proxy {
18class ResourceMessageCallParams;
19}
20
21namespace host {
22
23class PpapiHost;
24class ResourceHost;
25
26// A host factory creates ResourceHosts for incoming create messages from
27// the plugin. This allows us to implement the hosts at the chrome/content
28// layer without the ppapi layer knowing about the details.
29class HostFactory {
30 public:
31 virtual ~HostFactory() {}
32
33 virtual scoped_ptr<ResourceHost> CreateResourceHost(
34 PpapiHost* host,
35 const proxy::ResourceMessageCallParams& params,
36 PP_Instance instance,
37 const IPC::Message& message) = 0;
38};
39
40} // namespace host
41} // namespace ppapi
42
43#endif // PPAPI_HOST_HOST_FACTORY_H_