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 15 matching lines...) Expand all Loading... |
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 #include "webkit/plugins/npapi/webplugininfo.h" | 28 #include "webkit/plugins/npapi/webplugininfo.h" |
29 | 29 |
30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
31 #include "base/memory/scoped_ptr.h" | 31 #include "base/memory/scoped_ptr.h" |
32 #include "base/win/registry.h" | 32 #include "base/win/registry.h" |
33 #endif | 33 #endif |
34 | 34 |
35 #if defined(OS_LINUX) | 35 #if defined(OS_LINUX) |
36 #include "content/common/file_path_watcher/file_path_watcher.h" | 36 #include "base/files/file_path_watcher.h" |
37 #endif | 37 #endif |
38 | 38 |
39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
40 namespace chromeos { | 40 namespace chromeos { |
41 class PluginSelectionPolicy; | 41 class PluginSelectionPolicy; |
42 } | 42 } |
43 #endif | 43 #endif |
44 | 44 |
45 namespace IPC { | 45 namespace IPC { |
46 class Message; | 46 class Message; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 // Helper so we can finish opening the channel after looking up the | 163 // Helper so we can finish opening the channel after looking up the |
164 // plugin. | 164 // plugin. |
165 void FinishOpenChannelToPlugin( | 165 void FinishOpenChannelToPlugin( |
166 const FilePath& plugin_path, | 166 const FilePath& plugin_path, |
167 PluginProcessHost::Client* client); | 167 PluginProcessHost::Client* client); |
168 | 168 |
169 #if defined(OS_LINUX) | 169 #if defined(OS_LINUX) |
170 // Registers a new FilePathWatcher for a given path. | 170 // Registers a new FilePathWatcher for a given path. |
171 static void RegisterFilePathWatcher( | 171 static void RegisterFilePathWatcher( |
172 FilePathWatcher* watcher, | 172 base::files::FilePathWatcher* watcher, |
173 const FilePath& path, | 173 const FilePath& path, |
174 FilePathWatcher::Delegate* delegate); | 174 base::files::FilePathWatcher::Delegate* delegate); |
175 #endif | 175 #endif |
176 | 176 |
177 // The main thread's message loop. | 177 // The main thread's message loop. |
178 MessageLoop* main_message_loop_; | 178 MessageLoop* main_message_loop_; |
179 | 179 |
180 // The browser's UI locale. | 180 // The browser's UI locale. |
181 const std::string ui_locale_; | 181 const std::string ui_locale_; |
182 | 182 |
183 // Map of plugin paths to the origin they are restricted to. | 183 // Map of plugin paths to the origin they are restricted to. |
184 base::Lock restricted_plugin_lock_; // Guards access to restricted_plugin_. | 184 base::Lock restricted_plugin_lock_; // Guards access to restricted_plugin_. |
(...skipping 10 matching lines...) Expand all Loading... |
195 // Registry keys for getting notifications when new plugins are installed. | 195 // Registry keys for getting notifications when new plugins are installed. |
196 base::win::RegKey hkcu_key_; | 196 base::win::RegKey hkcu_key_; |
197 base::win::RegKey hklm_key_; | 197 base::win::RegKey hklm_key_; |
198 scoped_ptr<base::WaitableEvent> hkcu_event_; | 198 scoped_ptr<base::WaitableEvent> hkcu_event_; |
199 scoped_ptr<base::WaitableEvent> hklm_event_; | 199 scoped_ptr<base::WaitableEvent> hklm_event_; |
200 base::WaitableEventWatcher hkcu_watcher_; | 200 base::WaitableEventWatcher hkcu_watcher_; |
201 base::WaitableEventWatcher hklm_watcher_; | 201 base::WaitableEventWatcher hklm_watcher_; |
202 #endif | 202 #endif |
203 | 203 |
204 #if defined(OS_LINUX) | 204 #if defined(OS_LINUX) |
205 ScopedVector<FilePathWatcher> file_watchers_; | 205 ScopedVector<base::files::FilePathWatcher> file_watchers_; |
206 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_; | 206 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_; |
207 #endif | 207 #endif |
208 | 208 |
209 std::vector<PepperPluginInfo> ppapi_plugins_; | 209 std::vector<PepperPluginInfo> ppapi_plugins_; |
210 | 210 |
211 std::vector<OverriddenPlugin> overridden_plugins_; | 211 std::vector<OverriddenPlugin> overridden_plugins_; |
212 base::Lock overridden_plugins_lock_; | 212 base::Lock overridden_plugins_lock_; |
213 | 213 |
214 DISALLOW_COPY_AND_ASSIGN(PluginService); | 214 DISALLOW_COPY_AND_ASSIGN(PluginService); |
215 }; | 215 }; |
216 | 216 |
217 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); | 217 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); |
218 | 218 |
219 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 219 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
OLD | NEW |