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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_
6 #define CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_
11 #include "base/files/file_path.h"
12 #include "content/common/content_export.h"
13 #include "content/public/common/webplugininfo.h"
14 #include "ppapi/c/pp_module.h"
15 #include "ppapi/c/ppb.h"
17 #if !defined(ENABLE_PLUGINS)
18 #error "Plugins should be enabled"
23 struct CONTENT_EXPORT PepperPluginInfo
{
24 typedef const void* (*GetInterfaceFunc
)(const char*);
25 typedef int (*PPP_InitializeModuleFunc
)(PP_Module
, PPB_GetInterface
);
26 typedef void (*PPP_ShutdownModuleFunc
)();
29 // This structure is POD, with the constructor initializing to NULL.
30 CONTENT_EXPORT
EntryPoints();
32 GetInterfaceFunc get_interface
;
33 PPP_InitializeModuleFunc initialize_module
;
34 PPP_ShutdownModuleFunc shutdown_module
; // Optional, may be NULL.
40 WebPluginInfo
ToWebPluginInfo() const;
42 // Indicates internal plugins for which there's not actually a library.
43 // These plugins are implemented in the Chrome binary using a separate set
44 // of entry points (see internal_entry_points below).
48 // True when this plugin should be run out of process. Defaults to false.
49 bool is_out_of_process
;
51 base::FilePath path
; // Internal plugins have "internal-[name]" as path.
53 std::string description
;
55 std::vector
<WebPluginMimeType
> mime_types
;
57 // When is_internal is set, this contains the function pointers to the
58 // entry points for the internal plugins.
59 EntryPoints internal_entry_points
;
61 // Permission bits from ppapi::Permission.
65 } // namespace content
67 #endif // CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_