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 "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/cpu.h" | 8 #include "base/cpu.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 content::PepperPluginInfo CreatePepperFlashInfo(const FilePath& path, | 214 content::PepperPluginInfo CreatePepperFlashInfo(const FilePath& path, |
215 const std::string& version) { | 215 const std::string& version) { |
216 content::PepperPluginInfo plugin; | 216 content::PepperPluginInfo plugin; |
217 | 217 |
218 // Flash being out of process is handled separately than general plugins | 218 // Flash being out of process is handled separately than general plugins |
219 // for testing purposes. | 219 // for testing purposes. |
220 plugin.is_out_of_process = !CommandLine::ForCurrentProcess()->HasSwitch( | 220 plugin.is_out_of_process = !CommandLine::ForCurrentProcess()->HasSwitch( |
221 switches::kPpapiFlashInProcess); | 221 switches::kPpapiFlashInProcess); |
222 plugin.name = kFlashPluginName; | 222 plugin.name = kFlashPluginName; |
223 plugin.path = path; | 223 plugin.path = path; |
224 plugin.permissions = ppapi::PERMISSION_DEV | | 224 plugin.permissions = kPepperFlashPermissions; |
225 ppapi::PERMISSION_PRIVATE | | |
226 ppapi::PERMISSION_BYPASS_USER_GESTURE; | |
227 | 225 |
228 std::vector<std::string> flash_version_numbers; | 226 std::vector<std::string> flash_version_numbers; |
229 base::SplitString(version, '.', &flash_version_numbers); | 227 base::SplitString(version, '.', &flash_version_numbers); |
230 if (flash_version_numbers.size() < 1) | 228 if (flash_version_numbers.size() < 1) |
231 flash_version_numbers.push_back("11"); | 229 flash_version_numbers.push_back("11"); |
232 // |SplitString()| puts in an empty string given an empty string. :( | 230 // |SplitString()| puts in an empty string given an empty string. :( |
233 else if (flash_version_numbers[0].empty()) | 231 else if (flash_version_numbers[0].empty()) |
234 flash_version_numbers[0] = "11"; | 232 flash_version_numbers[0] = "11"; |
235 if (flash_version_numbers.size() < 2) | 233 if (flash_version_numbers.size() < 2) |
236 flash_version_numbers.push_back("2"); | 234 flash_version_numbers.push_back("2"); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 541 |
544 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( | 542 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( |
545 content::PepperPluginInfo* plugin, | 543 content::PepperPluginInfo* plugin, |
546 bool* override_npapi_flash) { | 544 bool* override_npapi_flash) { |
547 if (!ConductingPepperFlashFieldTrial()) | 545 if (!ConductingPepperFlashFieldTrial()) |
548 return false; | 546 return false; |
549 return GetBundledPepperFlash(plugin, override_npapi_flash); | 547 return GetBundledPepperFlash(plugin, override_npapi_flash); |
550 } | 548 } |
551 | 549 |
552 } // namespace chrome | 550 } // namespace chrome |
OLD | NEW |