diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 18:13:18 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 18:13:18 +0000 |
commit | e1c26ae78293ffa3ba6ee69a377be034d2d8cc8a (patch) | |
tree | 3ad4b035cc2cfdc3303b8942fc8b450596c8267a | |
parent | 421ce19f234e368c674b1e31318cfbb8a222e33b (diff) | |
download | chromium_src-e1c26ae78293ffa3ba6ee69a377be034d2d8cc8a.zip chromium_src-e1c26ae78293ffa3ba6ee69a377be034d2d8cc8a.tar.gz chromium_src-e1c26ae78293ffa3ba6ee69a377be034d2d8cc8a.tar.bz2 |
Move chrome://gpu to content.
BUG=169170
Review URL: https://codereview.chromium.org/12086079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179908 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_resources.grd | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc | 3 | ||||
-rw-r--r-- | chrome/chrome_browser_ui.gypi | 2 | ||||
-rw-r--r-- | content/browser/gpu/gpu_internals_ui.cc (renamed from chrome/browser/ui/webui/gpu_internals_ui.cc) | 93 | ||||
-rw-r--r-- | content/browser/gpu/gpu_internals_ui.h (renamed from chrome/browser/ui/webui/gpu_internals_ui.h) | 8 | ||||
-rw-r--r-- | content/browser/resources/gpu/OWNERS (renamed from chrome/browser/resources/gpu_internals/OWNERS) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/browser_bridge.js (renamed from chrome/browser/resources/gpu_internals/browser_bridge.js) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/browser_bridge_tests.js (renamed from chrome/browser/resources/gpu_internals/browser_bridge_tests.js) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/gpu_internals.html (renamed from chrome/browser/resources/gpu_internals/gpu_internals.html) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/gpu_internals.js (renamed from chrome/browser/resources/gpu_internals/gpu_internals.js) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/info_view.css (renamed from chrome/browser/resources/gpu_internals/info_view.css) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/info_view.html (renamed from chrome/browser/resources/gpu_internals/info_view.html) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/info_view.js (renamed from chrome/browser/resources/gpu_internals/info_view.js) | 0 | ||||
-rw-r--r-- | content/browser/resources/gpu/timeline_test.html (renamed from chrome/browser/resources/gpu_internals/timeline_test.html) | 0 | ||||
-rw-r--r-- | content/browser/webui/content_web_ui_controller_factory.cc | 7 | ||||
-rw-r--r-- | content/content_browser.gypi | 2 | ||||
-rw-r--r-- | content/content_resources.grd | 2 | ||||
-rw-r--r-- | content/content_shell.gypi | 1 |
18 files changed, 59 insertions, 61 deletions
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index d47153a..b829af2 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -114,8 +114,6 @@ <include name="IDR_GAIA_LOGIN_HTML" file="sync\resources\gaia_login.html" flattenhtml="true" type="BINDATA" /> </if> <include name="IDR_HELP_JS" file="resources\help\help.js" flattenhtml="true" type="BINDATA" /> - <include name="IDR_GPU_INTERNALS_HTML" file="resources\gpu_internals\gpu_internals.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> - <include name="IDR_GPU_INTERNALS_JS" file="resources\gpu_internals\gpu_internals.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_HISTORY_HTML" file="resources\history\history.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_HISTORY_JS" file="resources\history\history.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_INSPECT_CSS" file="resources\inspect\inspect.css" flattenhtml="true" type="BINDATA" /> diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 869e22a..1e102c5 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc @@ -27,7 +27,6 @@ #include "chrome/browser/ui/webui/feedback_ui.h" #include "chrome/browser/ui/webui/flags_ui.h" #include "chrome/browser/ui/webui/flash_ui.h" -#include "chrome/browser/ui/webui/gpu_internals_ui.h" #include "chrome/browser/ui/webui/help/help_ui.h" #include "chrome/browser/ui/webui/history_ui.h" #include "chrome/browser/ui/webui/inspect_ui.h" @@ -200,8 +199,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI<ConstrainedWebDialogUI>; if (url.host() == chrome::kChromeUIFlagsHost) return &NewWebUI<FlagsUI>; - if (url.host() == chrome::kChromeUIGpuHost) - return &NewWebUI<GpuInternalsUI>; if (url.host() == chrome::kChromeUIHistoryFrameHost) return &NewWebUI<HistoryUI>; if (url.host() == chrome::kChromeUIInstantHost) diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 81a0432..d7d09a6 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -1913,8 +1913,6 @@ 'browser/ui/webui/flash_ui.h', 'browser/ui/webui/gesture_config_ui.cc', 'browser/ui/webui/gesture_config_ui.h', - 'browser/ui/webui/gpu_internals_ui.cc', - 'browser/ui/webui/gpu_internals_ui.h', 'browser/ui/webui/help/help_handler.cc', 'browser/ui/webui/help/help_handler.h', 'browser/ui/webui/help/help_ui.cc', diff --git a/chrome/browser/ui/webui/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc index f0b6e68..1d6fd7e 100644 --- a/chrome/browser/ui/webui/gpu_internals_ui.cc +++ b/content/browser/gpu/gpu_internals_ui.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/webui/gpu_internals_ui.h" +#include "content/browser/gpu/gpu_internals_ui.h" #include <string> @@ -26,18 +26,10 @@ #include "content/public/common/content_switches.h" #include "content/public/common/gpu_info.h" #include "content/public/common/url_constants.h" -#include "grit/browser_resources.h" -#include "grit/generated_resources.h" +#include "grit/content_resources.h" #include "third_party/angle/src/common/version.h" -#include "ui/base/l10n/l10n_util.h" - -using content::BrowserContext; -using content::BrowserThread; -using content::GpuDataManager; -using content::GpuFeatureType; -using content::WebContents; -using content::WebUIMessageHandler; +namespace content { namespace { struct GpuFeatureInfo { @@ -48,9 +40,8 @@ struct GpuFeatureInfo { bool fallback_to_software; }; -content::WebUIDataSource* CreateGpuHTMLSource() { - content::WebUIDataSource* source = - content::WebUIDataSource::Create(chrome::kChromeUIGpuHost); +WebUIDataSource* CreateGpuHTMLSource() { + WebUIDataSource* source = WebUIDataSource::Create(chrome::kChromeUIGpuHost); source->SetJsonPath("strings.js"); source->AddResourcePath("gpu_internals.js", IDR_GPU_INTERNALS_JS); @@ -83,7 +74,7 @@ Value* NewStatusValue(const char* name, const char* status) { #if defined(OS_WIN) // Output DxDiagNode tree as nested array of {description,value} pairs -ListValue* DxDiagNodeToList(const content::DxDiagNode& node) { +ListValue* DxDiagNodeToList(const DxDiagNode& node) { ListValue* list = new ListValue(); for (std::map<std::string, std::string>::const_iterator it = node.values.begin(); @@ -92,7 +83,7 @@ ListValue* DxDiagNodeToList(const content::DxDiagNode& node) { list->Append(NewDescriptionValuePair(it->first, it->second)); } - for (std::map<std::string, content::DxDiagNode>::const_iterator it = + for (std::map<std::string, DxDiagNode>::const_iterator it = node.children.begin(); it != node.children.end(); ++it) { @@ -103,7 +94,7 @@ ListValue* DxDiagNodeToList(const content::DxDiagNode& node) { } #endif -std::string GPUDeviceToString(const content::GPUInfo::GPUDevice& gpu) { +std::string GPUDeviceToString(const GPUInfo::GPUDevice& gpu) { std::string vendor = base::StringPrintf("0x%04x", gpu.vendor_id); if (!gpu.vendor_string.empty()) vendor += " [" + gpu.vendor_string + "]"; @@ -115,7 +106,7 @@ std::string GPUDeviceToString(const content::GPUInfo::GPUDevice& gpu) { } DictionaryValue* GpuInfoAsDictionaryValue() { - content::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); + GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); ListValue* basic_info = new ListValue(); basic_info->Append(NewDescriptionValuePair( "Initialization time", @@ -206,7 +197,7 @@ Value* GetFeatureStatus() { const GpuFeatureInfo kGpuFeatureInfo[] = { { "2d_canvas", - flags & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS, + flags & GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS, command_line.HasSwitch(switches::kDisableAccelerated2dCanvas) || !SupportsAccelerated2dCanvas(), "Accelerated 2D canvas is unavailable: either disabled at the command" @@ -215,7 +206,7 @@ Value* GetFeatureStatus() { }, { "compositing", - flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING, + flags & GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING, command_line.HasSwitch(switches::kDisableAcceleratedCompositing), "Accelerated compositing has been disabled, either via about:flags or" " command line. This adversely affects performance of all hardware" @@ -224,16 +215,16 @@ Value* GetFeatureStatus() { }, { "3d_css", - flags & (content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING | - content::GPU_FEATURE_TYPE_3D_CSS), + flags & (GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING | + GPU_FEATURE_TYPE_3D_CSS), command_line.HasSwitch(switches::kDisableAcceleratedLayers), "Accelerated layers have been disabled at the command line.", false }, { "css_animation", - flags & (content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING | - content::GPU_FEATURE_TYPE_3D_CSS), + flags & (GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING | + GPU_FEATURE_TYPE_3D_CSS), command_line.HasSwitch(cc::switches::kDisableThreadedAnimation) || command_line.HasSwitch(switches::kDisableAcceleratedCompositing) || command_line.HasSwitch(switches::kDisableAcceleratedLayers), @@ -242,7 +233,7 @@ Value* GetFeatureStatus() { }, { "webgl", - flags & content::GPU_FEATURE_TYPE_WEBGL, + flags & GPU_FEATURE_TYPE_WEBGL, #if defined(OS_ANDROID) !command_line.HasSwitch(switches::kEnableExperimentalWebGL), #else @@ -253,7 +244,7 @@ Value* GetFeatureStatus() { }, { "multisampling", - flags & content::GPU_FEATURE_TYPE_MULTISAMPLING, + flags & GPU_FEATURE_TYPE_MULTISAMPLING, command_line.HasSwitch(switches::kDisableGLMultisampling), "Multisampling has been disabled, either via about:flags or command" " line.", @@ -261,7 +252,7 @@ Value* GetFeatureStatus() { }, { "flash_3d", - flags & content::GPU_FEATURE_TYPE_FLASH3D, + flags & GPU_FEATURE_TYPE_FLASH3D, command_line.HasSwitch(switches::kDisableFlash3d), "Using 3d in flash has been disabled, either via about:flags or" " command line.", @@ -269,7 +260,7 @@ Value* GetFeatureStatus() { }, { "flash_stage3d", - flags & content::GPU_FEATURE_TYPE_FLASH_STAGE3D, + flags & GPU_FEATURE_TYPE_FLASH_STAGE3D, command_line.HasSwitch(switches::kDisableFlashStage3d), "Using Stage3d in Flash has been disabled, either via about:flags or" " command line.", @@ -277,7 +268,7 @@ Value* GetFeatureStatus() { }, { "texture_sharing", - flags & content::GPU_FEATURE_TYPE_TEXTURE_SHARING, + flags & GPU_FEATURE_TYPE_TEXTURE_SHARING, command_line.HasSwitch(switches::kDisableImageTransportSurface), "Sharing textures between processes has been disabled, either via" " about:flags or command line.", @@ -285,7 +276,7 @@ Value* GetFeatureStatus() { }, { "video_decode", - flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, + flags & GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), "Accelerated video decode has been disabled, either via about:flags" " or command line.", @@ -293,7 +284,7 @@ Value* GetFeatureStatus() { }, { "video", - flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO, + flags & GPU_FEATURE_TYPE_ACCELERATED_VIDEO, command_line.HasSwitch(switches::kDisableAcceleratedVideo) || command_line.HasSwitch(switches::kDisableAcceleratedCompositing), "Accelerated video presentation has been disabled, either via" @@ -302,7 +293,7 @@ Value* GetFeatureStatus() { }, { "panel_fitting", - flags & content::GPU_FEATURE_TYPE_PANEL_FITTING, + flags & GPU_FEATURE_TYPE_PANEL_FITTING, #if defined(OS_CHROMEOS) command_line.HasSwitch(switches::kDisablePanelFitting), #else @@ -314,10 +305,10 @@ Value* GetFeatureStatus() { }, { "force_compositing_mode", - (flags & content::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE) && - !content::IsForceCompositingModeEnabled(), - !content::IsForceCompositingModeEnabled() && - !(flags & content::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE), + (flags & GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE) && + !IsForceCompositingModeEnabled(), + !IsForceCompositingModeEnabled() && + !(flags & GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE), "Force compositing mode is off, either disabled at the command" " line or not supported by the current system.", false @@ -358,12 +349,11 @@ Value* GetFeatureStatus() { status = "enabled"; if (kGpuFeatureInfo[i].name == "webgl" && (command_line.HasSwitch(switches::kDisableAcceleratedCompositing) || - (flags & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING))) + (flags & GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING))) status += "_readback"; - bool has_thread = content::IsThreadedCompositingEnabled(); + bool has_thread = IsThreadedCompositingEnabled(); if (kGpuFeatureInfo[i].name == "compositing") { - bool force_compositing = - content::IsForceCompositingModeEnabled(); + bool force_compositing = IsForceCompositingModeEnabled(); if (force_compositing) status += "_force"; if (has_thread) @@ -379,18 +369,18 @@ Value* GetFeatureStatus() { feature_status_list->Append( NewStatusValue(kGpuFeatureInfo[i].name.c_str(), status.c_str())); } - content::GpuSwitchingOption gpu_switching_option = + GpuSwitchingOption gpu_switching_option = GpuDataManager::GetInstance()->GetGpuSwitchingOption(); - if (gpu_switching_option != content::GPU_SWITCHING_OPTION_UNKNOWN) { + if (gpu_switching_option != GPU_SWITCHING_OPTION_UNKNOWN) { std::string gpu_switching; switch (gpu_switching_option) { - case content::GPU_SWITCHING_OPTION_AUTOMATIC: + case GPU_SWITCHING_OPTION_AUTOMATIC: gpu_switching = "gpu_switching_automatic"; break; - case content::GPU_SWITCHING_OPTION_FORCE_DISCRETE: + case GPU_SWITCHING_OPTION_FORCE_DISCRETE: gpu_switching = "gpu_switching_force_discrete"; break; - case content::GPU_SWITCHING_OPTION_FORCE_INTEGRATED: + case GPU_SWITCHING_OPTION_FORCE_INTEGRATED: gpu_switching = "gpu_switching_force_integrated"; break; default: @@ -439,7 +429,7 @@ Value* GetFeatureStatus() { class GpuMessageHandler : public WebUIMessageHandler, public base::SupportsWeakPtr<GpuMessageHandler>, - public content::GpuDataManagerObserver { + public GpuDataManagerObserver { public: GpuMessageHandler(); virtual ~GpuMessageHandler(); @@ -450,8 +440,7 @@ class GpuMessageHandler // GpuDataManagerObserver implementation. virtual void OnGpuInfoUpdate() OVERRIDE; virtual void OnVideoMemoryUsageStatsUpdate( - const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) - OVERRIDE {} + const GPUVideoMemoryUsageStats& video_memory_usage_stats) OVERRIDE {} // Messages void OnBrowserBridgeInitialized(const ListValue* list); @@ -564,7 +553,7 @@ Value* GpuMessageHandler::OnRequestClientInfo(const ListValue* list) { DictionaryValue* dict = new DictionaryValue(); - dict->SetString("version", content::GetContentClient()->GetProduct()); + dict->SetString("version", GetContentClient()->GetProduct()); dict->SetString("command_line", CommandLine::ForCurrentProcess()->GetCommandLineString()); dict->SetString("operating_system", @@ -612,12 +601,14 @@ void GpuMessageHandler::OnGpuInfoUpdate() { // //////////////////////////////////////////////////////////////////////////////// -GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) +GpuInternalsUI::GpuInternalsUI(WebUI* web_ui) : WebUIController(web_ui) { web_ui->AddMessageHandler(new GpuMessageHandler()); // Set up the chrome://gpu/ source. BrowserContext* browser_context = web_ui->GetWebContents()->GetBrowserContext(); - content::WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); + WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); } + +} // namespace content diff --git a/chrome/browser/ui/webui/gpu_internals_ui.h b/content/browser/gpu/gpu_internals_ui.h index 885d5ae..45912e3 100644 --- a/chrome/browser/ui/webui/gpu_internals_ui.h +++ b/content/browser/gpu/gpu_internals_ui.h @@ -7,13 +7,17 @@ #include "content/public/browser/web_ui_controller.h" -class GpuInternalsUI : public content::WebUIController { +namespace content { + +class GpuInternalsUI : public WebUIController { public: - explicit GpuInternalsUI(content::WebUI* web_ui); + explicit GpuInternalsUI(WebUI* web_ui); private: DISALLOW_COPY_AND_ASSIGN(GpuInternalsUI); }; +} // namespace content + #endif // CHROME_BROWSER_UI_WEBUI_GPU_INTERNALS_UI_H_ diff --git a/chrome/browser/resources/gpu_internals/OWNERS b/content/browser/resources/gpu/OWNERS index 93d1471..93d1471 100644 --- a/chrome/browser/resources/gpu_internals/OWNERS +++ b/content/browser/resources/gpu/OWNERS diff --git a/chrome/browser/resources/gpu_internals/browser_bridge.js b/content/browser/resources/gpu/browser_bridge.js index cb4133a..cb4133a 100644 --- a/chrome/browser/resources/gpu_internals/browser_bridge.js +++ b/content/browser/resources/gpu/browser_bridge.js diff --git a/chrome/browser/resources/gpu_internals/browser_bridge_tests.js b/content/browser/resources/gpu/browser_bridge_tests.js index ebff6a7..ebff6a7 100644 --- a/chrome/browser/resources/gpu_internals/browser_bridge_tests.js +++ b/content/browser/resources/gpu/browser_bridge_tests.js diff --git a/chrome/browser/resources/gpu_internals/gpu_internals.html b/content/browser/resources/gpu/gpu_internals.html index 8bb9030..8bb9030 100644 --- a/chrome/browser/resources/gpu_internals/gpu_internals.html +++ b/content/browser/resources/gpu/gpu_internals.html diff --git a/chrome/browser/resources/gpu_internals/gpu_internals.js b/content/browser/resources/gpu/gpu_internals.js index 6410617..6410617 100644 --- a/chrome/browser/resources/gpu_internals/gpu_internals.js +++ b/content/browser/resources/gpu/gpu_internals.js diff --git a/chrome/browser/resources/gpu_internals/info_view.css b/content/browser/resources/gpu/info_view.css index 8676909..8676909 100644 --- a/chrome/browser/resources/gpu_internals/info_view.css +++ b/content/browser/resources/gpu/info_view.css diff --git a/chrome/browser/resources/gpu_internals/info_view.html b/content/browser/resources/gpu/info_view.html index b9ea809..b9ea809 100644 --- a/chrome/browser/resources/gpu_internals/info_view.html +++ b/content/browser/resources/gpu/info_view.html diff --git a/chrome/browser/resources/gpu_internals/info_view.js b/content/browser/resources/gpu/info_view.js index 6e31e01..6e31e01 100644 --- a/chrome/browser/resources/gpu_internals/info_view.js +++ b/content/browser/resources/gpu/info_view.js diff --git a/chrome/browser/resources/gpu_internals/timeline_test.html b/content/browser/resources/gpu/timeline_test.html index e21f90e..e21f90e 100644 --- a/chrome/browser/resources/gpu_internals/timeline_test.html +++ b/content/browser/resources/gpu/timeline_test.html diff --git a/content/browser/webui/content_web_ui_controller_factory.cc b/content/browser/webui/content_web_ui_controller_factory.cc index 49900ac..d8b3ee2 100644 --- a/content/browser/webui/content_web_ui_controller_factory.cc +++ b/content/browser/webui/content_web_ui_controller_factory.cc @@ -4,6 +4,7 @@ #include "content/browser/webui/content_web_ui_controller_factory.h" +#include "content/browser/gpu/gpu_internals_ui.h" #include "content/browser/media/webrtc_internals_ui.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" @@ -13,8 +14,10 @@ namespace content { WebUI::TypeID ContentWebUIControllerFactory::GetWebUIType( BrowserContext* browser_context, const GURL& url) const { - if (url.host() == chrome::kChromeUIWebRTCInternalsHost) + if (url.host() == chrome::kChromeUIWebRTCInternalsHost || + url.host() == chrome::kChromeUIGpuHost) { return const_cast<ContentWebUIControllerFactory*>(this); + } return WebUI::kNoWebUI; } @@ -32,6 +35,8 @@ WebUIController* ContentWebUIControllerFactory::CreateWebUIControllerForURL( WebUI* web_ui, const GURL& url) const { if (url.host() == chrome::kChromeUIWebRTCInternalsHost) return new WebRTCInternalsUI(web_ui); + if (url.host() == chrome::kChromeUIGpuHost) + return new GpuInternalsUI(web_ui); return NULL; } diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 85eb451..fda20e0 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -461,6 +461,8 @@ 'browser/gpu/gpu_blacklist.h', 'browser/gpu/gpu_data_manager_impl.cc', 'browser/gpu/gpu_data_manager_impl.h', + 'browser/gpu/gpu_internals_ui.cc', + 'browser/gpu/gpu_internals_ui.h', 'browser/gpu/gpu_process_host.cc', 'browser/gpu/gpu_process_host.h', 'browser/gpu/gpu_process_host_ui_shim.cc', diff --git a/content/content_resources.grd b/content/content_resources.grd index f83de03..9840464 100644 --- a/content/content_resources.grd +++ b/content/content_resources.grd @@ -12,6 +12,8 @@ <release seq="1"> <includes> <include name="IDR_GPU_BLACKLIST" file="browser/gpu/software_rendering_list.json" type="BINDATA" /> + <include name="IDR_GPU_INTERNALS_HTML" file="browser/resources/gpu/gpu_internals.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> + <include name="IDR_GPU_INTERNALS_JS" file="browser/resources/gpu/gpu_internals.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_WEBRTC_INTERNALS_HTML" file="browser/resources/media/webrtc_internals.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_WEBRTC_INTERNALS_JS" file="browser/resources/media/webrtc_internals.js" flattenhtml="true" type="BINDATA" /> <if expr="is_macosx"> diff --git a/content/content_shell.gypi b/content/content_shell.gypi index 126c82f..d0d5985 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -268,6 +268,7 @@ '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', |