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 "content/browser/gpu/gpu_internals_ui.h" | 5 #include "content/browser/gpu/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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "content/public/browser/web_ui.h" | 22 #include "content/public/browser/web_ui.h" |
23 #include "content/public/browser/web_ui_data_source.h" | 23 #include "content/public/browser/web_ui_data_source.h" |
24 #include "content/public/browser/web_ui_message_handler.h" | 24 #include "content/public/browser/web_ui_message_handler.h" |
25 #include "content/public/common/content_client.h" | 25 #include "content/public/common/content_client.h" |
26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
27 #include "content/public/common/url_constants.h" | 27 #include "content/public/common/url_constants.h" |
28 #include "gpu/config/gpu_feature_type.h" | 28 #include "gpu/config/gpu_feature_type.h" |
29 #include "gpu/config/gpu_info.h" | 29 #include "gpu/config/gpu_info.h" |
30 #include "grit/content_resources.h" | 30 #include "grit/content_resources.h" |
31 #include "third_party/angle_dx11/src/common/version.h" | 31 #include "third_party/angle/src/common/version.h" |
32 | 32 |
33 namespace content { | 33 namespace content { |
34 namespace { | 34 namespace { |
35 | 35 |
36 WebUIDataSource* CreateGpuHTMLSource() { | 36 WebUIDataSource* CreateGpuHTMLSource() { |
37 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost); | 37 WebUIDataSource* source = WebUIDataSource::Create(kChromeUIGpuHost); |
38 | 38 |
39 source->SetJsonPath("strings.js"); | 39 source->SetJsonPath("strings.js"); |
40 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); | 40 source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); |
41 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML); | 41 source->SetDefaultResource(IDR_GPU_INTERNALS_HTML); |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 : WebUIController(web_ui) { | 363 : WebUIController(web_ui) { |
364 web_ui->AddMessageHandler(new GpuMessageHandler()); | 364 web_ui->AddMessageHandler(new GpuMessageHandler()); |
365 | 365 |
366 // Set up the chrome://gpu/ source. | 366 // Set up the chrome://gpu/ source. |
367 BrowserContext* browser_context = | 367 BrowserContext* browser_context = |
368 web_ui->GetWebContents()->GetBrowserContext(); | 368 web_ui->GetWebContents()->GetBrowserContext(); |
369 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 369 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
370 } | 370 } |
371 | 371 |
372 } // namespace content | 372 } // namespace content |
OLD | NEW |