| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 // 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 CHROME_BROWSER_PLUGIN_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_PLUGIN_SERVICE_H_ |
| 9 #define CHROME_BROWSER_PLUGIN_SERVICE_H_ | 9 #define CHROME_BROWSER_PLUGIN_SERVICE_H_ |
| 10 | 10 |
| 11 #include <vector> | 11 #include <vector> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 25 #include "base/registry.h" | 25 #include "base/registry.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 namespace IPC { | 28 namespace IPC { |
| 29 class Message; | 29 class Message; |
| 30 } | 30 } |
| 31 | 31 |
| 32 class MessageLoop; | 32 class MessageLoop; |
| 33 class PluginProcessHost; | 33 class PluginProcessHost; |
| 34 class Profile; |
| 34 class URLRequestContext; | 35 class URLRequestContext; |
| 35 class ResourceDispatcherHost; | 36 class ResourceDispatcherHost; |
| 36 class ResourceMessageFilter; | 37 class ResourceMessageFilter; |
| 37 | 38 |
| 38 // This must be created on the main thread but it's only called on the IO/file | 39 // This must be created on the main thread but it's only called on the IO/file |
| 39 // thread. | 40 // thread. |
| 40 class PluginService | 41 class PluginService |
| 41 : public base::WaitableEventWatcher::Delegate, | 42 : public base::WaitableEventWatcher::Delegate, |
| 42 public NotificationObserver { | 43 public NotificationObserver { |
| 43 public: | 44 public: |
| 45 // Initializes the global instance; should be called on startup from the main |
| 46 // thread. |
| 47 static void InitGlobalInstance(Profile* profile); |
| 48 |
| 44 // Returns the PluginService singleton. | 49 // Returns the PluginService singleton. |
| 45 static PluginService* GetInstance(); | 50 static PluginService* GetInstance(); |
| 46 | 51 |
| 47 // Load all the plugins that should be loaded for the lifetime of the browser | 52 // Load all the plugins that should be loaded for the lifetime of the browser |
| 48 // (ie, with the LoadOnStartup flag set). | 53 // (ie, with the LoadOnStartup flag set). |
| 49 void LoadChromePlugins(ResourceDispatcherHost* resource_dispatcher_host); | 54 void LoadChromePlugins(ResourceDispatcherHost* resource_dispatcher_host); |
| 50 | 55 |
| 51 // Sets/gets the data directory that Chrome plugins should use to store | 56 // Sets/gets the data directory that Chrome plugins should use to store |
| 52 // persistent data. | 57 // persistent data. |
| 53 void SetChromePluginDataDir(const FilePath& data_dir); | 58 void SetChromePluginDataDir(const FilePath& data_dir); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 base::WaitableEventWatcher hklm_watcher_; | 150 base::WaitableEventWatcher hklm_watcher_; |
| 146 #endif | 151 #endif |
| 147 | 152 |
| 148 // Set to true if chrome plugins are enabled. Defaults to true. | 153 // Set to true if chrome plugins are enabled. Defaults to true. |
| 149 static bool enable_chrome_plugins_; | 154 static bool enable_chrome_plugins_; |
| 150 | 155 |
| 151 DISALLOW_COPY_AND_ASSIGN(PluginService); | 156 DISALLOW_COPY_AND_ASSIGN(PluginService); |
| 152 }; | 157 }; |
| 153 | 158 |
| 154 #endif // CHROME_BROWSER_PLUGIN_SERVICE_H_ | 159 #endif // CHROME_BROWSER_PLUGIN_SERVICE_H_ |
| OLD | NEW |