OLD | NEW |
| (Empty) |
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. | |
4 | |
5 /* | |
6 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | |
7 * | |
8 * Redistribution and use in source and binary forms, with or without | |
9 * modification, are permitted provided that the following conditions | |
10 * are met: | |
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. | |
16 * | |
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. | |
28 */ | |
29 | |
30 #ifndef PluginObject_h | |
31 #define PluginObject_h | |
32 | |
33 #include <bindings/npfunctions.h> | |
34 #include <stdarg.h> | |
35 | |
36 class PluginTest; | |
37 | |
38 extern NPNetscapeFuncs *browser; | |
39 extern NPPluginFuncs* pluginFunctions; | |
40 | |
41 typedef struct { | |
42 NPObject header; | |
43 | |
44 PluginTest* pluginTest; | |
45 | |
46 NPP npp; | |
47 NPBool eventLogging; | |
48 NPBool logSetWindow; | |
49 NPBool logDestroy; | |
50 NPBool returnNegativeOneFromWrite; | |
51 NPBool returnErrorFromNewStream; | |
52 NPObject* testObject; | |
53 NPObject* rememberedObject; | |
54 NPStream* stream; | |
55 NPBool testGetURLOnDestroy; | |
56 NPBool testWindowOpen; | |
57 NPBool testKeyboardFocusForPlugins; | |
58 NPBool mouseDownForEvaluateScript; | |
59 char* onStreamLoad; | |
60 char* onStreamDestroy; | |
61 char* onDestroy; | |
62 char* onURLNotify; | |
63 char* onSetWindow; | |
64 char* onPaintEvent; | |
65 char* firstUrl; | |
66 char* firstHeaders; | |
67 char* lastUrl; | |
68 char* lastHeaders; | |
69 char* evaluateScriptOnMouseDownOrKeyDown; | |
70 #ifdef XP_MACOSX | |
71 NPEventModel eventModel; | |
72 #endif | |
73 NPWindow lastWindow; | |
74 NPBool alwaysFilterEvents; | |
75 } PluginObject; | |
76 | |
77 extern NPClass* createPluginClass(void); | |
78 | |
79 extern void handleCallback(PluginObject* object, | |
80 const char* url, | |
81 NPReason reason, | |
82 void* notifyData); | |
83 extern void notifyStream(PluginObject* object, | |
84 const char* url, | |
85 const char* headers); | |
86 extern void testNPRuntime(NPP npp); | |
87 extern void pluginLog(NPP instance, const char* format, ...); | |
88 extern void pluginLogWithArguments(NPP instance, | |
89 const char* format, | |
90 va_list args); | |
91 extern bool testDocumentOpen(NPP npp); | |
92 extern bool testWindowOpen(NPP npp); | |
93 | |
94 #endif // PluginObject_h | |
OLD | NEW |