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

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

Issue 11794042: Switch to using FilePathWatcher::Callback instead of FilePathWatcher::Delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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 | « no previous file | content/browser/plugin_service_impl.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) 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 int render_process_id, 189 int render_process_id,
190 int render_view_id, 190 int render_view_id,
191 const GURL& url, 191 const GURL& url,
192 const GURL& page_url, 192 const GURL& page_url,
193 const std::string& mime_type, 193 const std::string& mime_type,
194 PluginProcessHost::Client* client, 194 PluginProcessHost::Client* client,
195 ResourceContext* resource_context); 195 ResourceContext* resource_context);
196 196
197 // Helper so we can finish opening the channel after looking up the 197 // Helper so we can finish opening the channel after looking up the
198 // plugin. 198 // plugin.
199 void FinishOpenChannelToPlugin( 199 void FinishOpenChannelToPlugin(const FilePath& plugin_path,
200 const FilePath& plugin_path, 200 PluginProcessHost::Client* client);
201 PluginProcessHost::Client* client);
202 201
203 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) 202 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID)
204 // Registers a new FilePathWatcher for a given path. 203 // Registers a new FilePathWatcher for a given path.
205 static void RegisterFilePathWatcher( 204 static void RegisterFilePathWatcher(base::files::FilePathWatcher* watcher,
206 base::files::FilePathWatcher* watcher, 205 const FilePath& path);
207 const FilePath& path,
208 base::files::FilePathWatcher::Delegate* delegate);
209 #endif 206 #endif
210 207
211 // The plugin list instance. 208 // The plugin list instance.
212 webkit::npapi::PluginList* plugin_list_; 209 webkit::npapi::PluginList* plugin_list_;
213 210
214 #if defined(OS_WIN) 211 #if defined(OS_WIN)
215 // Registry keys for getting notifications when new plugins are installed. 212 // Registry keys for getting notifications when new plugins are installed.
216 base::win::RegKey hkcu_key_; 213 base::win::RegKey hkcu_key_;
217 base::win::RegKey hklm_key_; 214 base::win::RegKey hklm_key_;
218 scoped_ptr<base::WaitableEvent> hkcu_event_; 215 scoped_ptr<base::WaitableEvent> hkcu_event_;
219 scoped_ptr<base::WaitableEvent> hklm_event_; 216 scoped_ptr<base::WaitableEvent> hklm_event_;
220 base::WaitableEventWatcher hkcu_watcher_; 217 base::WaitableEventWatcher hkcu_watcher_;
221 base::WaitableEventWatcher hklm_watcher_; 218 base::WaitableEventWatcher hklm_watcher_;
222 #endif 219 #endif
223 220
224 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) 221 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID)
225 ScopedVector<base::files::FilePathWatcher> file_watchers_; 222 ScopedVector<base::files::FilePathWatcher> file_watchers_;
226 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_;
227 #endif 223 #endif
228 224
229 std::vector<PepperPluginInfo> ppapi_plugins_; 225 std::vector<PepperPluginInfo> ppapi_plugins_;
230 226
231 // Weak pointer; outlives us. 227 // Weak pointer; outlives us.
232 PluginServiceFilter* filter_; 228 PluginServiceFilter* filter_;
233 229
234 std::set<PluginProcessHost::Client*> pending_plugin_clients_; 230 std::set<PluginProcessHost::Client*> pending_plugin_clients_;
235 231
236 // Used to sequentialize loading plug-ins from disk. 232 // Used to sequentialize loading plug-ins from disk.
237 base::SequencedWorkerPool::SequenceToken plugin_list_token_; 233 base::SequencedWorkerPool::SequenceToken plugin_list_token_;
238 234
239 #if defined(OS_POSIX) 235 #if defined(OS_POSIX)
240 scoped_refptr<PluginLoaderPosix> plugin_loader_; 236 scoped_refptr<PluginLoaderPosix> plugin_loader_;
241 #endif 237 #endif
242 238
243 // Used to detect if a given plug-in is crashing over and over. 239 // Used to detect if a given plug-in is crashing over and over.
244 std::map<FilePath, std::vector<base::Time> > crash_times_; 240 std::map<FilePath, std::vector<base::Time> > crash_times_;
245 241
246 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); 242 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl);
247 }; 243 };
248 244
249 } // namespace content 245 } // namespace content
250 246
251 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 247 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698