| 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 // | 5 // |
| 6 // npapitest | 6 // npapitest |
| 7 // | 7 // |
| 8 // This is a NPAPI Plugin Program which is used to test the Browser's NPAPI | 8 // This is a NPAPI Plugin Program which is used to test the Browser's NPAPI |
| 9 // host implementation. It is used in conjunction with the npapi_unittest. | 9 // host implementation. It is used in conjunction with the npapi_unittest. |
| 10 // | 10 // |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // | 34 // |
| 35 // | 35 // |
| 36 // TESTS | 36 // TESTS |
| 37 // When the PluginClient receives a NPP_New callback from the browser, | 37 // When the PluginClient receives a NPP_New callback from the browser, |
| 38 // it looks at the "name" argument which is passed in. It verifies that | 38 // it looks at the "name" argument which is passed in. It verifies that |
| 39 // the name matches a known test, and instantiates that test. The test is | 39 // the name matches a known test, and instantiates that test. The test is |
| 40 // a subclass of PluginTest. | 40 // a subclass of PluginTest. |
| 41 // | 41 // |
| 42 // | 42 // |
| 43 | 43 |
| 44 #include "base/basictypes.h" |
| 45 |
| 46 #if defined(OS_WIN) |
| 44 #include <windows.h> | 47 #include <windows.h> |
| 48 #endif |
| 49 |
| 45 #include "webkit/glue/plugins/test/plugin_client.h" | 50 #include "webkit/glue/plugins/test/plugin_client.h" |
| 46 | 51 |
| 47 BOOL WINAPI DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) { | 52 #if defined(OS_WIN) |
| 53 BOOL API_CALL DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) { |
| 48 return TRUE; | 54 return TRUE; |
| 49 } | 55 } |
| 56 #endif |
| 50 | 57 |
| 51 extern "C" { | 58 extern "C" { |
| 52 NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs) { | 59 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* pFuncs) { |
| 53 return NPAPIClient::PluginClient::GetEntryPoints(pFuncs); | 60 return NPAPIClient::PluginClient::GetEntryPoints(pFuncs); |
| 54 } | 61 } |
| 55 | 62 |
| 56 NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs) { | 63 NPError API_CALL NP_Initialize(NPNetscapeFuncs* pFuncs) { |
| 57 return NPAPIClient::PluginClient::Initialize(pFuncs); | 64 return NPAPIClient::PluginClient::Initialize(pFuncs); |
| 58 } | 65 } |
| 59 | 66 |
| 60 NPError WINAPI NP_Shutdown() { | 67 NPError API_CALL NP_Shutdown() { |
| 61 return NPAPIClient::PluginClient::Shutdown(); | 68 return NPAPIClient::PluginClient::Shutdown(); |
| 62 } | 69 } |
| 63 } // extern "C" | 70 } // extern "C" |
| 64 | 71 |
| 65 namespace WebCore { | 72 namespace WebCore { |
| 66 const char* currentTextBreakLocaleID() { return "en_us"; } | 73 const char* currentTextBreakLocaleID() { return "en_us"; } |
| 67 } | 74 } |
| OLD | NEW |