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

Side by Side Diff: chrome/browser/ui/webui/flash_ui.cc

Issue 22723004: Get rid of webkit/plugins/plugin_constants.* and move them to content/public/common/content_constan… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 15 matching lines...) Expand all
26 #include "chrome/common/chrome_version_info.h" 26 #include "chrome/common/chrome_version_info.h"
27 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
28 #include "content/public/browser/gpu_data_manager.h" 28 #include "content/public/browser/gpu_data_manager.h"
29 #include "content/public/browser/gpu_data_manager_observer.h" 29 #include "content/public/browser/gpu_data_manager_observer.h"
30 #include "content/public/browser/plugin_service.h" 30 #include "content/public/browser/plugin_service.h"
31 #include "content/public/browser/user_metrics.h" 31 #include "content/public/browser/user_metrics.h"
32 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.h"
33 #include "content/public/browser/web_ui.h" 33 #include "content/public/browser/web_ui.h"
34 #include "content/public/browser/web_ui_data_source.h" 34 #include "content/public/browser/web_ui_data_source.h"
35 #include "content/public/browser/web_ui_message_handler.h" 35 #include "content/public/browser/web_ui_message_handler.h"
36 #include "content/public/common/content_constants.h"
36 #include "content/public/common/webplugininfo.h" 37 #include "content/public/common/webplugininfo.h"
37 #include "gpu/config/gpu_info.h" 38 #include "gpu/config/gpu_info.h"
38 #include "grit/browser_resources.h" 39 #include "grit/browser_resources.h"
39 #include "grit/chromium_strings.h" 40 #include "grit/chromium_strings.h"
40 #include "grit/generated_resources.h" 41 #include "grit/generated_resources.h"
41 #include "grit/theme_resources.h" 42 #include "grit/theme_resources.h"
42 #include "ui/base/l10n/l10n_util.h" 43 #include "ui/base/l10n/l10n_util.h"
43 #include "ui/base/resource/resource_bundle.h" 44 #include "ui/base/resource/resource_bundle.h"
44 #include "webkit/plugins/plugin_constants.h"
45 45
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 #include "base/win/windows_version.h" 47 #include "base/win/windows_version.h"
48 #endif 48 #endif
49 49
50 using content::GpuDataManager; 50 using content::GpuDataManager;
51 using content::PluginService; 51 using content::PluginService;
52 using content::UserMetricsAction; 52 using content::UserMetricsAction;
53 using content::WebContents; 53 using content::WebContents;
54 using content::WebUIMessageHandler; 54 using content::WebUIMessageHandler;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (os->service_pack().minor > 0) 261 if (os->service_pack().minor > 0)
262 os_label += "." + base::IntToString(os->service_pack().minor); 262 os_label += "." + base::IntToString(os->service_pack().minor);
263 if (os->architecture() == base::win::OSInfo::X64_ARCHITECTURE) 263 if (os->architecture() == base::win::OSInfo::X64_ARCHITECTURE)
264 os_label += " 64 bit"; 264 os_label += " 64 bit";
265 #endif 265 #endif
266 AddPair(list, l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS), os_label); 266 AddPair(list, l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS), os_label);
267 267
268 // Obtain the version of the Flash plugins. 268 // Obtain the version of the Flash plugins.
269 std::vector<content::WebPluginInfo> info_array; 269 std::vector<content::WebPluginInfo> info_array;
270 PluginService::GetInstance()->GetPluginInfoArray( 270 PluginService::GetInstance()->GetPluginInfoArray(
271 GURL(), kFlashPluginSwfMimeType, false, &info_array, NULL); 271 GURL(), content::kFlashPluginSwfMimeType, false, &info_array, NULL);
272 if (info_array.empty()) { 272 if (info_array.empty()) {
273 AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed"); 273 AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed");
274 } else { 274 } else {
275 PluginPrefs* plugin_prefs = 275 PluginPrefs* plugin_prefs =
276 PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); 276 PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get();
277 bool found_enabled = false; 277 bool found_enabled = false;
278 for (size_t i = 0; i < info_array.size(); ++i) { 278 for (size_t i = 0; i < info_array.size(); ++i) {
279 string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") + 279 string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") +
280 info_array[i].path.LossyDisplayName(); 280 info_array[i].path.LossyDisplayName();
281 if (plugin_prefs->IsPluginEnabled(info_array[i])) { 281 if (plugin_prefs->IsPluginEnabled(info_array[i])) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 Profile* profile = Profile::FromWebUI(web_ui); 390 Profile* profile = Profile::FromWebUI(web_ui);
391 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); 391 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource());
392 } 392 }
393 393
394 // static 394 // static
395 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( 395 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes(
396 ui::ScaleFactor scale_factor) { 396 ui::ScaleFactor scale_factor) {
397 // Use the default icon for now. 397 // Use the default icon for now.
398 return NULL; 398 return NULL;
399 } 399 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698