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

Unified Diff: content/ppapi_plugin/ppapi_thread.h

Issue 10378057: Broker out PPAPI handle duplication (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « content/ppapi_plugin/plugin_process_dispatcher.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.h
===================================================================
--- content/ppapi_plugin/ppapi_thread.h (revision 136613)
+++ content/ppapi_plugin/ppapi_thread.h (working copy)
@@ -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.
@@ -22,6 +22,10 @@
#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/plugin_proxy_delegate.h"
+#if defined(OS_WIN)
+#include "base/win/scoped_handle.h"
+#endif
+
class CommandLine;
class FilePath;
class PpapiWebKitPlatformSupportImpl;
@@ -40,11 +44,16 @@
private:
// ChildThread overrides.
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
+ virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
// PluginDispatcher::PluginDelegate implementation.
virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE;
virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE;
virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE;
+ virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
+ base::PlatformFile handle,
+ const IPC::SyncChannel& channel,
+ bool should_close_source) OVERRIDE;
virtual uint32 Register(
ppapi::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE;
virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE;
@@ -55,16 +64,14 @@
// Message handlers.
void OnMsgLoadPlugin(const FilePath& path);
- void OnMsgCreateChannel(base::ProcessHandle host_process_handle,
- int renderer_id,
+ void OnMsgCreateChannel(int renderer_id,
bool incognito);
void OnMsgSetNetworkState(bool online);
void OnPluginDispatcherMessageReceived(const IPC::Message& msg);
// Sets up the channel to the given renderer. On success, returns true and
// fills the given ChannelHandle with the information from the new channel.
- bool SetupRendererChannel(base::ProcessHandle host_process_handle,
- int renderer_id,
+ bool SetupRendererChannel(int renderer_id,
bool incognito,
IPC::ChannelHandle* handle);
@@ -103,6 +110,11 @@
// The WebKitPlatformSupport implementation.
scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_;
+#if defined(OS_WIN)
+ // Caches the handle to the peer process if this is a broker.
+ base::win::ScopedHandle peer_handle_;
+#endif
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
};
« no previous file with comments | « content/ppapi_plugin/plugin_process_dispatcher.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698