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

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

Issue 11577031: Exclude more plugins code for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This class responds to requests from renderers for the list of plugins, and 5 // This class responds to requests from renderers for the list of plugins, and
6 // also a proxy object for plugin instances. 6 // also a proxy object for plugin instances.
7 7
8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE; 108 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE;
109 virtual void GetInternalPlugins( 109 virtual void GetInternalPlugins(
110 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; 110 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE;
111 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE; 111 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE;
112 virtual void SetPluginListForTesting( 112 virtual void SetPluginListForTesting(
113 webkit::npapi::PluginList* plugin_list) OVERRIDE; 113 webkit::npapi::PluginList* plugin_list) OVERRIDE;
114 #if defined(OS_MACOSX) 114 #if defined(OS_MACOSX)
115 virtual void AppActivated() OVERRIDE; 115 virtual void AppActivated() OVERRIDE;
116 #endif 116 #endif
117 117
118 // Returns the plugin process host corresponding to the plugin process that
119 // has been started by this service. This will start a process to host the
120 // 'plugin_path' if needed. If the process fails to start, the return value
121 // is NULL. Must be called on the IO thread.
122 PluginProcessHost* FindOrStartNpapiPluginProcess(
123 const FilePath& plugin_path);
124 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess(
125 const FilePath& plugin_path,
126 const FilePath& profile_data_directory,
127 PpapiPluginProcessHost::PluginClient* client);
128 PpapiPluginProcessHost* FindOrStartPpapiBrokerProcess(
129 const FilePath& plugin_path);
130
131 // Opens a channel to a plugin process for the given mime type, starting 118 // Opens a channel to a plugin process for the given mime type, starting
132 // a new plugin process if necessary. This must be called on the IO thread 119 // a new plugin process if necessary. This must be called on the IO thread
133 // or else a deadlock can occur. 120 // or else a deadlock can occur.
134 void OpenChannelToNpapiPlugin(int render_process_id, 121 void OpenChannelToNpapiPlugin(int render_process_id,
135 int render_view_id, 122 int render_view_id,
136 const GURL& url, 123 const GURL& url,
137 const GURL& page_url, 124 const GURL& page_url,
138 const std::string& mime_type, 125 const std::string& mime_type,
139 PluginProcessHost::Client* client); 126 PluginProcessHost::Client* client);
140 void OpenChannelToPpapiPlugin(const FilePath& plugin_path, 127 void OpenChannelToPpapiPlugin(const FilePath& plugin_path,
(...skipping 14 matching lines...) Expand all
155 // Creates the PluginServiceImpl object, but doesn't actually build the plugin 142 // Creates the PluginServiceImpl object, but doesn't actually build the plugin
156 // list yet. It's generated lazily. 143 // list yet. It's generated lazily.
157 PluginServiceImpl(); 144 PluginServiceImpl();
158 virtual ~PluginServiceImpl(); 145 virtual ~PluginServiceImpl();
159 146
160 // base::WaitableEventWatcher::Delegate implementation. 147 // base::WaitableEventWatcher::Delegate implementation.
161 virtual void OnWaitableEventSignaled( 148 virtual void OnWaitableEventSignaled(
162 base::WaitableEvent* waitable_event) OVERRIDE; 149 base::WaitableEvent* waitable_event) OVERRIDE;
163 150
164 // Returns the plugin process host corresponding to the plugin process that 151 // Returns the plugin process host corresponding to the plugin process that
152 // has been started by this service. This will start a process to host the
153 // 'plugin_path' if needed. If the process fails to start, the return value
154 // is NULL. Must be called on the IO thread.
155 PluginProcessHost* FindOrStartNpapiPluginProcess(
156 const FilePath& plugin_path);
157 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess(
158 const FilePath& plugin_path,
159 const FilePath& profile_data_directory,
160 PpapiPluginProcessHost::PluginClient* client);
161 PpapiPluginProcessHost* FindOrStartPpapiBrokerProcess(
162 const FilePath& plugin_path);
163
164 // Returns the plugin process host corresponding to the plugin process that
165 // has been started by this service. Returns NULL if no process has been 165 // has been started by this service. Returns NULL if no process has been
166 // started. 166 // started.
167 PluginProcessHost* FindNpapiPluginProcess(const FilePath& plugin_path); 167 PluginProcessHost* FindNpapiPluginProcess(const FilePath& plugin_path);
168 PpapiPluginProcessHost* FindPpapiPluginProcess( 168 PpapiPluginProcessHost* FindPpapiPluginProcess(
169 const FilePath& plugin_path, 169 const FilePath& plugin_path,
170 const FilePath& profile_data_directory); 170 const FilePath& profile_data_directory);
171 PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path); 171 PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path);
172 172
173 void RegisterPepperPlugins(); 173 void RegisterPepperPlugins();
174 174
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 // Used to detect if a given plug-in is crashing over and over. 246 // Used to detect if a given plug-in is crashing over and over.
247 std::map<FilePath, std::vector<base::Time> > crash_times_; 247 std::map<FilePath, std::vector<base::Time> > crash_times_;
248 248
249 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); 249 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl);
250 }; 250 };
251 251
252 } // namespace content 252 } // namespace content
253 253
254 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 254 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698