Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl_win.cc

Issue 12090079: SetWindowLongPtrA takes a GWLP_WNDPROC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 reinterpret_cast<HANDLE>(plugin_version_atom)); 569 reinterpret_cast<HANDLE>(plugin_version_atom));
570 DCHECK(result == TRUE) << "SetProp failed, last error = " << 570 DCHECK(result == TRUE) << "SetProp failed, last error = " <<
571 GetLastError(); 571 GetLastError();
572 } 572 }
573 } 573 }
574 } 574 }
575 575
576 // Calling SetWindowLongPtrA here makes the window proc ASCII, which is 576 // Calling SetWindowLongPtrA here makes the window proc ASCII, which is
577 // required by at least the Shockwave Director plug-in. 577 // required by at least the Shockwave Director plug-in.
578 SetWindowLongPtrA( 578 SetWindowLongPtrA(
579 windowed_handle_, GWL_WNDPROC, reinterpret_cast<LONG>(DefWindowProcA)); 579 windowed_handle_, GWLP_WNDPROC, reinterpret_cast<LONG>(DefWindowProcA));
580 580
581 return true; 581 return true;
582 } 582 }
583 583
584 void WebPluginDelegateImpl::WindowedDestroyWindow() { 584 void WebPluginDelegateImpl::WindowedDestroyWindow() {
585 if (windowed_handle_ != NULL) { 585 if (windowed_handle_ != NULL) {
586 // Unsubclass the window. 586 // Unsubclass the window.
587 WNDPROC current_wnd_proc = reinterpret_cast<WNDPROC>( 587 WNDPROC current_wnd_proc = reinterpret_cast<WNDPROC>(
588 GetWindowLongPtr(windowed_handle_, GWLP_WNDPROC)); 588 GetWindowLongPtr(windowed_handle_, GWLP_WNDPROC));
589 if (current_wnd_proc == NativeWndProc) { 589 if (current_wnd_proc == NativeWndProc) {
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 ::ReleaseCapture(); 1535 ::ReleaseCapture();
1536 break; 1536 break;
1537 1537
1538 default: 1538 default:
1539 break; 1539 break;
1540 } 1540 }
1541 } 1541 }
1542 1542
1543 } // namespace npapi 1543 } // namespace npapi
1544 } // namespace webkit 1544 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698