Chromium Code Reviews| 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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 DCHECK(result == TRUE) << "SetProp failed, last error = " << GetLastError(); | 501 DCHECK(result == TRUE) << "SetProp failed, last error = " << GetLastError(); |
| 502 // Get the name and version of the plugin, create atoms and set them in a | 502 // Get the name and version of the plugin, create atoms and set them in a |
| 503 // window property. Use atoms so that other processes can access the name and | 503 // window property. Use atoms so that other processes can access the name and |
| 504 // version of the plugin that this window is hosting. | 504 // version of the plugin that this window is hosting. |
| 505 if (instance_ != NULL) { | 505 if (instance_ != NULL) { |
| 506 PluginLib* plugin_lib = instance()->plugin_lib(); | 506 PluginLib* plugin_lib = instance()->plugin_lib(); |
| 507 if (plugin_lib != NULL) { | 507 if (plugin_lib != NULL) { |
| 508 std::wstring plugin_name = plugin_lib->plugin_info().name; | 508 std::wstring plugin_name = plugin_lib->plugin_info().name; |
| 509 if (!plugin_name.empty()) { | 509 if (!plugin_name.empty()) { |
| 510 ATOM plugin_name_atom = GlobalAddAtomW(plugin_name.c_str()); | 510 ATOM plugin_name_atom = GlobalAddAtomW(plugin_name.c_str()); |
| 511 DCHECK_NE(0, plugin_name_atom); | 511 DCHECK_NE(0, plugin_name_atom) << " last error = " << |
|
scottmg
2014/08/27 16:58:56
DPCHECK_NE? ... oh, apparently we only have DPCHEC
| |
| 512 GetLastError(); | |
| 512 result = SetProp(windowed_handle_, | 513 result = SetProp(windowed_handle_, |
| 513 kPluginNameAtomProperty, | 514 kPluginNameAtomProperty, |
| 514 reinterpret_cast<HANDLE>(plugin_name_atom)); | 515 reinterpret_cast<HANDLE>(plugin_name_atom)); |
| 515 DCHECK(result == TRUE) << "SetProp failed, last error = " << | 516 DCHECK(result == TRUE) << "SetProp failed, last error = " << |
| 516 GetLastError(); | 517 GetLastError(); |
| 517 } | 518 } |
| 518 base::string16 plugin_version = plugin_lib->plugin_info().version; | 519 base::string16 plugin_version = plugin_lib->plugin_info().version; |
| 519 if (!plugin_version.empty()) { | 520 if (!plugin_version.empty()) { |
| 520 ATOM plugin_version_atom = GlobalAddAtomW(plugin_version.c_str()); | 521 ATOM plugin_version_atom = GlobalAddAtomW(plugin_version.c_str()); |
| 521 DCHECK_NE(0, plugin_version_atom); | 522 DCHECK_NE(0, plugin_version_atom); |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1521 case WM_RBUTTONUP: | 1522 case WM_RBUTTONUP: |
| 1522 ::ReleaseCapture(); | 1523 ::ReleaseCapture(); |
| 1523 break; | 1524 break; |
| 1524 | 1525 |
| 1525 default: | 1526 default: |
| 1526 break; | 1527 break; |
| 1527 } | 1528 } |
| 1528 } | 1529 } |
| 1529 | 1530 |
| 1530 } // namespace content | 1531 } // namespace content |
| OLD | NEW |