summaryrefslogtreecommitdiffstats
path: root/ppapi/host
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-03 00:51:54 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-03 00:51:54 +0000
commit79bc6c7180a746c664be2efe2f285281220d06af (patch)
treeae5891d088de9c3a3cf9f1f17eaeba3a36f4b785 /ppapi/host
parentb686fedac7e969fb5c21a4561e8ed0ce08e7119c (diff)
downloadchromium_src-79bc6c7180a746c664be2efe2f285281220d06af.zip
chromium_src-79bc6c7180a746c664be2efe2f285281220d06af.tar.gz
chromium_src-79bc6c7180a746c664be2efe2f285281220d06af.tar.bz2
Remove InstanceMessageFilter
This was previously used for handling PPB_Flash_Print IPCs which has now been moved to the pepper singleton-style resource model. The use of this class has largely been replaced by singleton-style resources and I don't forsee new uses of it in the near future. It can be added back in the future if needed. BUG= Review URL: https://chromiumcodereview.appspot.com/11645039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/host')
-rw-r--r--ppapi/host/instance_message_filter.cc19
-rw-r--r--ppapi/host/instance_message_filter.h41
-rw-r--r--ppapi/host/ppapi_host.cc20
-rw-r--r--ppapi/host/ppapi_host.h11
4 files changed, 1 insertions, 90 deletions
diff --git a/ppapi/host/instance_message_filter.cc b/ppapi/host/instance_message_filter.cc
deleted file mode 100644
index 229235f..0000000
--- a/ppapi/host/instance_message_filter.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.
-
-#include "ppapi/host/instance_message_filter.h"
-
-#include "ppapi/host/ppapi_host.h"
-
-namespace ppapi {
-namespace host {
-
-InstanceMessageFilter::InstanceMessageFilter(PpapiHost* host) : host_(host) {
-}
-
-InstanceMessageFilter::~InstanceMessageFilter() {
-}
-
-} // namespace host
-} // namespace ppapi
diff --git a/ppapi/host/instance_message_filter.h b/ppapi/host/instance_message_filter.h
deleted file mode 100644
index 2b072e9..0000000
--- a/ppapi/host/instance_message_filter.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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_INSTANCE_MESSAGE_FILTER_H_
-#define PPAPI_HOST_INSTANCE_MESSAGE_FILTER_H_
-
-#include "base/basictypes.h"
-#include "ppapi/host/ppapi_host_export.h"
-
-namespace IPC {
-class Message;
-}
-
-namespace ppapi {
-namespace host {
-
-class PpapiHost;
-
-class PPAPI_HOST_EXPORT InstanceMessageFilter {
- public:
- explicit InstanceMessageFilter(PpapiHost* host);
- virtual ~InstanceMessageFilter();
-
- // Processes an instance message from the plugin process. Returns true if the
- // message was handled. On false, the PpapiHost will forward the message to
- // the next filter.
- virtual bool OnInstanceMessageReceived(const IPC::Message& msg) = 0;
-
- PpapiHost* host() { return host_; }
-
- private:
- PpapiHost* host_;
-
- DISALLOW_COPY_AND_ASSIGN(InstanceMessageFilter);
-};
-
-} // namespace host
-} // namespace ppapi
-
-#endif // PPAPI_HOST_INSTANCE_MESSAGE_FILTER_H_
diff --git a/ppapi/host/ppapi_host.cc b/ppapi/host/ppapi_host.cc
index 87dfb11..6423f1e 100644
--- a/ppapi/host/ppapi_host.cc
+++ b/ppapi/host/ppapi_host.cc
@@ -8,7 +8,6 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/host_factory.h"
#include "ppapi/host/host_message_context.h"
-#include "ppapi/host/instance_message_filter.h"
#include "ppapi/host/resource_host.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/resource_message_params.h"
@@ -34,11 +33,8 @@ PpapiHost::PpapiHost(IPC::Sender* sender,
PpapiHost::~PpapiHost() {
// Delete these explicitly before destruction since then the host is still
- // technically alive in case one of the filters accesses us from the
+ // technically alive in case one of the hosts accesses us from the
// destructor.
- instance_message_filters_.clear();
-
- // The resources may also want to use us in their destructors.
resources_.clear();
pending_resource_hosts_.clear();
}
@@ -63,15 +59,6 @@ bool PpapiHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
- if (!handled) {
- for (size_t i = 0; i < instance_message_filters_.size(); i++) {
- if (instance_message_filters_[i]->OnInstanceMessageReceived(msg)) {
- handled = true;
- break;
- }
- }
- }
-
return handled;
}
@@ -107,11 +94,6 @@ void PpapiHost::AddHostFactoryFilter(scoped_ptr<HostFactory> filter) {
host_factory_filters_.push_back(filter.release());
}
-void PpapiHost::AddInstanceMessageFilter(
- scoped_ptr<InstanceMessageFilter> filter) {
- instance_message_filters_.push_back(filter.release());
-}
-
void PpapiHost::OnHostMsgResourceCall(
const proxy::ResourceMessageCallParams& params,
const IPC::Message& nested_msg) {
diff --git a/ppapi/host/ppapi_host.h b/ppapi/host/ppapi_host.h
index c661a9b..5e44d1a 100644
--- a/ppapi/host/ppapi_host.h
+++ b/ppapi/host/ppapi_host.h
@@ -30,7 +30,6 @@ namespace host {
class HostFactory;
struct HostMessageContext;
-class InstanceMessageFilter;
struct ReplyMessageContext;
class ResourceHost;
@@ -70,10 +69,6 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
// ownership of the pointer.
void AddHostFactoryFilter(scoped_ptr<HostFactory> filter);
- // Adds the given message filter to the host. The PpapiHost will take
- // ownership of the pointer.
- void AddInstanceMessageFilter(scoped_ptr<InstanceMessageFilter> filter);
-
// Returns null if the resource doesn't exist.
host::ResourceHost* GetResourceHost(PP_Resource resource) const;
@@ -109,12 +104,6 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener {
// an ObserverList.
ScopedVector<HostFactory> host_factory_filters_;
- // Filters for instance messages. Note that since we don't support deleting
- // these dynamically we don't need to worry about modifications during
- // iteration. If we add that capability, this should be replaced with an
- // ObserverList.
- ScopedVector<InstanceMessageFilter> instance_message_filters_;
-
typedef std::map<PP_Resource, linked_ptr<ResourceHost> > ResourceMap;
ResourceMap resources_;