OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ |
6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 // Process host for PPAPI plugin and broker processes. | 31 // Process host for PPAPI plugin and broker processes. |
32 // When used for the broker, interpret all references to "plugin" with "broker". | 32 // When used for the broker, interpret all references to "plugin" with "broker". |
33 class PpapiPluginProcessHost : public content::BrowserChildProcessHostDelegate, | 33 class PpapiPluginProcessHost : public content::BrowserChildProcessHostDelegate, |
34 public IPC::Message::Sender { | 34 public IPC::Message::Sender { |
35 public: | 35 public: |
36 class Client { | 36 class Client { |
37 public: | 37 public: |
38 // Gets the information about the renderer that's requesting the channel. | 38 // Gets the information about the renderer that's requesting the channel. |
39 virtual void GetChannelInfo(base::ProcessHandle* renderer_handle, | 39 virtual void GetPpapiChannelInfo(base::ProcessHandle* renderer_handle, |
40 int* renderer_id) = 0; | 40 int* renderer_id) = 0; |
41 | 41 |
42 // Called when the channel is asynchronously opened to the plugin or on | 42 // Called when the channel is asynchronously opened to the plugin or on |
43 // error. On error, the parameters should be: | 43 // error. On error, the parameters should be: |
44 // base::kNullProcessHandle | 44 // base::kNullProcessHandle |
45 // IPC::ChannelHandle() | 45 // IPC::ChannelHandle() |
46 virtual void OnChannelOpened(base::ProcessHandle plugin_process_handle, | 46 virtual void OnPpapiChannelOpened( |
47 const IPC::ChannelHandle& channel_handle) = 0; | 47 base::ProcessHandle plugin_process_handle, |
| 48 const IPC::ChannelHandle& channel_handle) = 0; |
48 }; | 49 }; |
49 | 50 |
50 class PluginClient : public Client { | 51 class PluginClient : public Client { |
51 public: | 52 public: |
52 // Returns the resource context for the renderer requesting the channel. | 53 // Returns the resource context for the renderer requesting the channel. |
53 virtual content::ResourceContext* GetResourceContext() = 0; | 54 virtual content::ResourceContext* GetResourceContext() = 0; |
54 }; | 55 }; |
55 | 56 |
56 class BrokerClient : public Client { | 57 class BrokerClient : public Client { |
57 }; | 58 }; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 : public content::BrowserChildProcessHostTypeIterator< | 141 : public content::BrowserChildProcessHostTypeIterator< |
141 PpapiPluginProcessHost> { | 142 PpapiPluginProcessHost> { |
142 public: | 143 public: |
143 PpapiBrokerProcessHostIterator() | 144 PpapiBrokerProcessHostIterator() |
144 : content::BrowserChildProcessHostTypeIterator< | 145 : content::BrowserChildProcessHostTypeIterator< |
145 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} | 146 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} |
146 }; | 147 }; |
147 | 148 |
148 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ | 149 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ |
149 | 150 |
OLD | NEW |