OLD | NEW |
1 // Copyright (c) 2010 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_test.h" | 8 #include "webkit/plugins/npapi/test/plugin_test.h" |
9 #include "webkit/plugins/npapi/test/plugin_test_factory.h" | 9 #include "webkit/plugins/npapi/test/plugin_test_factory.h" |
10 | 10 |
11 namespace NPAPIClient { | 11 namespace NPAPIClient { |
(...skipping 16 matching lines...) Expand all Loading... |
28 pFuncs->asfile = NPP_StreamAsFile; | 28 pFuncs->asfile = NPP_StreamAsFile; |
29 pFuncs->writeready = NPP_WriteReady; | 29 pFuncs->writeready = NPP_WriteReady; |
30 pFuncs->write = NPP_Write; | 30 pFuncs->write = NPP_Write; |
31 pFuncs->print = NPP_Print; | 31 pFuncs->print = NPP_Print; |
32 pFuncs->event = NPP_HandleEvent; | 32 pFuncs->event = NPP_HandleEvent; |
33 pFuncs->urlnotify = NPP_URLNotify; | 33 pFuncs->urlnotify = NPP_URLNotify; |
34 pFuncs->getvalue = NPP_GetValue; | 34 pFuncs->getvalue = NPP_GetValue; |
35 pFuncs->setvalue = NPP_SetValue; | 35 pFuncs->setvalue = NPP_SetValue; |
36 pFuncs->javaClass = NULL; | 36 pFuncs->javaClass = NULL; |
37 pFuncs->urlredirectnotify = NPP_URLRedirectNotify; | 37 pFuncs->urlredirectnotify = NPP_URLRedirectNotify; |
| 38 pFuncs->clearsitedata = NPP_ClearSiteData; |
38 | 39 |
39 return NPERR_NO_ERROR; | 40 return NPERR_NO_ERROR; |
40 } | 41 } |
41 | 42 |
42 NPError PluginClient::Initialize(NPNetscapeFuncs* pFuncs) { | 43 NPError PluginClient::Initialize(NPNetscapeFuncs* pFuncs) { |
43 if (pFuncs == NULL) { | 44 if (pFuncs == NULL) { |
44 return NPERR_INVALID_FUNCTABLE_ERROR; | 45 return NPERR_INVALID_FUNCTABLE_ERROR; |
45 } | 46 } |
46 | 47 |
47 if (static_cast<unsigned char>((pFuncs->version >> 8) & 0xff) > | 48 if (static_cast<unsigned char>((pFuncs->version >> 8) & 0xff) > |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 } | 231 } |
231 | 232 |
232 void NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, | 233 void NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, |
233 void* notify_data) { | 234 void* notify_data) { |
234 if (instance) { | 235 if (instance) { |
235 NPAPIClient::PluginTest* plugin = | 236 NPAPIClient::PluginTest* plugin = |
236 reinterpret_cast<NPAPIClient::PluginTest*>(instance->pdata); | 237 reinterpret_cast<NPAPIClient::PluginTest*>(instance->pdata); |
237 plugin->URLRedirectNotify(url, status, notify_data); | 238 plugin->URLRedirectNotify(url, status, notify_data); |
238 } | 239 } |
239 } | 240 } |
| 241 |
| 242 NPError NPP_ClearSiteData(const char* site, |
| 243 uint64 flags, |
| 244 uint64 max_age) { |
| 245 LOG(INFO) << "NPP_ClearSiteData called"; |
| 246 return NPERR_NO_ERROR; |
| 247 } |
240 } // extern "C" | 248 } // extern "C" |
OLD | NEW |