Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Side by Side Diff: content/browser/plugin_service_impl.h

Issue 12087120: Revert 179987 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // base::Bind() has limited arity, and the filter-related methods tend to 57 // base::Bind() has limited arity, and the filter-related methods tend to
58 // surpass that limit. 58 // surpass that limit.
59 struct PluginServiceFilterParams { 59 struct PluginServiceFilterParams {
60 int render_process_id; 60 int render_process_id;
61 int render_view_id; 61 int render_view_id;
62 GURL page_url; 62 GURL page_url;
63 ResourceContext* resource_context; 63 ResourceContext* resource_context;
64 }; 64 };
65 65
66 class CONTENT_EXPORT PluginServiceImpl 66 class CONTENT_EXPORT PluginServiceImpl
67 : NON_EXPORTED_BASE(public PluginService) { 67 : NON_EXPORTED_BASE(public PluginService),
68 public base::WaitableEventWatcher::Delegate {
68 public: 69 public:
69 // Returns the PluginServiceImpl singleton. 70 // Returns the PluginServiceImpl singleton.
70 static PluginServiceImpl* GetInstance(); 71 static PluginServiceImpl* GetInstance();
71 72
72 // PluginService implementation: 73 // PluginService implementation:
73 virtual void Init() OVERRIDE; 74 virtual void Init() OVERRIDE;
74 virtual void StartWatchingPlugins() OVERRIDE; 75 virtual void StartWatchingPlugins() OVERRIDE;
75 virtual bool GetPluginInfoArray( 76 virtual bool GetPluginInfoArray(
76 const GURL& url, 77 const GURL& url,
77 const std::string& mime_type, 78 const std::string& mime_type,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void RegisterPluginCrash(const FilePath& plugin_path); 150 void RegisterPluginCrash(const FilePath& plugin_path);
150 151
151 private: 152 private:
152 friend struct DefaultSingletonTraits<PluginServiceImpl>; 153 friend struct DefaultSingletonTraits<PluginServiceImpl>;
153 154
154 // Creates the PluginServiceImpl object, but doesn't actually build the plugin 155 // Creates the PluginServiceImpl object, but doesn't actually build the plugin
155 // list yet. It's generated lazily. 156 // list yet. It's generated lazily.
156 PluginServiceImpl(); 157 PluginServiceImpl();
157 virtual ~PluginServiceImpl(); 158 virtual ~PluginServiceImpl();
158 159
159 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); 160 // base::WaitableEventWatcher::Delegate implementation.
161 virtual void OnWaitableEventSignaled(
162 base::WaitableEvent* waitable_event) OVERRIDE;
160 163
161 // Returns the plugin process host corresponding to the plugin process that 164 // Returns the plugin process host corresponding to the plugin process that
162 // has been started by this service. Returns NULL if no process has been 165 // has been started by this service. Returns NULL if no process has been
163 // started. 166 // started.
164 PluginProcessHost* FindNpapiPluginProcess(const FilePath& plugin_path); 167 PluginProcessHost* FindNpapiPluginProcess(const FilePath& plugin_path);
165 PpapiPluginProcessHost* FindPpapiPluginProcess( 168 PpapiPluginProcessHost* FindPpapiPluginProcess(
166 const FilePath& plugin_path, 169 const FilePath& plugin_path,
167 const FilePath& profile_data_directory); 170 const FilePath& profile_data_directory);
168 PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path); 171 PpapiPluginProcessHost* FindPpapiBrokerProcess(const FilePath& broker_path);
169 172
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 238
236 // Used to detect if a given plug-in is crashing over and over. 239 // Used to detect if a given plug-in is crashing over and over.
237 std::map<FilePath, std::vector<base::Time> > crash_times_; 240 std::map<FilePath, std::vector<base::Time> > crash_times_;
238 241
239 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); 242 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl);
240 }; 243 };
241 244
242 } // namespace content 245 } // namespace content
243 246
244 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 247 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/plugin_data_remover_impl_browsertest.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698