[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / content / public / common / pepper_plugin_info.h
blob0c202f94fcb047dc53d21f906cdcf4066d38a62f
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_
8 #include <string>
9 #include <vector>
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"
19 #endif
21 namespace content {
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)();
28 struct EntryPoints {
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.
37 PepperPluginInfo();
38 ~PepperPluginInfo();
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).
45 // Defaults to false.
46 bool is_internal;
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.
52 std::string name;
53 std::string description;
54 std::string version;
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.
62 uint32 permissions;
65 } // namespace content
67 #endif // CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_