Roll src/third_party/WebKit 75a2fa9:2546356 (svn 202272:202273)
[chromium-blink-merge.git] / ppapi / host / instance_message_filter.h
blob2b072e9516ee87c12ffc0643a5add8be113c8257
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_INSTANCE_MESSAGE_FILTER_H_
6 #define PPAPI_HOST_INSTANCE_MESSAGE_FILTER_H_
8 #include "base/basictypes.h"
9 #include "ppapi/host/ppapi_host_export.h"
11 namespace IPC {
12 class Message;
15 namespace ppapi {
16 namespace host {
18 class PpapiHost;
20 class PPAPI_HOST_EXPORT InstanceMessageFilter {
21 public:
22 explicit InstanceMessageFilter(PpapiHost* host);
23 virtual ~InstanceMessageFilter();
25 // Processes an instance message from the plugin process. Returns true if the
26 // message was handled. On false, the PpapiHost will forward the message to
27 // the next filter.
28 virtual bool OnInstanceMessageReceived(const IPC::Message& msg) = 0;
30 PpapiHost* host() { return host_; }
32 private:
33 PpapiHost* host_;
35 DISALLOW_COPY_AND_ASSIGN(InstanceMessageFilter);
38 } // namespace host
39 } // namespace ppapi
41 #endif // PPAPI_HOST_INSTANCE_MESSAGE_FILTER_H_