OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 455 |
456 if (g_iat_patch_reg_enum_key_ex_w.Pointer()->is_patched()) | 456 if (g_iat_patch_reg_enum_key_ex_w.Pointer()->is_patched()) |
457 g_iat_patch_reg_enum_key_ex_w.Pointer()->Unpatch(); | 457 g_iat_patch_reg_enum_key_ex_w.Pointer()->Unpatch(); |
458 | 458 |
459 if (mouse_hook_) { | 459 if (mouse_hook_) { |
460 UnhookWindowsHookEx(mouse_hook_); | 460 UnhookWindowsHookEx(mouse_hook_); |
461 mouse_hook_ = NULL; | 461 mouse_hook_ = NULL; |
462 } | 462 } |
463 } | 463 } |
464 | 464 |
465 void WebPluginDelegateImpl::Paint(skia::PlatformCanvas* canvas, | 465 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, |
466 const gfx::Rect& rect) { | 466 const gfx::Rect& rect) { |
467 if (windowless_) { | 467 if (windowless_) { |
468 HDC hdc = canvas->beginPlatformPaint(); | 468 skia::PlatformCanvas* platform_canvas = |
| 469 static_cast<skia::PlatformCanvas*>(canvas); |
| 470 HDC hdc = platform_canvas->beginPlatformPaint(); |
469 WindowlessPaint(hdc, rect); | 471 WindowlessPaint(hdc, rect); |
470 canvas->endPlatformPaint(); | 472 platform_canvas->endPlatformPaint(); |
471 } | 473 } |
472 } | 474 } |
473 | 475 |
474 void WebPluginDelegateImpl::Print(HDC hdc) { | 476 void WebPluginDelegateImpl::Print(HDC hdc) { |
475 // Disabling the call to NPP_Print as it causes a crash in | 477 // Disabling the call to NPP_Print as it causes a crash in |
476 // flash in some cases. In any case this does not work as expected | 478 // flash in some cases. In any case this does not work as expected |
477 // as the EMF meta file dc passed in needs to be created with the | 479 // as the EMF meta file dc passed in needs to be created with the |
478 // the plugin window dc as its sibling dc and the window rect | 480 // the plugin window dc as its sibling dc and the window rect |
479 // in .01 mm units. | 481 // in .01 mm units. |
480 #if 0 | 482 #if 0 |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 ::ReleaseCapture(); | 1434 ::ReleaseCapture(); |
1433 break; | 1435 break; |
1434 | 1436 |
1435 default: | 1437 default: |
1436 break; | 1438 break; |
1437 } | 1439 } |
1438 } | 1440 } |
1439 | 1441 |
1440 } // namespace npapi | 1442 } // namespace npapi |
1441 } // namespace webkit | 1443 } // namespace webkit |
OLD | NEW |