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 15 matching lines...) Expand all Loading... |
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/gpu_info.h" | 36 #include "gpu/config/gpu_info.h" |
37 #include "grit/browser_resources.h" | 37 #include "grit/browser_resources.h" |
38 #include "grit/chromium_strings.h" | 38 #include "grit/chromium_strings.h" |
39 #include "grit/generated_resources.h" | 39 #include "grit/generated_resources.h" |
40 #include "grit/theme_resources.h" | 40 #include "grit/theme_resources.h" |
41 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
42 #include "ui/base/resource/resource_bundle.h" | 42 #include "ui/base/resource/resource_bundle.h" |
43 #include "webkit/plugins/plugin_constants.h" | 43 #include "webkit/plugins/plugin_constants.h" |
44 #include "webkit/plugins/webplugininfo.h" | 44 #include "webkit/plugins/webplugininfo.h" |
45 | 45 |
46 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 } | 307 } |
308 } else { | 308 } else { |
309 AddPair(list, ASCIIToUTF16("Crash Reporting"), | 309 AddPair(list, ASCIIToUTF16("Crash Reporting"), |
310 "Enable crash reporting to see crash IDs"); | 310 "Enable crash reporting to see crash IDs"); |
311 AddPair(list, ASCIIToUTF16("For more details"), | 311 AddPair(list, ASCIIToUTF16("For more details"), |
312 chrome::kLearnMoreReportingURL); | 312 chrome::kLearnMoreReportingURL); |
313 } | 313 } |
314 | 314 |
315 // GPU information. | 315 // GPU information. |
316 AddPair(list, string16(), "--- GPU information ---"); | 316 AddPair(list, string16(), "--- GPU information ---"); |
317 content::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); | 317 gpu::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); |
318 | 318 |
319 std::string reason; | 319 std::string reason; |
320 if (!GpuDataManager::GetInstance()->GpuAccessAllowed(&reason)) { | 320 if (!GpuDataManager::GetInstance()->GpuAccessAllowed(&reason)) { |
321 AddPair(list, ASCIIToUTF16("WARNING:"), | 321 AddPair(list, ASCIIToUTF16("WARNING:"), |
322 "GPU access is not allowed: " + reason); | 322 "GPU access is not allowed: " + reason); |
323 } | 323 } |
324 #if defined(OS_WIN) | 324 #if defined(OS_WIN) |
325 const content::DxDiagNode& node = gpu_info.dx_diagnostics; | 325 const gpu::DxDiagNode& node = gpu_info.dx_diagnostics; |
326 for (std::map<std::string, content::DxDiagNode>::const_iterator it = | 326 for (std::map<std::string, gpu::DxDiagNode>::const_iterator it = |
327 node.children.begin(); | 327 node.children.begin(); |
328 it != node.children.end(); | 328 it != node.children.end(); |
329 ++it) { | 329 ++it) { |
330 for (std::map<std::string, std::string>::const_iterator it2 = | 330 for (std::map<std::string, std::string>::const_iterator it2 = |
331 it->second.values.begin(); | 331 it->second.values.begin(); |
332 it2 != it->second.values.end(); | 332 it2 != it->second.values.end(); |
333 ++it2) { | 333 ++it2) { |
334 if (!it2->second.empty()) { | 334 if (!it2->second.empty()) { |
335 if (it2->first == "szDescription") { | 335 if (it2->first == "szDescription") { |
336 AddPair(list, ASCIIToUTF16("Graphics card"), it2->second); | 336 AddPair(list, ASCIIToUTF16("Graphics card"), it2->second); |
(...skipping 52 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 |