| 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 <string> | 9 #include <string> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // error. On error, the parameters should be: | 45 // error. On error, the parameters should be: |
| 46 // base::kNullProcessHandle | 46 // base::kNullProcessHandle |
| 47 // IPC::ChannelHandle(), | 47 // IPC::ChannelHandle(), |
| 48 // 0 | 48 // 0 |
| 49 virtual void OnPpapiChannelOpened( | 49 virtual void OnPpapiChannelOpened( |
| 50 const IPC::ChannelHandle& channel_handle, | 50 const IPC::ChannelHandle& channel_handle, |
| 51 int plugin_child_id) = 0; | 51 int plugin_child_id) = 0; |
| 52 | 52 |
| 53 // Returns true if the current connection is off-the-record. | 53 // Returns true if the current connection is off-the-record. |
| 54 virtual bool OffTheRecord() = 0; | 54 virtual bool OffTheRecord() = 0; |
| 55 |
| 56 protected: |
| 57 virtual ~Client() {} |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 class PluginClient : public Client { | 60 class PluginClient : public Client { |
| 58 public: | 61 public: |
| 59 // Returns the resource context for the renderer requesting the channel. | 62 // Returns the resource context for the renderer requesting the channel. |
| 60 virtual content::ResourceContext* GetResourceContext() = 0; | 63 virtual content::ResourceContext* GetResourceContext() = 0; |
| 64 |
| 65 protected: |
| 66 virtual ~PluginClient() {} |
| 61 }; | 67 }; |
| 62 | 68 |
| 63 class BrokerClient : public Client { | 69 class BrokerClient : public Client { |
| 70 protected: |
| 71 virtual ~BrokerClient() {} |
| 64 }; | 72 }; |
| 65 | 73 |
| 66 virtual ~PpapiPluginProcessHost(); | 74 virtual ~PpapiPluginProcessHost(); |
| 67 | 75 |
| 68 static PpapiPluginProcessHost* CreatePluginHost( | 76 static PpapiPluginProcessHost* CreatePluginHost( |
| 69 const content::PepperPluginInfo& info, | 77 const content::PepperPluginInfo& info, |
| 70 const FilePath& profile_data_directory, | 78 const FilePath& profile_data_directory, |
| 71 net::HostResolver* host_resolver); | 79 net::HostResolver* host_resolver); |
| 72 static PpapiPluginProcessHost* CreateBrokerHost( | 80 static PpapiPluginProcessHost* CreateBrokerHost( |
| 73 const content::PepperPluginInfo& info); | 81 const content::PepperPluginInfo& info); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 : public content::BrowserChildProcessHostTypeIterator< | 164 : public content::BrowserChildProcessHostTypeIterator< |
| 157 PpapiPluginProcessHost> { | 165 PpapiPluginProcessHost> { |
| 158 public: | 166 public: |
| 159 PpapiBrokerProcessHostIterator() | 167 PpapiBrokerProcessHostIterator() |
| 160 : content::BrowserChildProcessHostTypeIterator< | 168 : content::BrowserChildProcessHostTypeIterator< |
| 161 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} | 169 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} |
| 162 }; | 170 }; |
| 163 | 171 |
| 164 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ | 172 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ |
| 165 | 173 |
| OLD | NEW |