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

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
Index: content/ppapi_plugin/ppapi_thread.h
===================================================================
--- content/ppapi_plugin/ppapi_thread.h (revision 136164)
+++ 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.
@@ -40,11 +40,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 +60,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 +106,9 @@
// The WebKitPlatformSupport implementation.
scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_;
+ // Caches the handle to the peer process if this is a broker.
+ base::ProcessHandle peer_handle_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
};

Powered by Google App Engine
This is Rietveld 408576698