| 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); | 592 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); |
| 593 SetParent(windowed_handle_, parent_); | 593 SetParent(windowed_handle_, parent_); |
| 594 } | 594 } |
| 595 | 595 |
| 596 BOOL result = SetProp(windowed_handle_, kWebPluginDelegateProperty, this); | 596 BOOL result = SetProp(windowed_handle_, kWebPluginDelegateProperty, this); |
| 597 DCHECK(result == TRUE) << "SetProp failed, last error = " << GetLastError(); | 597 DCHECK(result == TRUE) << "SetProp failed, last error = " << GetLastError(); |
| 598 // Get the name of the plugin, create an atom and set that in a window | 598 // Get the name of the plugin, create an atom and set that in a window |
| 599 // property. Use an atom so that other processes can access the name of | 599 // property. Use an atom so that other processes can access the name of |
| 600 // the plugin that this window is hosting | 600 // the plugin that this window is hosting |
| 601 if (instance_ != NULL) { | 601 if (instance_ != NULL) { |
| 602 PluginLib* plugin_lib = instance()->plugin_lib(); | 602 scoped_refptr<PluginLib> plugin_lib = instance()->plugin_lib(); |
| 603 if (plugin_lib != NULL) { | 603 if (plugin_lib) { |
| 604 std::wstring plugin_name = plugin_lib->plugin_info().name; | 604 std::wstring plugin_name = plugin_lib->plugin_info().name; |
| 605 if (!plugin_name.empty()) { | 605 if (!plugin_name.empty()) { |
| 606 ATOM plugin_name_atom = GlobalAddAtomW(plugin_name.c_str()); | 606 ATOM plugin_name_atom = GlobalAddAtomW(plugin_name.c_str()); |
| 607 DCHECK(0 != plugin_name_atom); | 607 DCHECK(0 != plugin_name_atom); |
| 608 result = SetProp(windowed_handle_, | 608 result = SetProp(windowed_handle_, |
| 609 kPluginNameAtomProperty, | 609 kPluginNameAtomProperty, |
| 610 reinterpret_cast<HANDLE>(plugin_name_atom)); | 610 reinterpret_cast<HANDLE>(plugin_name_atom)); |
| 611 DCHECK(result == TRUE) << "SetProp failed, last error = " << | 611 DCHECK(result == TRUE) << "SetProp failed, last error = " << |
| 612 GetLastError(); | 612 GetLastError(); |
| 613 } | 613 } |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1564 ::ReleaseCapture(); | 1564 ::ReleaseCapture(); |
| 1565 break; | 1565 break; |
| 1566 | 1566 |
| 1567 default: | 1567 default: |
| 1568 break; | 1568 break; |
| 1569 } | 1569 } |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 } // namespace npapi | 1572 } // namespace npapi |
| 1573 } // namespace webkit | 1573 } // namespace webkit |
| OLD | NEW |