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

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

Issue 8774040: Don't make classes derive from ChildProcessHost, and instead have them use it through composition... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linker errors on posix Created 9 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
« no previous file with comments | « content/browser/plugin_loader_posix.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PLUGIN_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ 6 #define CONTENT_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
11 #include <list> 11 #include <list>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "content/browser/browser_child_process_host.h" 18 #include "content/browser/browser_child_process_host.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "ipc/ipc_channel_proxy.h"
20 #include "webkit/plugins/webplugininfo.h" 21 #include "webkit/plugins/webplugininfo.h"
21 #include "ui/gfx/native_widget_types.h" 22 #include "ui/gfx/native_widget_types.h"
22 23
23 namespace content { 24 namespace content {
24 class ResourceContext; 25 class ResourceContext;
25 } 26 }
26 27
27 namespace gfx { 28 namespace gfx {
28 class Rect; 29 class Rect;
29 } 30 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 }; 63 };
63 64
64 PluginProcessHost(); 65 PluginProcessHost();
65 virtual ~PluginProcessHost(); 66 virtual ~PluginProcessHost();
66 67
67 // Initialize the new plugin process, returning true on success. This must 68 // Initialize the new plugin process, returning true on success. This must
68 // be called before the object can be used. 69 // be called before the object can be used.
69 bool Init(const webkit::WebPluginInfo& info, const std::string& locale); 70 bool Init(const webkit::WebPluginInfo& info, const std::string& locale);
70 71
71 // Force the plugin process to shutdown (cleanly). 72 // Force the plugin process to shutdown (cleanly).
72 virtual void ForceShutdown() OVERRIDE; 73 void ForceShutdown();
73 74
74 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 75 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
75 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 76 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
76 virtual void OnChannelError() OVERRIDE; 77 virtual void OnChannelError() OVERRIDE;
77 78
78 // Tells the plugin process to create a new channel for communication with a 79 // Tells the plugin process to create a new channel for communication with a
79 // renderer. When the plugin process responds with the channel name, 80 // renderer. When the plugin process responds with the channel name,
80 // OnChannelOpened in the client is called. 81 // OnChannelOpened in the client is called.
81 void OpenChannelToPlugin(Client* client); 82 void OpenChannelToPlugin(Client* client);
82 83
(...skipping 19 matching lines...) Expand all
102 void OnAppActivation(); 103 void OnAppActivation();
103 #endif 104 #endif
104 105
105 const webkit::WebPluginInfo& info() const { return info_; } 106 const webkit::WebPluginInfo& info() const { return info_; }
106 107
107 #if defined(OS_WIN) 108 #if defined(OS_WIN)
108 // Tracks plugin parent windows created on the browser UI thread. 109 // Tracks plugin parent windows created on the browser UI thread.
109 void AddWindow(HWND window); 110 void AddWindow(HWND window);
110 #endif 111 #endif
111 112
113 // Adds an IPC message filter. A reference will be kept to the filter.
114 void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
115
112 private: 116 private:
113 // Sends a message to the plugin process to request creation of a new channel 117 // Sends a message to the plugin process to request creation of a new channel
114 // for the given mime type. 118 // for the given mime type.
115 void RequestPluginChannel(Client* client); 119 void RequestPluginChannel(Client* client);
116 120
117 // Message handlers. 121 // Message handlers.
118 void OnChannelCreated(const IPC::ChannelHandle& channel_handle); 122 void OnChannelCreated(const IPC::ChannelHandle& channel_handle);
119 123
120 #if defined(OS_WIN) 124 #if defined(OS_WIN)
121 void OnPluginWindowDestroyed(HWND window, HWND parent); 125 void OnPluginWindowDestroyed(HWND window, HWND parent);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Tracks modal windows currently visible. 166 // Tracks modal windows currently visible.
163 std::set<uint32> plugin_modal_windows_set_; 167 std::set<uint32> plugin_modal_windows_set_;
164 // Tracks the current visibility of the cursor. 168 // Tracks the current visibility of the cursor.
165 bool plugin_cursor_visible_; 169 bool plugin_cursor_visible_;
166 #endif 170 #endif
167 171
168 DISALLOW_COPY_AND_ASSIGN(PluginProcessHost); 172 DISALLOW_COPY_AND_ASSIGN(PluginProcessHost);
169 }; 173 };
170 174
171 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_ 175 #endif // CONTENT_BROWSER_PLUGIN_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/plugin_loader_posix.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698