| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, | 526 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, |
| 527 const gfx::Rect& rect) { | 527 const gfx::Rect& rect) { |
| 528 if (windowless_) { | 528 if (windowless_) { |
| 529 skia::ScopedPlatformPaint scoped_platform_paint(canvas); | 529 skia::ScopedPlatformPaint scoped_platform_paint(canvas); |
| 530 HDC hdc = scoped_platform_paint.GetPlatformSurface(); | 530 HDC hdc = scoped_platform_paint.GetPlatformSurface(); |
| 531 WindowlessPaint(hdc, rect); | 531 WindowlessPaint(hdc, rect); |
| 532 } | 532 } |
| 533 } | 533 } |
| 534 | 534 |
| 535 void WebPluginDelegateImpl::InstallMissingPlugin() { | |
| 536 NPEvent evt; | |
| 537 evt.event = default_plugin::kInstallMissingPluginMessage; | |
| 538 evt.lParam = 0; | |
| 539 evt.wParam = 0; | |
| 540 instance()->NPP_HandleEvent(&evt); | |
| 541 } | |
| 542 | |
| 543 bool WebPluginDelegateImpl::WindowedCreatePlugin() { | 535 bool WebPluginDelegateImpl::WindowedCreatePlugin() { |
| 544 DCHECK(!windowed_handle_); | 536 DCHECK(!windowed_handle_); |
| 545 | 537 |
| 546 RegisterNativeWindowClass(); | 538 RegisterNativeWindowClass(); |
| 547 | 539 |
| 548 // UIPI requires reparenting in the (medium-integrity) browser process. | 540 // UIPI requires reparenting in the (medium-integrity) browser process. |
| 549 bool reparent_in_browser = (quirks_ & PLUGIN_QUIRK_REPARENT_IN_BROWSER) != 0; | 541 bool reparent_in_browser = (quirks_ & PLUGIN_QUIRK_REPARENT_IN_BROWSER) != 0; |
| 550 | 542 |
| 551 // The window will be sized and shown later. | 543 // The window will be sized and shown later. |
| 552 windowed_handle_ = CreateWindowEx( | 544 windowed_handle_ = CreateWindowEx( |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 ::ReleaseCapture(); | 1515 ::ReleaseCapture(); |
| 1524 break; | 1516 break; |
| 1525 | 1517 |
| 1526 default: | 1518 default: |
| 1527 break; | 1519 break; |
| 1528 } | 1520 } |
| 1529 } | 1521 } |
| 1530 | 1522 |
| 1531 } // namespace npapi | 1523 } // namespace npapi |
| 1532 } // namespace webkit | 1524 } // namespace webkit |
| OLD | NEW |