1 // Copyright 2014 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.
6 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #ifndef PluginObject_h
31 #define PluginObject_h
33 #include <bindings/npfunctions.h>
38 extern NPNetscapeFuncs
*browser
;
39 extern NPPluginFuncs
* pluginFunctions
;
44 PluginTest
* pluginTest
;
50 NPBool returnNegativeOneFromWrite
;
51 NPBool returnErrorFromNewStream
;
53 NPObject
* rememberedObject
;
55 NPBool testGetURLOnDestroy
;
56 NPBool testWindowOpen
;
57 NPBool testKeyboardFocusForPlugins
;
58 NPBool mouseDownForEvaluateScript
;
60 char* onStreamDestroy
;
69 char* evaluateScriptOnMouseDownOrKeyDown
;
71 NPEventModel eventModel
;
74 void* coreAnimationLayer
;
77 NPBool alwaysFilterEvents
;
80 extern NPClass
* createPluginClass(void);
82 extern void handleCallback(PluginObject
* object
,
86 extern void notifyStream(PluginObject
* object
,
89 extern void testNPRuntime(NPP npp
);
90 extern void pluginLog(NPP instance
, const char* format
, ...);
91 extern void pluginLogWithArguments(NPP instance
,
94 extern bool testDocumentOpen(NPP npp
);
95 extern bool testWindowOpen(NPP npp
);
98 extern void* createCoreAnimationLayer();
101 #endif // PluginObject_h