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 |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/memory/singleton.h" | 17 #include "base/memory/singleton.h" |
18 #include "base/synchronization/waitable_event_watcher.h" | 18 #include "base/synchronization/waitable_event_watcher.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
20 #include "content/browser/plugin_process_host.h" | 20 #include "content/browser/plugin_process_host.h" |
21 #include "content/browser/ppapi_plugin_process_host.h" | 21 #include "content/browser/ppapi_plugin_process_host.h" |
22 #include "content/browser/ppapi_broker_process_host.h" | 22 #include "content/browser/ppapi_broker_process_host.h" |
| 23 #include "content/common/content_export.h" |
23 #include "content/common/notification_observer.h" | 24 #include "content/common/notification_observer.h" |
24 #include "content/common/notification_registrar.h" | 25 #include "content/common/notification_registrar.h" |
25 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
26 #include "ipc/ipc_channel_handle.h" | 27 #include "ipc/ipc_channel_handle.h" |
27 #include "webkit/plugins/webplugininfo.h" | 28 #include "webkit/plugins/webplugininfo.h" |
28 | 29 |
29 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
30 #include "base/memory/scoped_ptr.h" | 31 #include "base/memory/scoped_ptr.h" |
31 #include "base/win/registry.h" | 32 #include "base/win/registry.h" |
32 #endif | 33 #endif |
33 | 34 |
34 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 35 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
35 #include "base/files/file_path_watcher.h" | 36 #include "base/files/file_path_watcher.h" |
36 #endif | 37 #endif |
37 | 38 |
38 struct PepperPluginInfo; | 39 struct PepperPluginInfo; |
39 class PluginDirWatcherDelegate; | 40 class PluginDirWatcherDelegate; |
40 | 41 |
41 namespace content { | 42 namespace content { |
42 class ResourceContext; | 43 class ResourceContext; |
43 class PluginServiceFilter; | 44 class PluginServiceFilter; |
44 } | 45 } |
45 | 46 |
46 // This must be created on the main thread but it's only called on the IO/file | 47 // This must be created on the main thread but it's only called on the IO/file |
47 // thread. | 48 // thread. |
48 class PluginService | 49 class CONTENT_EXPORT PluginService |
49 : public base::WaitableEventWatcher::Delegate, | 50 : public base::WaitableEventWatcher::Delegate, |
50 public NotificationObserver { | 51 public NotificationObserver { |
51 public: | 52 public: |
52 struct OverriddenPlugin { | 53 struct OverriddenPlugin { |
53 int render_process_id; | 54 int render_process_id; |
54 int render_view_id; | 55 int render_view_id; |
55 GURL url; // If empty, the override applies to all urls in render_view. | 56 GURL url; // If empty, the override applies to all urls in render_view. |
56 webkit::WebPluginInfo plugin; | 57 webkit::WebPluginInfo plugin; |
57 }; | 58 }; |
58 | 59 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 content::PluginServiceFilter* filter_; | 197 content::PluginServiceFilter* filter_; |
197 | 198 |
198 std::set<PluginProcessHost::Client*> pending_plugin_clients_; | 199 std::set<PluginProcessHost::Client*> pending_plugin_clients_; |
199 | 200 |
200 DISALLOW_COPY_AND_ASSIGN(PluginService); | 201 DISALLOW_COPY_AND_ASSIGN(PluginService); |
201 }; | 202 }; |
202 | 203 |
203 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); | 204 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); |
204 | 205 |
205 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 206 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
OLD | NEW |