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 |
453 BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { | 455 BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { |
454 switch (dwReason) { | 456 switch (dwReason) { |
455 case DLL_PROCESS_ATTACH: | 457 case DLL_PROCESS_ATTACH: |
| 458 g_hModule = hModule; |
456 DisableThreadLibraryCalls(hModule); | 459 DisableThreadLibraryCalls(hModule); |
457 break; | 460 break; |
458 case DLL_PROCESS_DETACH: | 461 case DLL_PROCESS_DETACH: |
459 case DLL_THREAD_ATTACH: | 462 case DLL_THREAD_ATTACH: |
460 case DLL_THREAD_DETACH: | 463 case DLL_THREAD_DETACH: |
461 break; | 464 break; |
462 } | 465 } |
463 return TRUE; | 466 return TRUE; |
464 } | 467 } |
465 #endif | 468 #endif |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 } | 520 } |
518 | 521 |
519 EXPORT NPError API_CALL NP_GetValue(void* npp, | 522 EXPORT NPError API_CALL NP_GetValue(void* npp, |
520 NPPVariable variable, | 523 NPPVariable variable, |
521 void* value) { | 524 void* value) { |
522 return GetValue((NPP)npp, variable, value); | 525 return GetValue((NPP)npp, variable, value); |
523 } | 526 } |
524 #endif | 527 #endif |
525 | 528 |
526 } // extern "C" | 529 } // extern "C" |
OLD | NEW |