| 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/ui/webui/flash_ui.h" | 5 #include "chrome/browser/ui/webui/flash_ui.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 AddPair(list, l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS), os_label); | 265 AddPair(list, l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS), os_label); |
| 266 | 266 |
| 267 // Obtain the version of the Flash plugins. | 267 // Obtain the version of the Flash plugins. |
| 268 std::vector<webkit::WebPluginInfo> info_array; | 268 std::vector<webkit::WebPluginInfo> info_array; |
| 269 PluginService::GetInstance()->GetPluginInfoArray( | 269 PluginService::GetInstance()->GetPluginInfoArray( |
| 270 GURL(), kFlashPluginSwfMimeType, false, &info_array, NULL); | 270 GURL(), kFlashPluginSwfMimeType, false, &info_array, NULL); |
| 271 if (info_array.empty()) { | 271 if (info_array.empty()) { |
| 272 AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed"); | 272 AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed"); |
| 273 } else { | 273 } else { |
| 274 PluginPrefs* plugin_prefs = | 274 PluginPrefs* plugin_prefs = |
| 275 PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())); | 275 PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); |
| 276 bool found_enabled = false; | 276 bool found_enabled = false; |
| 277 for (size_t i = 0; i < info_array.size(); ++i) { | 277 for (size_t i = 0; i < info_array.size(); ++i) { |
| 278 string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") + | 278 string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") + |
| 279 info_array[i].path.LossyDisplayName(); | 279 info_array[i].path.LossyDisplayName(); |
| 280 if (plugin_prefs->IsPluginEnabled(info_array[i])) { | 280 if (plugin_prefs->IsPluginEnabled(info_array[i])) { |
| 281 // If we have already found an enabled Flash version, this one | 281 // If we have already found an enabled Flash version, this one |
| 282 // is not used. | 282 // is not used. |
| 283 if (found_enabled) | 283 if (found_enabled) |
| 284 flash_version += ASCIIToUTF16(" (not used)"); | 284 flash_version += ASCIIToUTF16(" (not used)"); |
| 285 | 285 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 Profile* profile = Profile::FromWebUI(web_ui); | 389 Profile* profile = Profile::FromWebUI(web_ui); |
| 390 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); | 390 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); |
| 391 } | 391 } |
| 392 | 392 |
| 393 // static | 393 // static |
| 394 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( | 394 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( |
| 395 ui::ScaleFactor scale_factor) { | 395 ui::ScaleFactor scale_factor) { |
| 396 // Use the default icon for now. | 396 // Use the default icon for now. |
| 397 return NULL; | 397 return NULL; |
| 398 } | 398 } |
| OLD | NEW |