| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/gpu_internals_ui.h" | 5 #include "chrome/browser/dom_ui/gpu_internals_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/browser_thread.h" | 22 #include "chrome/browser/browser_thread.h" |
| 23 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 23 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 24 #include "chrome/browser/gpu_process_host.h" | 24 #include "chrome/browser/gpu_process_host.h" |
| 25 #include "chrome/browser/gpu_process_host_ui_shim.h" | 25 #include "chrome/browser/gpu_process_host_ui_shim.h" |
| 26 #include "chrome/browser/io_thread.h" | 26 #include "chrome/browser/io_thread.h" |
| 27 #include "chrome/browser/net/chrome_net_log.h" | 27 #include "chrome/browser/net/chrome_net_log.h" |
| 28 #include "chrome/browser/net/connection_tester.h" | 28 #include "chrome/browser/net/connection_tester.h" |
| 29 #include "chrome/browser/net/passive_log_collector.h" | 29 #include "chrome/browser/net/passive_log_collector.h" |
| 30 #include "chrome/browser/net/url_fixer_upper.h" | 30 #include "chrome/browser/net/url_fixer_upper.h" |
| 31 #include "chrome/browser/platform_util.h" | 31 #include "chrome/browser/platform_util.h" |
| 32 #include "chrome/browser/profiles/profile.h" |
| 33 #include "chrome/browser/tab_contents/tab_contents.h" |
| 32 #include "chrome/common/chrome_paths.h" | 34 #include "chrome/common/chrome_paths.h" |
| 33 #include "chrome/common/chrome_version_info.h" | 35 #include "chrome/common/chrome_version_info.h" |
| 34 #include "chrome/common/jstemplate_builder.h" | 36 #include "chrome/common/jstemplate_builder.h" |
| 35 #include "chrome/common/net/url_request_context_getter.h" | 37 #include "chrome/common/net/url_request_context_getter.h" |
| 36 #include "chrome/common/url_constants.h" | 38 #include "chrome/common/url_constants.h" |
| 37 #include "grit/browser_resources.h" | 39 #include "grit/browser_resources.h" |
| 38 #include "grit/generated_resources.h" | 40 #include "grit/generated_resources.h" |
| 39 #include "net/base/escape.h" | 41 #include "net/base/escape.h" |
| 40 #include "ui/base/l10n/l10n_util.h" | 42 #include "ui/base/l10n/l10n_util.h" |
| 41 #include "ui/base/resource/resource_bundle.h" | 43 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // GpuInternalsUI | 354 // GpuInternalsUI |
| 353 // | 355 // |
| 354 //////////////////////////////////////////////////////////////////////////////// | 356 //////////////////////////////////////////////////////////////////////////////// |
| 355 | 357 |
| 356 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : DOMUI(contents) { | 358 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : DOMUI(contents) { |
| 357 AddMessageHandler((new GpuMessageHandler())->Attach(this)); | 359 AddMessageHandler((new GpuMessageHandler())->Attach(this)); |
| 358 | 360 |
| 359 GpuHTMLSource* html_source = new GpuHTMLSource(); | 361 GpuHTMLSource* html_source = new GpuHTMLSource(); |
| 360 | 362 |
| 361 // Set up the chrome://gpu/ source. | 363 // Set up the chrome://gpu/ source. |
| 362 BrowserThread::PostTask( | 364 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 363 BrowserThread::IO, FROM_HERE, | |
| 364 NewRunnableMethod( | |
| 365 ChromeURLDataManager::GetInstance(), | |
| 366 &ChromeURLDataManager::AddDataSource, | |
| 367 make_scoped_refptr(html_source))); | |
| 368 } | 365 } |
| 369 | 366 |
| OLD | NEW |