| 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 "content/child/npapi/webplugin_delegate_impl.h" | 5 #include "content/child/npapi/webplugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 base::TimeDelta::FromMilliseconds(kFlashWMUSERMessageThrottleDelayMs)); | 587 base::TimeDelta::FromMilliseconds(kFlashWMUSERMessageThrottleDelayMs)); |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 | 590 |
| 591 // Schedule a windows message for delivery later. | 591 // Schedule a windows message for delivery later. |
| 592 // static | 592 // static |
| 593 void WebPluginDelegateImpl::ThrottleMessage(WNDPROC proc, HWND hwnd, | 593 void WebPluginDelegateImpl::ThrottleMessage(WNDPROC proc, HWND hwnd, |
| 594 UINT message, WPARAM wParam, | 594 UINT message, WPARAM wParam, |
| 595 LPARAM lParam) { | 595 LPARAM lParam) { |
| 596 MSG msg; | 596 MSG msg; |
| 597 msg.time = reinterpret_cast<DWORD>(proc); | 597 // Cast through uintptr_t and then DWORD to make the truncation explicit. |
| 598 msg.time = static_cast<DWORD>(reinterpret_cast<uintptr_t>(proc)); |
| 598 msg.hwnd = hwnd; | 599 msg.hwnd = hwnd; |
| 599 msg.message = message; | 600 msg.message = message; |
| 600 msg.wParam = wParam; | 601 msg.wParam = wParam; |
| 601 msg.lParam = lParam; | 602 msg.lParam = lParam; |
| 602 | 603 |
| 603 ThrottleQueue* throttle_queue = g_throttle_queue.Pointer(); | 604 ThrottleQueue* throttle_queue = g_throttle_queue.Pointer(); |
| 604 | 605 |
| 605 throttle_queue->push_back(msg); | 606 throttle_queue->push_back(msg); |
| 606 | 607 |
| 607 if (throttle_queue->size() == 1) { | 608 if (throttle_queue->size() == 1) { |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 case WM_RBUTTONUP: | 1483 case WM_RBUTTONUP: |
| 1483 ::ReleaseCapture(); | 1484 ::ReleaseCapture(); |
| 1484 break; | 1485 break; |
| 1485 | 1486 |
| 1486 default: | 1487 default: |
| 1487 break; | 1488 break; |
| 1488 } | 1489 } |
| 1489 } | 1490 } |
| 1490 | 1491 |
| 1491 } // namespace content | 1492 } // namespace content |
| OLD | NEW |