Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: content/browser/media/media_internals_ui.cc

Issue 19722011: Added a placeholder new media-internals page under a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/resources/media/new/media_internals.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/media_internals_ui.cc
diff --git a/content/browser/media/media_internals_ui.cc b/content/browser/media/media_internals_ui.cc
index 812825d10fa340f42da923b074288c5e503b462c..83638148bf99f3d1ce936ba5074246267fc6badc 100644
--- a/content/browser/media/media_internals_ui.cc
+++ b/content/browser/media/media_internals_ui.cc
@@ -4,10 +4,12 @@
#include "content/browser/media/media_internals_ui.h"
+#include "base/command_line.h"
#include "content/browser/media/media_internals_handler.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "grit/content_resources.h"
@@ -19,6 +21,13 @@ WebUIDataSource* CreateMediaInternalsHTMLSource() {
WebUIDataSource::Create(kChromeUIMediaInternalsHost);
source->SetJsonPath("strings.js");
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNewMediaInternals)) {
+ source->AddResourcePath("media_internals.js", IDR_MEDIA_INTERNALS_NEW_JS);
+ source->SetDefaultResource(IDR_MEDIA_INTERNALS_NEW_HTML);
+ return source;
+ }
+
source->AddResourcePath("media_internals.js", IDR_MEDIA_INTERNALS_JS);
source->SetDefaultResource(IDR_MEDIA_INTERNALS_HTML);
return source;
« no previous file with comments | « no previous file | content/browser/resources/media/new/media_internals.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698