summaryrefslogtreecommitdiffstats
path: root/o3d/gpu_plugin/gpu_plugin.h
blob: 269e053dd4e7ffc89a70c933d2250e54e284fae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef O3D_GPU_PLUGIN_GPU_PLUGIN_H_
#define O3D_GPU_PLUGIN_GPU_PLUGIN_H_

#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npruntime.h"

typedef struct _NPPluginFuncs NPPluginFuncs;
typedef struct _NPNetscapeFuncs NPNetscapeFuncs;

namespace o3d {
namespace gpu_plugin {

class PluginObjectFactory;

// Replaces the plugin object factory and returns the previous one.
PluginObjectFactory* SetPluginObjectFactory(PluginObjectFactory* factory);

// Declarations of NPAPI plugin entry points.

NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* funcs);

#if defined(OS_LINUX)
NPError API_CALL NP_Initialize(NPNetscapeFuncs *browser_funcs,
                               NPPluginFuncs* plugin_funcs);
#else
NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs);
#endif

NPError API_CALL NP_Shutdown();

}  // namespace gpu_plugin
}  // namespace o3d

#endif  // O3D_GPU_PLUGIN_GPU_PLUGIN_H_