OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ | 5 #ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ |
6 #define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ | 6 #define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "third_party/npapi/bindings/npapi.h" | 11 #include "third_party/npapi/bindings/npapi.h" |
12 #include "third_party/npapi/bindings/nphostapi.h" | 12 #include "third_party/npapi/bindings/nphostapi.h" |
13 | 13 |
14 namespace NPAPIClient { | 14 namespace NPAPIClient { |
15 | 15 |
16 // A PluginTest represents an instance of the plugin, which in | 16 // A PluginTest represents an instance of the plugin, which in |
17 // our case is a test case. | 17 // our case is a test case. |
18 class PluginTest { | 18 class PluginTest { |
19 public: | 19 public: |
20 // Constructor. | 20 // Constructor. |
21 PluginTest(NPP id, NPNetscapeFuncs *host_functions); | 21 PluginTest(NPP id, NPNetscapeFuncs *host_functions); |
22 | 22 |
23 // Destructor | 23 // Destructor |
24 virtual ~PluginTest() {} | 24 virtual ~PluginTest() {} |
25 | 25 |
| 26 // Returns true if the test runs in windowless plugin mode. |
| 27 virtual bool IsWindowless() const { return false; } |
| 28 |
26 // | 29 // |
27 // NPAPI Functions | 30 // NPAPI Functions |
28 // | 31 // |
29 virtual NPError New(uint16 mode, int16 argc, const char* argn[], | 32 virtual NPError New(uint16 mode, int16 argc, const char* argn[], |
30 const char* argv[], NPSavedData* saved); | 33 const char* argv[], NPSavedData* saved); |
31 virtual NPError Destroy(); | 34 virtual NPError Destroy(); |
32 virtual NPError SetWindow(NPWindow* pNPWindow); | 35 virtual NPError SetWindow(NPWindow* pNPWindow); |
33 virtual NPError NewStream(NPMIMEType type, NPStream* stream, | 36 virtual NPError NewStream(NPMIMEType type, NPStream* stream, |
34 NPBool seekable, uint16* stype); | 37 NPBool seekable, uint16* stype); |
35 virtual int32 WriteReady(NPStream *stream); | 38 virtual int32 WriteReady(NPStream *stream); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 NPNetscapeFuncs * host_functions_; | 122 NPNetscapeFuncs * host_functions_; |
120 std::string test_name_; | 123 std::string test_name_; |
121 std::string test_id_; | 124 std::string test_id_; |
122 std::string test_status_; | 125 std::string test_status_; |
123 bool test_completed_; | 126 bool test_completed_; |
124 }; | 127 }; |
125 | 128 |
126 } // namespace NPAPIClient | 129 } // namespace NPAPIClient |
127 | 130 |
128 #endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ | 131 #endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ |
OLD | NEW |