| OLD | NEW |
| 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 // 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_H_ | 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
| 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
| 25 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
| 26 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
| 27 #include "ipc/ipc_channel_handle.h" | 27 #include "ipc/ipc_channel_handle.h" |
| 28 | 28 |
| 29 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
| 30 #include "base/memory/scoped_ptr.h" | 30 #include "base/memory/scoped_ptr.h" |
| 31 #include "base/win/registry.h" | 31 #include "base/win/registry.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 34 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) |
| 35 #include "base/files/file_path_watcher.h" | 35 #include "base/files/file_path_watcher.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 class PluginDirWatcherDelegate; | 38 class PluginDirWatcherDelegate; |
| 39 class PluginLoaderPosix; | 39 class PluginLoaderPosix; |
| 40 | 40 |
| 41 namespace base { | 41 namespace base { |
| 42 class MessageLoopProxy; | 42 class MessageLoopProxy; |
| 43 } | 43 } |
| 44 | 44 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 const std::string& mime_type, | 217 const std::string& mime_type, |
| 218 PluginProcessHost::Client* client, | 218 PluginProcessHost::Client* client, |
| 219 const content::ResourceContext* resource_context); | 219 const content::ResourceContext* resource_context); |
| 220 | 220 |
| 221 // Helper so we can finish opening the channel after looking up the | 221 // Helper so we can finish opening the channel after looking up the |
| 222 // plugin. | 222 // plugin. |
| 223 void FinishOpenChannelToPlugin( | 223 void FinishOpenChannelToPlugin( |
| 224 const FilePath& plugin_path, | 224 const FilePath& plugin_path, |
| 225 PluginProcessHost::Client* client); | 225 PluginProcessHost::Client* client); |
| 226 | 226 |
| 227 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 227 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) |
| 228 // Registers a new FilePathWatcher for a given path. | 228 // Registers a new FilePathWatcher for a given path. |
| 229 static void RegisterFilePathWatcher( | 229 static void RegisterFilePathWatcher( |
| 230 base::files::FilePathWatcher* watcher, | 230 base::files::FilePathWatcher* watcher, |
| 231 const FilePath& path, | 231 const FilePath& path, |
| 232 base::files::FilePathWatcher::Delegate* delegate); | 232 base::files::FilePathWatcher::Delegate* delegate); |
| 233 #endif | 233 #endif |
| 234 | 234 |
| 235 // The browser's UI locale. | 235 // The browser's UI locale. |
| 236 const std::string ui_locale_; | 236 const std::string ui_locale_; |
| 237 | 237 |
| 238 content::NotificationRegistrar registrar_; | 238 content::NotificationRegistrar registrar_; |
| 239 | 239 |
| 240 #if defined(OS_WIN) | 240 #if defined(OS_WIN) |
| 241 // Registry keys for getting notifications when new plugins are installed. | 241 // Registry keys for getting notifications when new plugins are installed. |
| 242 base::win::RegKey hkcu_key_; | 242 base::win::RegKey hkcu_key_; |
| 243 base::win::RegKey hklm_key_; | 243 base::win::RegKey hklm_key_; |
| 244 scoped_ptr<base::WaitableEvent> hkcu_event_; | 244 scoped_ptr<base::WaitableEvent> hkcu_event_; |
| 245 scoped_ptr<base::WaitableEvent> hklm_event_; | 245 scoped_ptr<base::WaitableEvent> hklm_event_; |
| 246 base::WaitableEventWatcher hkcu_watcher_; | 246 base::WaitableEventWatcher hkcu_watcher_; |
| 247 base::WaitableEventWatcher hklm_watcher_; | 247 base::WaitableEventWatcher hklm_watcher_; |
| 248 #endif | 248 #endif |
| 249 | 249 |
| 250 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 250 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) |
| 251 ScopedVector<base::files::FilePathWatcher> file_watchers_; | 251 ScopedVector<base::files::FilePathWatcher> file_watchers_; |
| 252 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_; | 252 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_; |
| 253 #endif | 253 #endif |
| 254 | 254 |
| 255 std::vector<content::PepperPluginInfo> ppapi_plugins_; | 255 std::vector<content::PepperPluginInfo> ppapi_plugins_; |
| 256 | 256 |
| 257 // Weak pointer; outlives us. | 257 // Weak pointer; outlives us. |
| 258 content::PluginServiceFilter* filter_; | 258 content::PluginServiceFilter* filter_; |
| 259 | 259 |
| 260 std::set<PluginProcessHost::Client*> pending_plugin_clients_; | 260 std::set<PluginProcessHost::Client*> pending_plugin_clients_; |
| 261 | 261 |
| 262 #if defined(OS_POSIX) | 262 #if defined(OS_POSIX) |
| 263 scoped_refptr<PluginLoaderPosix> plugin_loader_; | 263 scoped_refptr<PluginLoaderPosix> plugin_loader_; |
| 264 #endif | 264 #endif |
| 265 | 265 |
| 266 DISALLOW_COPY_AND_ASSIGN(PluginService); | 266 DISALLOW_COPY_AND_ASSIGN(PluginService); |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); | 269 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); |
| 270 | 270 |
| 271 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 271 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
| OLD | NEW |