OLD | NEW |
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 #pragma once | 10 #pragma once |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE; | 99 virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE; |
100 virtual void RemoveExtraPluginPath(const FilePath& path) OVERRIDE; | 100 virtual void RemoveExtraPluginPath(const FilePath& path) OVERRIDE; |
101 virtual void UnregisterInternalPlugin(const FilePath& path) OVERRIDE; | 101 virtual void UnregisterInternalPlugin(const FilePath& path) OVERRIDE; |
102 virtual void RegisterInternalPlugin( | 102 virtual void RegisterInternalPlugin( |
103 const webkit::WebPluginInfo& info) OVERRIDE; | 103 const webkit::WebPluginInfo& info) OVERRIDE; |
104 virtual string16 GetPluginGroupName(const std::string& plugin_name) OVERRIDE; | 104 virtual string16 GetPluginGroupName(const std::string& plugin_name) OVERRIDE; |
105 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE; | 105 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE; |
106 virtual void SetPluginListForTesting( | 106 virtual void SetPluginListForTesting( |
107 webkit::npapi::PluginList* plugin_list) OVERRIDE; | 107 webkit::npapi::PluginList* plugin_list) OVERRIDE; |
108 | 108 |
109 // Gets the browser's UI locale. | |
110 const std::string& GetUILocale(); | |
111 | |
112 // Like FindNpapiPluginProcess but for Pepper. | 109 // Like FindNpapiPluginProcess but for Pepper. |
113 PpapiPluginProcessHost* FindPpapiPluginProcess(const FilePath& plugin_path); | 110 PpapiPluginProcessHost* FindPpapiPluginProcess(const FilePath& plugin_path); |
114 PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path); | 111 PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path); |
115 | 112 |
116 // Returns the plugin process host corresponding to the plugin process that | 113 // Returns the plugin process host corresponding to the plugin process that |
117 // has been started by this service. This will start a process to host the | 114 // has been started by this service. This will start a process to host the |
118 // 'plugin_path' if needed. If the process fails to start, the return value | 115 // 'plugin_path' if needed. If the process fails to start, the return value |
119 // is NULL. Must be called on the IO thread. | 116 // is NULL. Must be called on the IO thread. |
120 PluginProcessHost* FindOrStartNpapiPluginProcess( | 117 PluginProcessHost* FindOrStartNpapiPluginProcess( |
121 const FilePath& plugin_path); | 118 const FilePath& plugin_path); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Registers a new FilePathWatcher for a given path. | 190 // Registers a new FilePathWatcher for a given path. |
194 static void RegisterFilePathWatcher( | 191 static void RegisterFilePathWatcher( |
195 base::files::FilePathWatcher* watcher, | 192 base::files::FilePathWatcher* watcher, |
196 const FilePath& path, | 193 const FilePath& path, |
197 base::files::FilePathWatcher::Delegate* delegate); | 194 base::files::FilePathWatcher::Delegate* delegate); |
198 #endif | 195 #endif |
199 | 196 |
200 // The plugin list instance. | 197 // The plugin list instance. |
201 webkit::npapi::PluginList* plugin_list_; | 198 webkit::npapi::PluginList* plugin_list_; |
202 | 199 |
203 // The browser's UI locale. | |
204 const std::string ui_locale_; | |
205 | |
206 content::NotificationRegistrar registrar_; | 200 content::NotificationRegistrar registrar_; |
207 | 201 |
208 #if defined(OS_WIN) | 202 #if defined(OS_WIN) |
209 // Registry keys for getting notifications when new plugins are installed. | 203 // Registry keys for getting notifications when new plugins are installed. |
210 base::win::RegKey hkcu_key_; | 204 base::win::RegKey hkcu_key_; |
211 base::win::RegKey hklm_key_; | 205 base::win::RegKey hklm_key_; |
212 scoped_ptr<base::WaitableEvent> hkcu_event_; | 206 scoped_ptr<base::WaitableEvent> hkcu_event_; |
213 scoped_ptr<base::WaitableEvent> hklm_event_; | 207 scoped_ptr<base::WaitableEvent> hklm_event_; |
214 base::WaitableEventWatcher hkcu_watcher_; | 208 base::WaitableEventWatcher hkcu_watcher_; |
215 base::WaitableEventWatcher hklm_watcher_; | 209 base::WaitableEventWatcher hklm_watcher_; |
(...skipping 12 matching lines...) Expand all Loading... |
228 std::set<PluginProcessHost::Client*> pending_plugin_clients_; | 222 std::set<PluginProcessHost::Client*> pending_plugin_clients_; |
229 | 223 |
230 #if defined(OS_POSIX) | 224 #if defined(OS_POSIX) |
231 scoped_refptr<PluginLoaderPosix> plugin_loader_; | 225 scoped_refptr<PluginLoaderPosix> plugin_loader_; |
232 #endif | 226 #endif |
233 | 227 |
234 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); | 228 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); |
235 }; | 229 }; |
236 | 230 |
237 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ | 231 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
OLD | NEW |