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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 window_.width = window_rect_.width(); | 816 window_.width = window_rect_.width(); |
817 window_.x = 0; | 817 window_.x = 0; |
818 window_.y = 0; | 818 window_.y = 0; |
819 | 819 |
820 window_.window = windowed_handle_; | 820 window_.window = windowed_handle_; |
821 window_.type = NPWindowTypeWindow; | 821 window_.type = NPWindowTypeWindow; |
822 | 822 |
823 // Reset this flag before entering the instance in case of side-effects. | 823 // Reset this flag before entering the instance in case of side-effects. |
824 windowed_did_set_window_ = true; | 824 windowed_did_set_window_ = true; |
825 | 825 |
826 NPError err = instance()->NPP_SetWindow(&window_); | 826 instance()->NPP_SetWindow(&window_); |
827 if (quirks_ & PLUGIN_QUIRK_SETWINDOW_TWICE) | 827 if (quirks_ & PLUGIN_QUIRK_SETWINDOW_TWICE) |
828 instance()->NPP_SetWindow(&window_); | 828 instance()->NPP_SetWindow(&window_); |
829 | 829 |
830 WNDPROC current_wnd_proc = reinterpret_cast<WNDPROC>( | 830 WNDPROC current_wnd_proc = reinterpret_cast<WNDPROC>( |
831 GetWindowLongPtr(windowed_handle_, GWLP_WNDPROC)); | 831 GetWindowLongPtr(windowed_handle_, GWLP_WNDPROC)); |
832 if (current_wnd_proc != NativeWndProc) { | 832 if (current_wnd_proc != NativeWndProc) { |
833 plugin_wnd_proc_ = reinterpret_cast<WNDPROC>( | 833 plugin_wnd_proc_ = reinterpret_cast<WNDPROC>( |
834 SetWindowLongPtr(windowed_handle_, | 834 SetWindowLongPtr(windowed_handle_, |
835 GWLP_WNDPROC, | 835 GWLP_WNDPROC, |
836 reinterpret_cast<LONG_PTR>(NativeWndProc))); | 836 reinterpret_cast<LONG_PTR>(NativeWndProc))); |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1484 case WM_RBUTTONUP: | 1484 case WM_RBUTTONUP: |
1485 ::ReleaseCapture(); | 1485 ::ReleaseCapture(); |
1486 break; | 1486 break; |
1487 | 1487 |
1488 default: | 1488 default: |
1489 break; | 1489 break; |
1490 } | 1490 } |
1491 } | 1491 } |
1492 | 1492 |
1493 } // namespace content | 1493 } // namespace content |
OLD | NEW |