| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 result = func(key, KeyNameInformation, buffer.get(), size, &size); | 180 result = func(key, KeyNameInformation, buffer.get(), size, &size); |
| 181 if (result != STATUS_SUCCESS) | 181 if (result != STATUS_SUCCESS) |
| 182 return L""; | 182 return L""; |
| 183 | 183 |
| 184 KEY_NAME_INFORMATION* info = | 184 KEY_NAME_INFORMATION* info = |
| 185 reinterpret_cast<KEY_NAME_INFORMATION*>(buffer.get()); | 185 reinterpret_cast<KEY_NAME_INFORMATION*>(buffer.get()); |
| 186 return std::wstring(info->Name, info->NameLength / sizeof(wchar_t)); | 186 return std::wstring(info->Name, info->NameLength / sizeof(wchar_t)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 uint32_t GetPluginMajorVersion(const WebPluginInfo& plugin_info) { | 189 uint32_t GetPluginMajorVersion(const WebPluginInfo& plugin_info) { |
| 190 base::Version plugin_version; | 190 Version plugin_version; |
| 191 WebPluginInfo::CreateVersionFromString(plugin_info.version, &plugin_version); | 191 WebPluginInfo::CreateVersionFromString(plugin_info.version, &plugin_version); |
| 192 | 192 |
| 193 uint32_t major_version = 0; | 193 uint32_t major_version = 0; |
| 194 if (plugin_version.IsValid()) | 194 if (plugin_version.IsValid()) |
| 195 major_version = plugin_version.components()[0]; | 195 major_version = plugin_version.components()[0]; |
| 196 | 196 |
| 197 return major_version; | 197 return major_version; |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace | 200 } // namespace |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 case WM_RBUTTONUP: | 1483 case WM_RBUTTONUP: |
| 1484 ::ReleaseCapture(); | 1484 ::ReleaseCapture(); |
| 1485 break; | 1485 break; |
| 1486 | 1486 |
| 1487 default: | 1487 default: |
| 1488 break; | 1488 break; |
| 1489 } | 1489 } |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 } // namespace content | 1492 } // namespace content |
| OLD | NEW |