Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 10831224: Add pepper permissions to WebPluginInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/pepper_flash_component_installer.cc ('k') | chrome/common/pepper_flash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698