OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
13 #include "base/gfx/native_widget_types.h" | 14 #include "base/gfx/native_widget_types.h" |
14 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
15 #include "base/task.h" | 16 #include "base/task.h" |
16 #include "chrome/browser/net/resolve_proxy_msg_helper.h" | 17 #include "chrome/browser/net/resolve_proxy_msg_helper.h" |
17 #include "chrome/browser/renderer_host/resource_message_filter.h" | 18 #include "chrome/browser/renderer_host/resource_message_filter.h" |
18 #include "chrome/common/child_process_host.h" | 19 #include "chrome/common/child_process_host.h" |
19 #include "webkit/glue/webplugin.h" | 20 #include "webkit/glue/webplugin.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // modal HTML dialog (in the form of a JSON string). This function forwards | 73 // modal HTML dialog (in the form of a JSON string). This function forwards |
73 // that reply back to the plugin that requested the dialog. | 74 // that reply back to the plugin that requested the dialog. |
74 void OnModalDialogResponse(const std::string& json_retval, | 75 void OnModalDialogResponse(const std::string& json_retval, |
75 IPC::Message* sync_result); | 76 IPC::Message* sync_result); |
76 | 77 |
77 // Shuts down the current plugin process instance. | 78 // Shuts down the current plugin process instance. |
78 void Shutdown(); | 79 void Shutdown(); |
79 | 80 |
80 const WebPluginInfo& info() const { return info_; } | 81 const WebPluginInfo& info() const { return info_; } |
81 | 82 |
| 83 #if defined(OS_WIN) |
| 84 // Tracks plugin parent windows created on the browser UI thread. |
| 85 void AddWindow(HWND window); |
| 86 #endif |
| 87 |
82 private: | 88 private: |
83 friend class PluginResolveProxyHelper; | 89 friend class PluginResolveProxyHelper; |
84 | 90 |
85 // Sends a message to the plugin process to request creation of a new channel | 91 // Sends a message to the plugin process to request creation of a new channel |
86 // for the given mime type. | 92 // for the given mime type. |
87 void RequestPluginChannel(ResourceMessageFilter* renderer_message_filter, | 93 void RequestPluginChannel(ResourceMessageFilter* renderer_message_filter, |
88 const std::string& mime_type, | 94 const std::string& mime_type, |
89 IPC::Message* reply_msg); | 95 IPC::Message* reply_msg); |
90 // Message handlers. | 96 // Message handlers. |
91 void OnChannelCreated(int process_id, const std::wstring& channel_name); | 97 void OnChannelCreated(int process_id, const std::wstring& channel_name); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // the plugin process, but haven't heard back about yet. | 136 // the plugin process, but haven't heard back about yet. |
131 std::vector<ChannelRequest> sent_requests_; | 137 std::vector<ChannelRequest> sent_requests_; |
132 | 138 |
133 // Information about the plugin. | 139 // Information about the plugin. |
134 WebPluginInfo info_; | 140 WebPluginInfo info_; |
135 | 141 |
136 // Helper class for handling PluginProcessHost_ResolveProxy messages (manages | 142 // Helper class for handling PluginProcessHost_ResolveProxy messages (manages |
137 // the requests to the proxy service). | 143 // the requests to the proxy service). |
138 ResolveProxyMsgHelper resolve_proxy_msg_helper_; | 144 ResolveProxyMsgHelper resolve_proxy_msg_helper_; |
139 | 145 |
| 146 #if defined(OS_WIN) |
| 147 // Tracks plugin parent windows created on the UI thread. |
| 148 std::set<HWND> plugin_parent_windows_set_; |
| 149 #endif |
| 150 |
140 DISALLOW_EVIL_CONSTRUCTORS(PluginProcessHost); | 151 DISALLOW_EVIL_CONSTRUCTORS(PluginProcessHost); |
141 }; | 152 }; |
142 | 153 |
143 #endif // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ | 154 #endif // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ |
144 | 155 |
OLD | NEW |