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

Side by Side Diff: content/browser/media/media_internals_ui.cc

Issue 2149323003: Change the way that gzipped resources are loaded from resources.pak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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/media/media_internals_ui.h" 5 #include "content/browser/media/media_internals_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/media/media_internals_handler.h" 8 #include "content/browser/media/media_internals_handler.h"
9 #include "content/grit/content_resources.h" 9 #include "content/grit/content_resources.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
12 #include "content/public/browser/web_ui_data_source.h" 12 #include "content/public/browser/web_ui_data_source.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 #include "content/public/common/url_constants.h" 14 #include "content/public/common/url_constants.h"
15 15
16 namespace content { 16 namespace content {
17 namespace { 17 namespace {
18 18
19 WebUIDataSource* CreateMediaInternalsHTMLSource() { 19 WebUIDataSource* CreateMediaInternalsHTMLSource() {
20 WebUIDataSource* source = 20 WebUIDataSource* source =
21 WebUIDataSource::Create(kChromeUIMediaInternalsHost); 21 WebUIDataSource::Create(kChromeUIMediaInternalsHost);
22 22
23 source->SetJsonPath("strings.js"); 23 source->SetJsonPath("strings.js");
24 24
25 source->AddResourcePath("media_internals.js", IDR_MEDIA_INTERNALS_JS); 25 source->AddResourcePath("media_internals.js", IDR_MEDIA_INTERNALS_JS);
26 source->SetDefaultResource(IDR_MEDIA_INTERNALS_HTML); 26 source->SetDefaultResource(IDR_MEDIA_INTERNALS_HTML);
27 source->DisableI18nAndUseGzipForAllPaths();
27 return source; 28 return source;
28 } 29 }
29 30
30 } // namespace 31 } // namespace
31 32
32 //////////////////////////////////////////////////////////////////////////////// 33 ////////////////////////////////////////////////////////////////////////////////
33 // 34 //
34 // MediaInternalsUI 35 // MediaInternalsUI
35 // 36 //
36 //////////////////////////////////////////////////////////////////////////////// 37 ////////////////////////////////////////////////////////////////////////////////
37 38
38 MediaInternalsUI::MediaInternalsUI(WebUI* web_ui) 39 MediaInternalsUI::MediaInternalsUI(WebUI* web_ui)
39 : WebUIController(web_ui) { 40 : WebUIController(web_ui) {
40 web_ui->AddMessageHandler(new MediaInternalsMessageHandler()); 41 web_ui->AddMessageHandler(new MediaInternalsMessageHandler());
41 42
42 BrowserContext* browser_context = 43 BrowserContext* browser_context =
43 web_ui->GetWebContents()->GetBrowserContext(); 44 web_ui->GetWebContents()->GetBrowserContext();
44 WebUIDataSource::Add(browser_context, CreateMediaInternalsHTMLSource()); 45 WebUIDataSource::Add(browser_context, CreateMediaInternalsHTMLSource());
45 } 46 }
46 47
47 } // namespace content 48 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_internals_ui.cc ('k') | content/browser/service_worker/service_worker_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698