| 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/gpu_internals_ui.h" | 5 #include "chrome/browser/ui/webui/gpu_internals_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
| 13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
| 14 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
| 15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/crash_upload_list.h" | 17 #include "chrome/browser/crash_upload_list.h" |
| 18 #include "chrome/browser/gpu_blacklist.h" | 18 #include "chrome/browser/gpu_blacklist.h" |
| 19 #include "chrome/browser/gpu_util.h" | 19 #include "chrome/browser/gpu_util.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 21 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 22 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| 22 #include "chrome/browser/ui/webui/crashes_ui.h" | 23 #include "chrome/browser/ui/webui/crashes_ui.h" |
| 23 #include "chrome/common/chrome_version_info.h" | 24 #include "chrome/common/chrome_version_info.h" |
| 24 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
| 25 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
| 26 #include "content/public/browser/gpu_data_manager.h" | 27 #include "content/public/browser/gpu_data_manager.h" |
| 27 #include "content/public/browser/gpu_data_manager_observer.h" | 28 #include "content/public/browser/gpu_data_manager_observer.h" |
| 28 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 29 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
| 30 #include "content/public/browser/web_ui_message_handler.h" | 31 #include "content/public/browser/web_ui_message_handler.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // GpuInternalsUI | 287 // GpuInternalsUI |
| 287 // | 288 // |
| 288 //////////////////////////////////////////////////////////////////////////////// | 289 //////////////////////////////////////////////////////////////////////////////// |
| 289 | 290 |
| 290 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) | 291 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) |
| 291 : WebUIController(web_ui) { | 292 : WebUIController(web_ui) { |
| 292 web_ui->AddMessageHandler(new GpuMessageHandler()); | 293 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 293 | 294 |
| 294 // Set up the chrome://gpu-internals/ source. | 295 // Set up the chrome://gpu-internals/ source. |
| 295 Profile* profile = Profile::FromWebUI(web_ui); | 296 Profile* profile = Profile::FromWebUI(web_ui); |
| 296 profile->GetChromeURLDataManager()->AddDataSource(CreateGpuHTMLSource()); | 297 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); |
| 297 } | 298 } |
| OLD | NEW |