| OLD | NEW |
| 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_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // 0 | 46 // 0 |
| 47 virtual void OnPpapiChannelOpened( | 47 virtual void OnPpapiChannelOpened( |
| 48 const IPC::ChannelHandle& channel_handle, | 48 const IPC::ChannelHandle& channel_handle, |
| 49 int plugin_child_id) = 0; | 49 int plugin_child_id) = 0; |
| 50 | 50 |
| 51 // Returns true if the current connection is off-the-record. | 51 // Returns true if the current connection is off-the-record. |
| 52 virtual bool OffTheRecord() = 0; | 52 virtual bool OffTheRecord() = 0; |
| 53 |
| 54 protected: |
| 55 virtual ~Client() {} |
| 53 }; | 56 }; |
| 54 | 57 |
| 55 class PluginClient : public Client { | 58 class PluginClient : public Client { |
| 56 public: | 59 public: |
| 57 // Returns the resource context for the renderer requesting the channel. | 60 // Returns the resource context for the renderer requesting the channel. |
| 58 virtual content::ResourceContext* GetResourceContext() = 0; | 61 virtual content::ResourceContext* GetResourceContext() = 0; |
| 62 |
| 63 protected: |
| 64 virtual ~PluginClient() {} |
| 59 }; | 65 }; |
| 60 | 66 |
| 61 class BrokerClient : public Client { | 67 class BrokerClient : public Client { |
| 68 protected: |
| 69 virtual ~BrokerClient() {} |
| 62 }; | 70 }; |
| 63 | 71 |
| 64 virtual ~PpapiPluginProcessHost(); | 72 virtual ~PpapiPluginProcessHost(); |
| 65 | 73 |
| 66 static PpapiPluginProcessHost* CreatePluginHost( | 74 static PpapiPluginProcessHost* CreatePluginHost( |
| 67 const content::PepperPluginInfo& info, | 75 const content::PepperPluginInfo& info, |
| 68 net::HostResolver* host_resolver); | 76 net::HostResolver* host_resolver); |
| 69 static PpapiPluginProcessHost* CreateBrokerHost( | 77 static PpapiPluginProcessHost* CreateBrokerHost( |
| 70 const content::PepperPluginInfo& info); | 78 const content::PepperPluginInfo& info); |
| 71 | 79 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 : public content::BrowserChildProcessHostTypeIterator< | 150 : public content::BrowserChildProcessHostTypeIterator< |
| 143 PpapiPluginProcessHost> { | 151 PpapiPluginProcessHost> { |
| 144 public: | 152 public: |
| 145 PpapiBrokerProcessHostIterator() | 153 PpapiBrokerProcessHostIterator() |
| 146 : content::BrowserChildProcessHostTypeIterator< | 154 : content::BrowserChildProcessHostTypeIterator< |
| 147 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} | 155 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} |
| 148 }; | 156 }; |
| 149 | 157 |
| 150 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ | 158 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ |
| 151 | 159 |
| OLD | NEW |