| 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/browser/component_updater/flash_component_installer.h" | 5 #include "chrome/browser/component_updater/flash_component_installer.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 if (!flash_version.IsValid()) | 138 if (!flash_version.IsValid()) |
| 139 return false; | 139 return false; |
| 140 const std::vector<uint16> ver_nums = flash_version.components(); | 140 const std::vector<uint16> ver_nums = flash_version.components(); |
| 141 if (ver_nums.size() < 3) | 141 if (ver_nums.size() < 3) |
| 142 return false; | 142 return false; |
| 143 | 143 |
| 144 plugin_info->is_internal = false; | 144 plugin_info->is_internal = false; |
| 145 plugin_info->is_out_of_process = out_of_process; | 145 plugin_info->is_out_of_process = out_of_process; |
| 146 plugin_info->path = flash_path; | 146 plugin_info->path = flash_path; |
| 147 plugin_info->name = kFlashPluginName; | 147 plugin_info->name = kFlashPluginName; |
| 148 plugin_info->permissions = ppapi::PERMISSION_DEV | |
| 149 ppapi::PERMISSION_PRIVATE | |
| 150 ppapi::PERMISSION_BYPASS_USER_GESTURE; |
| 148 | 151 |
| 149 // The description is like "Shockwave Flash 10.2 r154". | 152 // The description is like "Shockwave Flash 10.2 r154". |
| 150 plugin_info->description = StringPrintf("%s %d.%d r%d", | 153 plugin_info->description = StringPrintf("%s %d.%d r%d", |
| 151 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); | 154 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); |
| 152 | 155 |
| 153 plugin_info->version = flash_version.GetString(); | 156 plugin_info->version = flash_version.GetString(); |
| 154 | 157 |
| 155 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, | 158 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, |
| 156 kFlashPluginSwfExtension, | 159 kFlashPluginSwfExtension, |
| 157 kFlashPluginName); | 160 kFlashPluginName); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 } | 361 } |
| 359 | 362 |
| 360 } // namespace | 363 } // namespace |
| 361 | 364 |
| 362 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { | 365 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { |
| 363 #if defined(GOOGLE_CHROME_BUILD) && !defined(FLAPPER_AVAILABLE) | 366 #if defined(GOOGLE_CHROME_BUILD) && !defined(FLAPPER_AVAILABLE) |
| 364 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 367 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 365 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 368 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
| 366 #endif | 369 #endif |
| 367 } | 370 } |
| OLD | NEW |