OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stdio.h> | 5 #include <stdio.h> |
6 #include <string.h> | 6 #include <string.h> |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 HostNPPlugin* plugin = PluginFromInstance(instance); | 443 HostNPPlugin* plugin = PluginFromInstance(instance); |
444 if (plugin) { | 444 if (plugin) { |
445 plugin->SetWindow(pNPWindow); | 445 plugin->SetWindow(pNPWindow); |
446 } | 446 } |
447 return NPERR_NO_ERROR; | 447 return NPERR_NO_ERROR; |
448 } | 448 } |
449 | 449 |
450 } // namespace | 450 } // namespace |
451 | 451 |
452 #if defined(OS_WIN) | 452 #if defined(OS_WIN) |
453 HMODULE g_hModule = NULL; | |
454 | |
455 BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { | 453 BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { |
456 switch (dwReason) { | 454 switch (dwReason) { |
457 case DLL_PROCESS_ATTACH: | 455 case DLL_PROCESS_ATTACH: |
458 g_hModule = hModule; | |
459 DisableThreadLibraryCalls(hModule); | 456 DisableThreadLibraryCalls(hModule); |
460 break; | 457 break; |
461 case DLL_PROCESS_DETACH: | 458 case DLL_PROCESS_DETACH: |
462 case DLL_THREAD_ATTACH: | 459 case DLL_THREAD_ATTACH: |
463 case DLL_THREAD_DETACH: | 460 case DLL_THREAD_DETACH: |
464 break; | 461 break; |
465 } | 462 } |
466 return TRUE; | 463 return TRUE; |
467 } | 464 } |
468 #endif | 465 #endif |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 } | 517 } |
521 | 518 |
522 EXPORT NPError API_CALL NP_GetValue(void* npp, | 519 EXPORT NPError API_CALL NP_GetValue(void* npp, |
523 NPPVariable variable, | 520 NPPVariable variable, |
524 void* value) { | 521 void* value) { |
525 return GetValue((NPP)npp, variable, value); | 522 return GetValue((NPP)npp, variable, value); |
526 } | 523 } |
527 #endif | 524 #endif |
528 | 525 |
529 } // extern "C" | 526 } // extern "C" |
OLD | NEW |