0

WebUI: extend InternalWebUIConfig from more UIs

Specifically extending from chrome://tracing and
chrome://webrtc-internals. These UIs were identified by OWNERS in a
recent Chromium WebUI survey as targeted at Chromium developers and
as UIs that could be placed behind a pref.

The pref behavior is currently behind the InternalOnlyUisPref
feature flag.

Bug: 379889249
Change-Id: I05eae03748661e58d7dcf994e0c5a0d97cfe8c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107298
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399306}
This commit is contained in:
rbpotter
2024-12-20 11:39:18 -08:00
committed by Chromium LUCI CQ
parent 581f2f512f
commit 266fb3313d
2 changed files with 7 additions and 8 deletions
chrome/browser/ui/webui/media
content/browser/tracing

@ -6,17 +6,17 @@
#define CHROME_BROWSER_UI_WEBUI_MEDIA_WEBRTC_LOGS_UI_H_
#include "chrome/common/webui_url_constants.h"
#include "content/public/browser/internal_webui_config.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/webui_config.h"
#include "content/public/common/url_constants.h"
class WebRtcLogsUI;
class WebRtcLogsUIConfig : public content::DefaultWebUIConfig<WebRtcLogsUI> {
class WebRtcLogsUIConfig
: public content::DefaultInternalWebUIConfig<WebRtcLogsUI> {
public:
WebRtcLogsUIConfig()
: DefaultWebUIConfig(content::kChromeUIScheme,
chrome::kChromeUIWebRtcLogsHost) {}
: DefaultInternalWebUIConfig(chrome::kChromeUIWebRtcLogsHost) {}
};
// The WebUI handler for chrome://webrtc-logs.

@ -12,8 +12,8 @@
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "content/public/browser/internal_webui_config.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/webui_config.h"
#include "content/public/common/url_constants.h"
namespace base {
@ -27,10 +27,9 @@ namespace content {
class TracingUI;
// WebUIConfig for the chrome://tracing page.
class TracingUIConfig : public DefaultWebUIConfig<TracingUI> {
class TracingUIConfig : public DefaultInternalWebUIConfig<TracingUI> {
public:
TracingUIConfig()
: DefaultWebUIConfig(kChromeUIScheme, kChromeUITracingHost) {}
TracingUIConfig() : DefaultInternalWebUIConfig(kChromeUITracingHost) {}
};
// The C++ back-end for the chrome://tracing webui page.