| 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/plugin_utils.h" | 5 #include "webkit/plugins/npapi/plugin_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 no_leading_zeros_version += (j < n) ? numbers[i].substr(j) : "0"; | 41 no_leading_zeros_version += (j < n) ? numbers[i].substr(j) : "0"; |
| 42 if (i != numbers.size() - 1) { | 42 if (i != numbers.size() - 1) { |
| 43 no_leading_zeros_version += "."; | 43 no_leading_zeros_version += "."; |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 *parsed_version = Version(no_leading_zeros_version); | 47 *parsed_version = Version(no_leading_zeros_version); |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool NPAPIPluginsSupported() { | 50 bool NPAPIPluginsSupported() { |
| 51 #if defined(OS_WIN) || defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_
AURA)) | 51 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ |
| 52 (defined(OS_LINUX) && !defined(USE_AURA)) |
| 52 return true; | 53 return true; |
| 53 #else | 54 #else |
| 54 return false; | 55 return false; |
| 55 #endif | 56 #endif |
| 56 } | 57 } |
| 57 | 58 |
| 58 void SetForcefullyTerminatePluginProcess(bool value) { | 59 void SetForcefullyTerminatePluginProcess(bool value) { |
| 59 g_forcefully_terminate_plugin_process = value; | 60 g_forcefully_terminate_plugin_process = value; |
| 60 } | 61 } |
| 61 | 62 |
| 62 bool ShouldForcefullyTerminatePluginProcess() { | 63 bool ShouldForcefullyTerminatePluginProcess() { |
| 63 return g_forcefully_terminate_plugin_process; | 64 return g_forcefully_terminate_plugin_process; |
| 64 } | 65 } |
| 65 | 66 |
| 66 } // namespace npapi | 67 } // namespace npapi |
| 67 } // namespace webkit | 68 } // namespace webkit |
| OLD | NEW |