| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 using blink::WebKeyboardEvent; | 37 using blink::WebKeyboardEvent; |
| 38 using blink::WebInputEvent; | 38 using blink::WebInputEvent; |
| 39 using blink::WebMouseEvent; | 39 using blink::WebMouseEvent; |
| 40 | 40 |
| 41 namespace content { | 41 namespace content { |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 const wchar_t kWebPluginDelegateProperty[] = L"WebPluginDelegateProperty"; | 45 const wchar_t kWebPluginDelegateProperty[] = L"WebPluginDelegateProperty"; |
| 46 const wchar_t kPluginFlashThrottle[] = L"FlashThrottle"; | |
| 47 | 46 |
| 48 // The fastest we are willing to process WM_USER+1 events for Flash. | 47 // The fastest we are willing to process WM_USER+1 events for Flash. |
| 49 // Flash can easily exceed the limits of our CPU if we don't throttle it. | 48 // Flash can easily exceed the limits of our CPU if we don't throttle it. |
| 50 // The throttle has been chosen by testing various delays and compromising | 49 // The throttle has been chosen by testing various delays and compromising |
| 51 // on acceptable Flash performance and reasonable CPU consumption. | 50 // on acceptable Flash performance and reasonable CPU consumption. |
| 52 // | 51 // |
| 53 // I'd like to make the throttle delay variable, based on the amount of | 52 // I'd like to make the throttle delay variable, based on the amount of |
| 54 // time currently required to paint Flash plugins. There isn't a good | 53 // time currently required to paint Flash plugins. There isn't a good |
| 55 // way to count the time spent in aggregate plugin painting, however, so | 54 // way to count the time spent in aggregate plugin painting, however, so |
| 56 // this seems to work well enough. | 55 // this seems to work well enough. |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 case WM_RBUTTONUP: | 1479 case WM_RBUTTONUP: |
| 1481 ::ReleaseCapture(); | 1480 ::ReleaseCapture(); |
| 1482 break; | 1481 break; |
| 1483 | 1482 |
| 1484 default: | 1483 default: |
| 1485 break; | 1484 break; |
| 1486 } | 1485 } |
| 1487 } | 1486 } |
| 1488 | 1487 |
| 1489 } // namespace content | 1488 } // namespace content |
| OLD | NEW |