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

Unified Diff: chrome/browser/ui/webui/media/media_internals_ui.cc

Issue 12153002: Move chrome://media-internals to content. This allows us to hide implementation details from the pu… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
Index: chrome/browser/ui/webui/media/media_internals_ui.cc
===================================================================
--- chrome/browser/ui/webui/media/media_internals_ui.cc (revision 179909)
+++ chrome/browser/ui/webui/media/media_internals_ui.cc (working copy)
@@ -1,45 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// 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/media/media_internals_ui.h"
-
-#include "base/values.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/webui/media/media_internals_handler.h"
-#include "chrome/common/url_constants.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 "grit/browser_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-
-using content::WebContents;
-
-namespace {
-
-content::WebUIDataSource* CreateMediaInternalsHTMLSource() {
- content::WebUIDataSource* source =
- content::WebUIDataSource::Create(chrome::kChromeUIMediaInternalsHost);
-
- source->SetJsonPath("strings.js");
- source->AddResourcePath("media_internals.js", IDR_MEDIA_INTERNALS_JS);
- source->SetDefaultResource(IDR_MEDIA_INTERNALS_HTML);
- return source;
-}
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-//
-// MediaInternalsUI
-//
-////////////////////////////////////////////////////////////////////////////////
-
-MediaInternalsUI::MediaInternalsUI(content::WebUI* web_ui)
- : WebUIController(web_ui) {
- web_ui->AddMessageHandler(new MediaInternalsMessageHandler());
-
- Profile* profile = Profile::FromWebUI(web_ui);
- content::WebUIDataSource::Add(profile, CreateMediaInternalsHTMLSource());
-}

Powered by Google App Engine
This is Rietveld 408576698