| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <queue> | 10 #include <queue> | 
| 11 #include <set> | 11 #include <set> | 
| 12 #include <string> | 12 #include <string> | 
| 13 #include <vector> | 13 #include <vector> | 
| 14 | 14 | 
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" | 
| 16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" | 
| 17 #include "base/task.h" | 17 #include "base/task.h" | 
| 18 #include "chrome/browser/child_process_host.h" | 18 #include "chrome/browser/browser_child_process_host.h" | 
| 19 #include "chrome/browser/net/resolve_proxy_msg_helper.h" | 19 #include "chrome/browser/net/resolve_proxy_msg_helper.h" | 
| 20 #include "chrome/browser/renderer_host/resource_message_filter.h" | 20 #include "chrome/browser/renderer_host/resource_message_filter.h" | 
| 21 #include "gfx/native_widget_types.h" | 21 #include "gfx/native_widget_types.h" | 
| 22 #include "ipc/ipc_channel_handle.h" | 22 #include "ipc/ipc_channel_handle.h" | 
| 23 #include "webkit/glue/plugins/webplugininfo.h" | 23 #include "webkit/glue/plugins/webplugininfo.h" | 
| 24 | 24 | 
| 25 class URLRequestContext; | 25 class URLRequestContext; | 
| 26 struct ViewHostMsg_Resource_Request; | 26 struct ViewHostMsg_Resource_Request; | 
| 27 class GURL; | 27 class GURL; | 
| 28 | 28 | 
| 29 // Represents the browser side of the browser <--> plugin communication | 29 // Represents the browser side of the browser <--> plugin communication | 
| 30 // channel.  Different plugins run in their own process, but multiple instances | 30 // channel.  Different plugins run in their own process, but multiple instances | 
| 31 // of the same plugin run in the same process.  There will be one | 31 // of the same plugin run in the same process.  There will be one | 
| 32 // PluginProcessHost per plugin process, matched with a corresponding | 32 // PluginProcessHost per plugin process, matched with a corresponding | 
| 33 // PluginProcess running in the plugin process.  The browser is responsible for | 33 // PluginProcess running in the plugin process.  The browser is responsible for | 
| 34 // starting the plugin process when a plugin is created that doesn't already | 34 // starting the plugin process when a plugin is created that doesn't already | 
| 35 // have a process.  After that, most of the communication is directly between | 35 // have a process.  After that, most of the communication is directly between | 
| 36 // the renderer and plugin processes. | 36 // the renderer and plugin processes. | 
| 37 class PluginProcessHost : public ChildProcessHost, | 37 class PluginProcessHost : public BrowserChildProcessHost, | 
| 38                           public ResolveProxyMsgHelper::Delegate { | 38                           public ResolveProxyMsgHelper::Delegate { | 
| 39  public: | 39  public: | 
| 40   PluginProcessHost(); | 40   PluginProcessHost(); | 
| 41   ~PluginProcessHost(); | 41   ~PluginProcessHost(); | 
| 42 | 42 | 
| 43   // Initialize the new plugin process, returning true on success. This must | 43   // Initialize the new plugin process, returning true on success. This must | 
| 44   // be called before the object can be used. | 44   // be called before the object can be used. | 
| 45   bool Init(const WebPluginInfo& info, const std::wstring& locale); | 45   bool Init(const WebPluginInfo& info, const std::wstring& locale); | 
| 46 | 46 | 
| 47   // Force the plugin process to shutdown (cleanly). | 47   // Force the plugin process to shutdown (cleanly). | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 173   // Tracks modal windows currently visible. | 173   // Tracks modal windows currently visible. | 
| 174   std::set<uint32> plugin_modal_windows_set_; | 174   std::set<uint32> plugin_modal_windows_set_; | 
| 175   // Tracks the current visibility of the cursor. | 175   // Tracks the current visibility of the cursor. | 
| 176   bool plugin_cursor_visible_; | 176   bool plugin_cursor_visible_; | 
| 177 #endif | 177 #endif | 
| 178 | 178 | 
| 179   DISALLOW_COPY_AND_ASSIGN(PluginProcessHost); | 179   DISALLOW_COPY_AND_ASSIGN(PluginProcessHost); | 
| 180 }; | 180 }; | 
| 181 | 181 | 
| 182 #endif  // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ | 182 #endif  // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ | 
| OLD | NEW | 
|---|