summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-26 20:18:41 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-26 20:18:41 +0000
commit31799bf1ec6fdf3ce81759dc36e5ead385450368 (patch)
tree6b3f8ef0a35ce25ba27e449db65a1e845a3fc8b1 /webkit
parent94653576aefb53eb73c86e67f4044c4d1bf01221 (diff)
downloadchromium_src-31799bf1ec6fdf3ce81759dc36e5ead385450368.zip
chromium_src-31799bf1ec6fdf3ce81759dc36e5ead385450368.tar.gz
chromium_src-31799bf1ec6fdf3ce81759dc36e5ead385450368.tar.bz2
Separate out the broker from the pepper dispatcher.
This separates out the broker impl from the pepper plugin disptacher impl and also a few helper classes. I also renamed everything to be more consistent with other delegates. Review URL: http://codereview.chromium.org/9429057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123698 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc2
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h2
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h7
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc4
-rw-r--r--webkit/plugins/ppapi/plugin_module.h6
-rw-r--r--webkit/plugins/ppapi/ppb_broker_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_broker_impl.h4
7 files changed, 15 insertions, 16 deletions
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index d73f763..91824d7 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -93,7 +93,7 @@ MockPluginDelegate::PlatformAudioInput* MockPluginDelegate::CreateAudioInput(
return NULL;
}
-MockPluginDelegate::PpapiBroker* MockPluginDelegate::ConnectToPpapiBroker(
+MockPluginDelegate::Broker* MockPluginDelegate::ConnectToBroker(
PPB_Broker_Impl* client) {
return NULL;
}
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index 08e25b0..8327850 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -44,7 +44,7 @@ class MockPluginDelegate : public PluginDelegate {
uint32_t sample_rate,
uint32_t sample_count,
PlatformAudioCommonClient* client);
- virtual PpapiBroker* ConnectToPpapiBroker(PPB_Broker_Impl* client);
+ virtual Broker* ConnectToBroker(PPB_Broker_Impl* client);
virtual void NumberOfFindResultsChanged(int identifier,
int total,
bool final_result);
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index 3d02e1c..985ff98 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -264,7 +264,7 @@ class PluginDelegate {
};
// Provides access to the ppapi broker.
- class PpapiBroker {
+ class Broker {
public:
virtual void Connect(webkit::ppapi::PPB_Broker_Impl* client) = 0;
@@ -275,7 +275,7 @@ class PluginDelegate {
virtual void Disconnect(webkit::ppapi::PPB_Broker_Impl* client) = 0;
protected:
- virtual ~PpapiBroker() {}
+ virtual ~Broker() {}
};
// Notification that the given plugin is focused or unfocused.
@@ -352,8 +352,7 @@ class PluginDelegate {
// BrokerConnected has been called.
// The caller is responsible for calling Release() on the returned pointer
// to clean up the corresponding resources allocated during this call.
- virtual PpapiBroker* ConnectToPpapiBroker(
- webkit::ppapi::PPB_Broker_Impl* client) = 0;
+ virtual Broker* ConnectToBroker(webkit::ppapi::PPB_Broker_Impl* client) = 0;
// Notifies that the number of find results has changed.
virtual void NumberOfFindResultsChanged(int identifier,
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index 380b31a..f9edaae 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -591,12 +591,12 @@ bool PluginModule::ReserveInstanceID(PP_Instance instance) {
return true; // Instance ID is usable.
}
-void PluginModule::SetBroker(PluginDelegate::PpapiBroker* broker) {
+void PluginModule::SetBroker(PluginDelegate::Broker* broker) {
DCHECK(!broker_ || !broker);
broker_ = broker;
}
-PluginDelegate::PpapiBroker* PluginModule::GetBroker() {
+PluginDelegate::Broker* PluginModule::GetBroker() {
return broker_;
}
diff --git a/webkit/plugins/ppapi/plugin_module.h b/webkit/plugins/ppapi/plugin_module.h
index 301f542..0b2aa99 100644
--- a/webkit/plugins/ppapi/plugin_module.h
+++ b/webkit/plugins/ppapi/plugin_module.h
@@ -142,8 +142,8 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
bool ReserveInstanceID(PP_Instance instance);
// These should only be called from the main thread.
- void SetBroker(PluginDelegate::PpapiBroker* broker);
- PluginDelegate::PpapiBroker* GetBroker();
+ void SetBroker(PluginDelegate::Broker* broker);
+ PluginDelegate::Broker* GetBroker();
private:
// Calls the InitializeModule entrypoint. The entrypoint must have been
@@ -173,7 +173,7 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
// Non-owning pointer to the broker for this plugin module, if one exists.
// It is populated and cleared in the main thread.
- PluginDelegate::PpapiBroker* broker_;
+ PluginDelegate::Broker* broker_;
// Holds a reference to the base::NativeLibrary handle if this PluginModule
// instance wraps functions loaded from a library. Can be NULL. If
diff --git a/webkit/plugins/ppapi/ppb_broker_impl.cc b/webkit/plugins/ppapi/ppb_broker_impl.cc
index 6f69e8d..289b173 100644
--- a/webkit/plugins/ppapi/ppb_broker_impl.cc
+++ b/webkit/plugins/ppapi/ppb_broker_impl.cc
@@ -58,12 +58,12 @@ int32_t PPB_Broker_Impl::Connect(PP_CompletionCallback connect_callback) {
return PP_ERROR_FAILED;
// The callback must be populated now in case we are connected to the broker
- // and BrokerConnected is called before ConnectToPpapiBroker returns.
+ // and BrokerConnected is called before ConnectToBroker returns.
// Because it must be created now, it must be aborted and cleared if
- // ConnectToPpapiBroker fails.
+ // ConnectToBroker fails.
connect_callback_ = new TrackedCallback(this, connect_callback);
- broker_ = plugin_instance->delegate()->ConnectToPpapiBroker(this);
+ broker_ = plugin_instance->delegate()->ConnectToBroker(this);
if (!broker_) {
TrackedCallback::ClearAndAbort(&connect_callback_);
return PP_ERROR_FAILED;
diff --git a/webkit/plugins/ppapi/ppb_broker_impl.h b/webkit/plugins/ppapi/ppb_broker_impl.h
index 2a95122..51b5f00 100644
--- a/webkit/plugins/ppapi/ppb_broker_impl.h
+++ b/webkit/plugins/ppapi/ppb_broker_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -40,7 +40,7 @@ class WEBKIT_PLUGINS_EXPORT PPB_Broker_Impl
private:
// PluginDelegate ppapi broker object.
// We don't own this pointer but are responsible for calling Disconnect on it.
- PluginDelegate::PpapiBroker* broker_;
+ PluginDelegate::Broker* broker_;
// Callback invoked from BrokerConnected.
scoped_refptr< ::ppapi::TrackedCallback> connect_callback_;