OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 22 matching lines...) Expand all Loading... |
33 // starting the plugin process when a plugin is created that doesn't already | 33 // starting the plugin process when a plugin is created that doesn't already |
34 // have a process. After that, most of the communication is directly between | 34 // have a process. After that, most of the communication is directly between |
35 // the renderer and plugin processes. | 35 // the renderer and plugin processes. |
36 class PluginProcessHost : public ChildProcessHost, | 36 class PluginProcessHost : public ChildProcessHost, |
37 public ResolveProxyMsgHelper::Delegate { | 37 public ResolveProxyMsgHelper::Delegate { |
38 public: | 38 public: |
39 PluginProcessHost(); | 39 PluginProcessHost(); |
40 ~PluginProcessHost(); | 40 ~PluginProcessHost(); |
41 | 41 |
42 // Initialize the new plugin process, returning true on success. This must | 42 // Initialize the new plugin process, returning true on success. This must |
43 // be called before the object can be used. If plugin_path is the | 43 // be called before the object can be used. |
44 // ActiveX-shim, then activex_clsid is the class id of ActiveX control, | 44 bool Init(const WebPluginInfo& info, const std::wstring& locale); |
45 // otherwise activex_clsid is ignored. | |
46 bool Init(const WebPluginInfo& info, | |
47 const std::string& activex_clsid, | |
48 const std::wstring& locale); | |
49 | 45 |
50 virtual void OnMessageReceived(const IPC::Message& msg); | 46 virtual void OnMessageReceived(const IPC::Message& msg); |
51 virtual void OnChannelConnected(int32 peer_pid); | 47 virtual void OnChannelConnected(int32 peer_pid); |
52 virtual void OnChannelError(); | 48 virtual void OnChannelError(); |
53 | 49 |
54 // ResolveProxyMsgHelper::Delegate implementation: | 50 // ResolveProxyMsgHelper::Delegate implementation: |
55 virtual void OnResolveProxyCompleted(IPC::Message* reply_msg, | 51 virtual void OnResolveProxyCompleted(IPC::Message* reply_msg, |
56 int result, | 52 int result, |
57 const std::string& proxy_list); | 53 const std::string& proxy_list); |
58 | 54 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 141 |
146 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
147 // Tracks plugin parent windows created on the UI thread. | 143 // Tracks plugin parent windows created on the UI thread. |
148 std::set<HWND> plugin_parent_windows_set_; | 144 std::set<HWND> plugin_parent_windows_set_; |
149 #endif | 145 #endif |
150 | 146 |
151 DISALLOW_EVIL_CONSTRUCTORS(PluginProcessHost); | 147 DISALLOW_EVIL_CONSTRUCTORS(PluginProcessHost); |
152 }; | 148 }; |
153 | 149 |
154 #endif // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ | 150 #endif // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ |
OLD | NEW |