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

Unified Diff: content/renderer/pepper/ppb_broker_impl.h

Issue 22300003: Move broker creation out of PepperHelperImpl to PPB_Broker_Impl in the effort to eliminate PepperHe… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 4 months 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
Index: content/renderer/pepper/ppb_broker_impl.h
===================================================================
--- content/renderer/pepper/ppb_broker_impl.h (revision 215720)
+++ content/renderer/pepper/ppb_broker_impl.h (working copy)
@@ -8,6 +8,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
+#include "base/process/process.h"
+#include "ipc/ipc_listener.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/trusted/ppb_broker_trusted.h"
#include "ppapi/shared_impl/resource.h"
@@ -16,11 +18,16 @@
class GURL;
+namespace IPC {
+struct ChannelHandle;
+}
+
namespace content {
class PepperBroker;
class PPB_Broker_Impl : public ::ppapi::Resource,
public ::ppapi::thunk::PPB_Broker_API,
+ public IPC::Listener,
public base::SupportsWeakPtr<PPB_Broker_Impl> {
public:
explicit PPB_Broker_Impl(PP_Instance instance);
@@ -42,6 +49,13 @@
private:
virtual ~PPB_Broker_Impl();
+ // IPC::Listener implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ void OnPpapiBrokerChannelCreated(base::ProcessId broker_pid,
+ const IPC::ChannelHandle& handle);
+ void OnPpapiBrokerPermissionResult(bool result);
+
// PluginDelegate ppapi broker object.
// We don't own this pointer but are responsible for calling Disconnect on it.
PepperBroker* broker_;
@@ -53,6 +67,8 @@
// Never owned by this object.
int32_t pipe_handle_;
+ int routing_id_;
+
DISALLOW_COPY_AND_ASSIGN(PPB_Broker_Impl);
};

Powered by Google App Engine
This is Rietveld 408576698