| 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 "webkit/plugins/npapi/webplugin_delegate_impl.h" | 5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 return false; | 1473 return false; |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 if (GetQuirks() & PLUGIN_QUIRK_PATCH_GETKEYSTATE) { | 1476 if (GetQuirks() & PLUGIN_QUIRK_PATCH_GETKEYSTATE) { |
| 1477 if (np_event.event == WM_KEYDOWN) | 1477 if (np_event.event == WM_KEYDOWN) |
| 1478 SetSavedKeyState(np_event.wParam); | 1478 SetSavedKeyState(np_event.wParam); |
| 1479 else if (np_event.event == WM_KEYUP) | 1479 else if (np_event.event == WM_KEYUP) |
| 1480 UnsetSavedKeyState(np_event.wParam); | 1480 UnsetSavedKeyState(np_event.wParam); |
| 1481 } | 1481 } |
| 1482 | 1482 |
| 1483 // Allow this plug-in to access this IME emulator through IMM32 API while the |
| 1484 // plug-in is processing this event. |
| 1485 if (GetQuirks() & PLUGIN_QUIRK_EMULATE_IME) { |
| 1486 if (!plugin_ime_.get()) |
| 1487 plugin_ime_.reset(new WebPluginIMEWin); |
| 1488 } |
| 1489 WebPluginIMEWin::ScopedLock lock(plugin_ime_.get()); |
| 1490 |
| 1483 HWND last_focus_window = NULL; | 1491 HWND last_focus_window = NULL; |
| 1484 | 1492 |
| 1485 if (ShouldTrackEventForModalLoops(&np_event)) { | 1493 if (ShouldTrackEventForModalLoops(&np_event)) { |
| 1486 // A windowless plugin can enter a modal loop in a NPP_HandleEvent call. | 1494 // A windowless plugin can enter a modal loop in a NPP_HandleEvent call. |
| 1487 // For e.g. Flash puts up a context menu when we right click on the | 1495 // For e.g. Flash puts up a context menu when we right click on the |
| 1488 // windowless plugin area. We detect this by setting up a message filter | 1496 // windowless plugin area. We detect this by setting up a message filter |
| 1489 // hook pror to calling NPP_HandleEvent on the plugin and unhook on | 1497 // hook pror to calling NPP_HandleEvent on the plugin and unhook on |
| 1490 // return from NPP_HandleEvent. If the plugin does enter a modal loop | 1498 // return from NPP_HandleEvent. If the plugin does enter a modal loop |
| 1491 // in that context we unhook on receiving the first notification in | 1499 // in that context we unhook on receiving the first notification in |
| 1492 // the message filter hook. | 1500 // the message filter hook. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 ::ReleaseCapture(); | 1723 ::ReleaseCapture(); |
| 1716 break; | 1724 break; |
| 1717 | 1725 |
| 1718 default: | 1726 default: |
| 1719 break; | 1727 break; |
| 1720 } | 1728 } |
| 1721 } | 1729 } |
| 1722 | 1730 |
| 1723 } // namespace npapi | 1731 } // namespace npapi |
| 1724 } // namespace webkit | 1732 } // namespace webkit |
| OLD | NEW |