Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: chrome/browser/plugin_process_host.h

Issue 5874002: Create a ResourceMessageFilter to filter resource related IPCs. This gets ri... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 10 matching lines...) Expand all
21 #include "webkit/glue/plugins/webplugininfo.h" 21 #include "webkit/glue/plugins/webplugininfo.h"
22 22
23 namespace gfx { 23 namespace gfx {
24 class Rect; 24 class Rect;
25 } 25 }
26 26
27 namespace IPC { 27 namespace IPC {
28 struct ChannelHandle; 28 struct ChannelHandle;
29 } 29 }
30 30
31 class URLRequestContext;
32 struct ViewHostMsg_Resource_Request;
33 class GURL; 31 class GURL;
34 32
35 // Represents the browser side of the browser <--> plugin communication 33 // Represents the browser side of the browser <--> plugin communication
36 // channel. Different plugins run in their own process, but multiple instances 34 // channel. Different plugins run in their own process, but multiple instances
37 // of the same plugin run in the same process. There will be one 35 // of the same plugin run in the same process. There will be one
38 // PluginProcessHost per plugin process, matched with a corresponding 36 // PluginProcessHost per plugin process, matched with a corresponding
39 // PluginProcess running in the plugin process. The browser is responsible for 37 // PluginProcess running in the plugin process. The browser is responsible for
40 // starting the plugin process when a plugin is created that doesn't already 38 // starting the plugin process when a plugin is created that doesn't already
41 // have a process. After that, most of the communication is directly between 39 // have a process. After that, most of the communication is directly between
42 // the renderer and plugin processes. 40 // the renderer and plugin processes.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const WebPluginInfo& info() const { return info_; } 95 const WebPluginInfo& info() const { return info_; }
98 96
99 #if defined(OS_WIN) 97 #if defined(OS_WIN)
100 // Tracks plugin parent windows created on the browser UI thread. 98 // Tracks plugin parent windows created on the browser UI thread.
101 void AddWindow(HWND window); 99 void AddWindow(HWND window);
102 #endif 100 #endif
103 101
104 private: 102 private:
105 friend class PluginResolveProxyHelper; 103 friend class PluginResolveProxyHelper;
106 104
107 // ResourceDispatcherHost::Receiver implementation:
108 virtual URLRequestContext* GetRequestContext(
109 uint32 request_id,
110 const ViewHostMsg_Resource_Request& request_data);
111
112 // Sends a message to the plugin process to request creation of a new channel 105 // Sends a message to the plugin process to request creation of a new channel
113 // for the given mime type. 106 // for the given mime type.
114 void RequestPluginChannel(Client* client); 107 void RequestPluginChannel(Client* client);
115 108
116 virtual void OnProcessLaunched(); 109 virtual void OnProcessLaunched();
117 110
118 // Message handlers. 111 // Message handlers.
119 void OnChannelCreated(const IPC::ChannelHandle& channel_handle); 112 void OnChannelCreated(const IPC::ChannelHandle& channel_handle);
120 void OnGetPluginFinderUrl(std::string* plugin_finder_url); 113 void OnGetPluginFinderUrl(std::string* plugin_finder_url);
121 void OnGetCookies(uint32 request_context, const GURL& url, 114 void OnGetCookies(uint32 request_context, const GURL& url,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Tracks modal windows currently visible. 168 // Tracks modal windows currently visible.
176 std::set<uint32> plugin_modal_windows_set_; 169 std::set<uint32> plugin_modal_windows_set_;
177 // Tracks the current visibility of the cursor. 170 // Tracks the current visibility of the cursor.
178 bool plugin_cursor_visible_; 171 bool plugin_cursor_visible_;
179 #endif 172 #endif
180 173
181 DISALLOW_COPY_AND_ASSIGN(PluginProcessHost); 174 DISALLOW_COPY_AND_ASSIGN(PluginProcessHost);
182 }; 175 };
183 176
184 #endif // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_ 177 #endif // CHROME_BROWSER_PLUGIN_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698