Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Unified Diff: ppapi/host/message_filter_host.h

Issue 11601004: Introduce MessageFilterHost for Pepper ResourceHosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/host/message_filter_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/host/message_filter_host.h
diff --git a/ppapi/host/message_filter_host.h b/ppapi/host/message_filter_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..9aa1c5bbaa41066f4e918affd34e14f713a605a9
--- /dev/null
+++ b/ppapi/host/message_filter_host.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_HOST_MESSAGE_FILTER_HOST_H_
+#define PPAPI_HOST_MESSAGE_FILTER_HOST_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "ppapi/host/ppapi_host_export.h"
+#include "ppapi/host/resource_host.h"
+
+namespace ppapi {
+namespace host {
+
+class PpapiHost;
+class ResourceMessageFilter;
+
+// This class is a generic ResourceHost that is composed of a single
+// ResourceMessageFilter. There are cases where ResourceHosts only serve the
+// purpose of passing messages onto a message filter to be handled on another
+// thread. This class can be used as the host in those cases.
+class PPAPI_HOST_EXPORT MessageFilterHost : public ResourceHost {
+ public:
+ MessageFilterHost(PpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource,
+ const scoped_refptr<ResourceMessageFilter>& message_filter);
+ virtual ~MessageFilterHost();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MessageFilterHost);
+};
+
+} // namespace host
+} // namespace ppapi
+
+#endif // PPAPI_HOST_MESSAGE_FILTER_HOST_H_
« no previous file with comments | « no previous file | ppapi/host/message_filter_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698