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

Side by Side Diff: content/renderer/npapi/plugin_channel_host.h

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_NPAPI_PLUGIN_CHANNEL_HOST_H_ 5 #ifndef CONTENT_RENDERER_NPAPI_PLUGIN_CHANNEL_HOST_H_
6 #define CONTENT_RENDERER_NPAPI_PLUGIN_CHANNEL_HOST_H_ 6 #define CONTENT_RENDERER_NPAPI_PLUGIN_CHANNEL_HOST_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "content/child/npapi/np_channel_base.h" 9 #include "content/child/npapi/np_channel_base.h"
10 #include "ipc/ipc_channel_handle.h" 10 #include "ipc/ipc_channel_handle.h"
11 11
12 namespace IPC {
13 class AttachmentBroker;
14 }
15
12 namespace content { 16 namespace content {
13 class NPObjectBase; 17 class NPObjectBase;
14 18
15 // Encapsulates an IPC channel between the renderer and one plugin process. 19 // Encapsulates an IPC channel between the renderer and one plugin process.
16 // On the plugin side there's a corresponding PluginChannel. 20 // On the plugin side there's a corresponding PluginChannel.
17 class PluginChannelHost : public NPChannelBase { 21 class PluginChannelHost : public NPChannelBase {
18 public: 22 public:
19 #if defined(OS_MACOSX) 23 #if defined(OS_MACOSX)
20 // TODO(shess): Debugging for http://crbug.com/97285 . See comment 24 // TODO(shess): Debugging for http://crbug.com/97285 . See comment
21 // in plugin_channel_host.cc. 25 // in plugin_channel_host.cc.
22 static bool* GetRemoveTrackingFlag(); 26 static bool* GetRemoveTrackingFlag();
23 #endif 27 #endif
24 static PluginChannelHost* GetPluginChannelHost( 28 static PluginChannelHost* GetPluginChannelHost(
25 const IPC::ChannelHandle& channel_handle, 29 const IPC::ChannelHandle& channel_handle,
26 base::SingleThreadTaskRunner* ipc_task_runner); 30 base::SingleThreadTaskRunner* ipc_task_runner,
31 IPC::AttachmentBroker* broker);
27 32
28 bool Init(base::SingleThreadTaskRunner* ipc_task_runner, 33 bool Init(base::SingleThreadTaskRunner* ipc_task_runner,
29 bool create_pipe_now, 34 bool create_pipe_now,
30 base::WaitableEvent* shutdown_event) override; 35 base::WaitableEvent* shutdown_event,
36 IPC::AttachmentBroker* broker) override;
31 37
32 int GenerateRouteID() override; 38 int GenerateRouteID() override;
33 39
34 void AddRoute(int route_id, IPC::Listener* listener, 40 void AddRoute(int route_id, IPC::Listener* listener,
35 NPObjectBase* npobject); 41 NPObjectBase* npobject);
36 void RemoveRoute(int route_id); 42 void RemoveRoute(int route_id);
37 43
38 // NPChannelBase override: 44 // NPChannelBase override:
39 bool Send(IPC::Message* msg) override; 45 bool Send(IPC::Message* msg) override;
40 46
(...skipping 25 matching lines...) Expand all
66 // True if we are expecting the plugin process to go away - in which case, 72 // True if we are expecting the plugin process to go away - in which case,
67 // don't treat it as a crash. 73 // don't treat it as a crash.
68 bool expecting_shutdown_; 74 bool expecting_shutdown_;
69 75
70 DISALLOW_COPY_AND_ASSIGN(PluginChannelHost); 76 DISALLOW_COPY_AND_ASSIGN(PluginChannelHost);
71 }; 77 };
72 78
73 } // namespace content 79 } // namespace content
74 80
75 #endif // CONTENT_RENDERER_NPAPI_PLUGIN_CHANNEL_HOST_H_ 81 #endif // CONTENT_RENDERER_NPAPI_PLUGIN_CHANNEL_HOST_H_
OLDNEW
« no previous file with comments | « content/public/test/mock_render_thread.cc ('k') | content/renderer/npapi/plugin_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698