| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 g_iat_patch_reg_enum_key_ex_w.Pointer()->Unpatch(); | 637 g_iat_patch_reg_enum_key_ex_w.Pointer()->Unpatch(); |
| 638 | 638 |
| 639 if (mouse_hook_) { | 639 if (mouse_hook_) { |
| 640 UnhookWindowsHookEx(mouse_hook_); | 640 UnhookWindowsHookEx(mouse_hook_); |
| 641 mouse_hook_ = NULL; | 641 mouse_hook_ = NULL; |
| 642 } | 642 } |
| 643 } | 643 } |
| 644 | 644 |
| 645 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, | 645 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, |
| 646 const gfx::Rect& rect) { | 646 const gfx::Rect& rect) { |
| 647 if (windowless_) { | 647 if (windowless_ && skia::SupportsPlatformPaint(canvas)) { |
| 648 skia::ScopedPlatformPaint scoped_platform_paint(canvas); | 648 skia::ScopedPlatformPaint scoped_platform_paint(canvas); |
| 649 HDC hdc = scoped_platform_paint.GetPlatformSurface(); | 649 HDC hdc = scoped_platform_paint.GetPlatformSurface(); |
| 650 WindowlessPaint(hdc, rect); | 650 WindowlessPaint(hdc, rect); |
| 651 } | 651 } |
| 652 } | 652 } |
| 653 | 653 |
| 654 bool WebPluginDelegateImpl::WindowedCreatePlugin() { | 654 bool WebPluginDelegateImpl::WindowedCreatePlugin() { |
| 655 DCHECK(!windowed_handle_); | 655 DCHECK(!windowed_handle_); |
| 656 | 656 |
| 657 RegisterNativeWindowClass(); | 657 RegisterNativeWindowClass(); |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 ::ReleaseCapture(); | 1672 ::ReleaseCapture(); |
| 1673 break; | 1673 break; |
| 1674 | 1674 |
| 1675 default: | 1675 default: |
| 1676 break; | 1676 break; |
| 1677 } | 1677 } |
| 1678 } | 1678 } |
| 1679 | 1679 |
| 1680 } // namespace npapi | 1680 } // namespace npapi |
| 1681 } // namespace webkit | 1681 } // namespace webkit |
| OLD | NEW |