| 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 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 if (popups_enabled) { | 1508 if (popups_enabled) { |
| 1509 instance()->PopPopupsEnabledState(); | 1509 instance()->PopPopupsEnabledState(); |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 // Flash and SilverLight always return false, even when they swallow the | 1512 // Flash and SilverLight always return false, even when they swallow the |
| 1513 // event. Flash does this because it passes the event to its window proc, | 1513 // event. Flash does this because it passes the event to its window proc, |
| 1514 // which is supposed to return 0 if an event was handled. There are few | 1514 // which is supposed to return 0 if an event was handled. There are few |
| 1515 // exceptions, such as IME, where it sometimes returns true. | 1515 // exceptions, such as IME, where it sometimes returns true. |
| 1516 ret = true; | 1516 ret = true; |
| 1517 | 1517 |
| 1518 // TODO(jam): do we need this for Aura? |
| 1519 #if !defined(USE_AURA) |
| 1518 if (np_event.event == WM_MOUSEMOVE) { | 1520 if (np_event.event == WM_MOUSEMOVE) { |
| 1519 current_windowless_cursor_.InitFromExternalCursor(GetCursor()); | 1521 current_windowless_cursor_.InitFromExternalCursor(GetCursor()); |
| 1520 // Snag a reference to the current cursor ASAP in case the plugin modified | 1522 // Snag a reference to the current cursor ASAP in case the plugin modified |
| 1521 // it. There is a nasty race condition here with the multiprocess browser | 1523 // it. There is a nasty race condition here with the multiprocess browser |
| 1522 // as someone might be setting the cursor in the main process as well. | 1524 // as someone might be setting the cursor in the main process as well. |
| 1523 current_windowless_cursor_.GetCursorInfo(cursor_info); | 1525 current_windowless_cursor_.GetCursorInfo(cursor_info); |
| 1524 } | 1526 } |
| 1527 #endif |
| 1525 | 1528 |
| 1526 handle_event_depth_--; | 1529 handle_event_depth_--; |
| 1527 | 1530 |
| 1528 g_current_plugin_instance = last_plugin_instance; | 1531 g_current_plugin_instance = last_plugin_instance; |
| 1529 | 1532 |
| 1530 // We could have multiple NPP_HandleEvent calls nested together in case | 1533 // We could have multiple NPP_HandleEvent calls nested together in case |
| 1531 // the plugin enters a modal loop. Reset the pump messages event when | 1534 // the plugin enters a modal loop. Reset the pump messages event when |
| 1532 // the outermost NPP_HandleEvent call unwinds. | 1535 // the outermost NPP_HandleEvent call unwinds. |
| 1533 if (handle_event_depth_ == 0) { | 1536 if (handle_event_depth_ == 0) { |
| 1534 ResetEvent(handle_event_pump_messages_event_); | 1537 ResetEvent(handle_event_pump_messages_event_); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 ::ReleaseCapture(); | 1701 ::ReleaseCapture(); |
| 1699 break; | 1702 break; |
| 1700 | 1703 |
| 1701 default: | 1704 default: |
| 1702 break; | 1705 break; |
| 1703 } | 1706 } |
| 1704 } | 1707 } |
| 1705 | 1708 |
| 1706 } // namespace npapi | 1709 } // namespace npapi |
| 1707 } // namespace webkit | 1710 } // namespace webkit |
| OLD | NEW |