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

Side by Side Diff: chrome/common/pepper_plugin_registry.h

Issue 2262002: Add ppapi plugins to about:plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 2010 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 #ifndef CHROME_RENDERER_PEPPER_PLUGIN_REGISTRY_H_ 5 #ifndef CHROME_COMMON_PEPPER_PLUGIN_REGISTRY_H_
6 #define CHROME_RENDERER_PEPPER_PLUGIN_REGISTRY_H_ 6 #define CHROME_COMMON_PEPPER_PLUGIN_REGISTRY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 10
11 #include "webkit/glue/plugins/pepper_plugin_module.h" 11 #include "webkit/glue/plugins/pepper_plugin_module.h"
12 12
13 struct PepperPluginInfo {
14 FilePath path;
15 std::vector<std::string> mime_types;
16 };
17
13 // This class holds references to all of the known pepper plugin modules. 18 // This class holds references to all of the known pepper plugin modules.
14 class PepperPluginRegistry { 19 class PepperPluginRegistry {
15 public: 20 public:
16 static PepperPluginRegistry* GetInstance(); 21 static PepperPluginRegistry* GetInstance();
17 22
18 pepper::PluginModule* GetModule(const std::string& mime_type) const; 23 // Returns the list of known pepper plugins. This method is static so that
24 // it can be used by the browser process, which has no need to load the
25 // pepper plugin modules.
26 static void GetList(std::vector<PepperPluginInfo>* plugins);
27
28 pepper::PluginModule* GetModule(const FilePath& path) const;
19 29
20 private: 30 private:
21 PepperPluginRegistry(); 31 PepperPluginRegistry();
22 32
23 typedef scoped_refptr<pepper::PluginModule> ModuleHandle; 33 typedef scoped_refptr<pepper::PluginModule> ModuleHandle;
24 typedef std::map<std::string, ModuleHandle> ModuleMap; 34 typedef std::map<FilePath, ModuleHandle> ModuleMap;
25 ModuleMap modules_; 35 ModuleMap modules_;
26 }; 36 };
27 37
28 #endif // CHROME_RENDERER_PEPPER_PLUGIN_REGISTRY_H_ 38 #endif // CHROME_COMMON_PEPPER_PLUGIN_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698