Android NTP: Most visited tile clicks should have PageTransition.AUTO_BOOKMARK
[chromium-blink-merge.git] / ppapi / host / host_factory.h
blobe2dcce7a7322ec3682f6b1159a4446cabe3f4ff0
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.
5 #ifndef PPAPI_HOST_HOST_FACTORY_H_
6 #define PPAPI_HOST_HOST_FACTORY_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
12 namespace IPC {
13 class Message;
16 namespace ppapi {
18 namespace proxy {
19 class ResourceMessageCallParams;
22 namespace host {
24 class PpapiHost;
25 class ResourceHost;
27 // A host factory creates ResourceHosts for incoming create messages from
28 // the plugin. This allows us to implement the hosts at the chrome/content
29 // layer without the ppapi layer knowing about the details.
30 class HostFactory {
31 public:
32 virtual ~HostFactory() {}
34 virtual scoped_ptr<ResourceHost> CreateResourceHost(
35 PpapiHost* host,
36 PP_Resource resource,
37 PP_Instance instance,
38 const IPC::Message& message) = 0;
41 } // namespace host
42 } // namespace ppapi
44 #endif // PPAPI_HOST_HOST_FACTORY_H_