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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/pepper_plugin_registry.h
===================================================================
--- chrome/common/pepper_plugin_registry.h (revision 48155)
+++ chrome/common/pepper_plugin_registry.h (working copy)
@@ -2,27 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_RENDERER_PEPPER_PLUGIN_REGISTRY_H_
-#define CHROME_RENDERER_PEPPER_PLUGIN_REGISTRY_H_
+#ifndef CHROME_COMMON_PEPPER_PLUGIN_REGISTRY_H_
+#define CHROME_COMMON_PEPPER_PLUGIN_REGISTRY_H_
#include <string>
#include <map>
#include "webkit/glue/plugins/pepper_plugin_module.h"
+struct PepperPluginInfo {
+ FilePath path;
+ std::vector<std::string> mime_types;
+};
+
// This class holds references to all of the known pepper plugin modules.
class PepperPluginRegistry {
public:
static PepperPluginRegistry* GetInstance();
- pepper::PluginModule* GetModule(const std::string& mime_type) const;
+ // Returns the list of known pepper plugins. This method is static so that
+ // it can be used by the browser process, which has no need to load the
+ // pepper plugin modules.
+ static void GetList(std::vector<PepperPluginInfo>* plugins);
+ pepper::PluginModule* GetModule(const FilePath& path) const;
+
private:
PepperPluginRegistry();
typedef scoped_refptr<pepper::PluginModule> ModuleHandle;
- typedef std::map<std::string, ModuleHandle> ModuleMap;
+ typedef std::map<FilePath, ModuleHandle> ModuleMap;
ModuleMap modules_;
};
-#endif // CHROME_RENDERER_PEPPER_PLUGIN_REGISTRY_H_
+#endif // CHROME_COMMON_PEPPER_PLUGIN_REGISTRY_H_

Powered by Google App Engine
This is Rietveld 408576698