OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "webkit/plugins/npapi/test/plugin_client.h" | 5 #include "webkit/plugins/npapi/test/plugin_client.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "webkit/plugins/npapi/test/plugin_execute_stream_javascript.h" | 8 #include "webkit/plugins/npapi/test/plugin_execute_stream_javascript.h" |
9 #include "webkit/plugins/npapi/test/plugin_test.h" | 9 #include "webkit/plugins/npapi/test/plugin_test.h" |
10 #include "webkit/plugins/npapi/test/plugin_test_factory.h" | 10 #include "webkit/plugins/npapi/test/plugin_test_factory.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (new_test == NULL) { | 102 if (new_test == NULL) { |
103 // If we don't have a test case for this, create a | 103 // If we don't have a test case for this, create a |
104 // generic one which basically never fails. | 104 // generic one which basically never fails. |
105 LOG(WARNING) << "Unknown test name '" << test_name | 105 LOG(WARNING) << "Unknown test name '" << test_name |
106 << "'; using default test."; | 106 << "'; using default test."; |
107 new_test = new NPAPIClient::PluginTest(instance, | 107 new_test = new NPAPIClient::PluginTest(instance, |
108 NPAPIClient::PluginClient::HostFunctions()); | 108 NPAPIClient::PluginClient::HostFunctions()); |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
| 112 #if defined(OS_MACOSX) |
| 113 // Set a modern drawing model so that the plugin doesn't require support for |
| 114 // QuickDraw. No support checking or error checking is done because if it |
| 115 // fails it doesn't matter; the plugin will just stay with the older model, |
| 116 // and nothing in the test plugin cares which is used. |
| 117 NPAPIClient::PluginClient::HostFunctions()->setvalue( |
| 118 instance, NPPVpluginDrawingModel, (void*)NPDrawingModelCoreGraphics); |
| 119 #endif |
| 120 |
112 NPError ret = new_test->New(mode, argc, (const char**)argn, | 121 NPError ret = new_test->New(mode, argc, (const char**)argn, |
113 (const char**)argv, saved); | 122 (const char**)argv, saved); |
114 if ((ret == NPERR_NO_ERROR) && new_test->IsWindowless()) { | 123 if ((ret == NPERR_NO_ERROR) && new_test->IsWindowless()) { |
115 NPAPIClient::PluginClient::HostFunctions()->setvalue( | 124 NPAPIClient::PluginClient::HostFunctions()->setvalue( |
116 instance, NPPVpluginWindowBool, NULL); | 125 instance, NPPVpluginWindowBool, NULL); |
117 } | 126 } |
118 | 127 |
119 return ret; | 128 return ret; |
120 } | 129 } |
121 | 130 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 260 } |
252 } | 261 } |
253 | 262 |
254 NPError NPP_ClearSiteData(const char* site, | 263 NPError NPP_ClearSiteData(const char* site, |
255 uint64 flags, | 264 uint64 flags, |
256 uint64 max_age) { | 265 uint64 max_age) { |
257 LOG(INFO) << "NPP_ClearSiteData called"; | 266 LOG(INFO) << "NPP_ClearSiteData called"; |
258 return NPERR_NO_ERROR; | 267 return NPERR_NO_ERROR; |
259 } | 268 } |
260 } // extern "C" | 269 } // extern "C" |
OLD | NEW |