| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 result = func(key, KeyNameInformation, buffer.get(), size, &size); | 184 result = func(key, KeyNameInformation, buffer.get(), size, &size); |
| 185 if (result != STATUS_SUCCESS) | 185 if (result != STATUS_SUCCESS) |
| 186 return L""; | 186 return L""; |
| 187 | 187 |
| 188 KEY_NAME_INFORMATION* info = | 188 KEY_NAME_INFORMATION* info = |
| 189 reinterpret_cast<KEY_NAME_INFORMATION*>(buffer.get()); | 189 reinterpret_cast<KEY_NAME_INFORMATION*>(buffer.get()); |
| 190 return std::wstring(info->Name, info->NameLength / sizeof(wchar_t)); | 190 return std::wstring(info->Name, info->NameLength / sizeof(wchar_t)); |
| 191 } | 191 } |
| 192 | 192 |
| 193 int GetPluginMajorVersion(const WebPluginInfo& plugin_info) { | 193 int GetPluginMajorVersion(const WebPluginInfo& plugin_info) { |
| 194 base::Version plugin_version; | 194 Version plugin_version; |
| 195 WebPluginInfo::CreateVersionFromString(plugin_info.version, &plugin_version); | 195 WebPluginInfo::CreateVersionFromString(plugin_info.version, &plugin_version); |
| 196 | 196 |
| 197 int major_version = 0; | 197 int major_version = 0; |
| 198 if (plugin_version.IsValid()) | 198 if (plugin_version.IsValid()) |
| 199 major_version = plugin_version.components()[0]; | 199 major_version = plugin_version.components()[0]; |
| 200 | 200 |
| 201 return major_version; | 201 return major_version; |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace | 204 } // namespace |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 case WM_RBUTTONUP: | 1530 case WM_RBUTTONUP: |
| 1531 ::ReleaseCapture(); | 1531 ::ReleaseCapture(); |
| 1532 break; | 1532 break; |
| 1533 | 1533 |
| 1534 default: | 1534 default: |
| 1535 break; | 1535 break; |
| 1536 } | 1536 } |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 } // namespace content | 1539 } // namespace content |
| OLD | NEW |