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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(WebKit::WebCanvas* 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 = skia::BeginPlatformPaint(canvas); | 468 skia::ScopedPlatformPaint scoped_platform_paint(canvas); |
| 469 HDC hdc = scoped_platform_paint.GetPlatformSurface(); |
469 WindowlessPaint(hdc, rect); | 470 WindowlessPaint(hdc, rect); |
470 skia::EndPlatformPaint(canvas); | |
471 } | 471 } |
472 } | 472 } |
473 | 473 |
474 void WebPluginDelegateImpl::InstallMissingPlugin() { | 474 void WebPluginDelegateImpl::InstallMissingPlugin() { |
475 NPEvent evt; | 475 NPEvent evt; |
476 evt.event = default_plugin::kInstallMissingPluginMessage; | 476 evt.event = default_plugin::kInstallMissingPluginMessage; |
477 evt.lParam = 0; | 477 evt.lParam = 0; |
478 evt.wParam = 0; | 478 evt.wParam = 0; |
479 instance()->NPP_HandleEvent(&evt); | 479 instance()->NPP_HandleEvent(&evt); |
480 } | 480 } |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 ::ReleaseCapture(); | 1417 ::ReleaseCapture(); |
1418 break; | 1418 break; |
1419 | 1419 |
1420 default: | 1420 default: |
1421 break; | 1421 break; |
1422 } | 1422 } |
1423 } | 1423 } |
1424 | 1424 |
1425 } // namespace npapi | 1425 } // namespace npapi |
1426 } // namespace webkit | 1426 } // namespace webkit |
OLD | NEW |