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

Side by Side Diff: chrome/browser/ui/webui/media/webrtc_logs_ui.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/webui/media/webrtc_logs_ui.h" 5 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 22 matching lines...) Expand all
33 #endif 33 #endif
34 34
35 using content::WebContents; 35 using content::WebContents;
36 using content::WebUIMessageHandler; 36 using content::WebUIMessageHandler;
37 37
38 namespace { 38 namespace {
39 39
40 content::WebUIDataSource* CreateWebRtcLogsUIHTMLSource() { 40 content::WebUIDataSource* CreateWebRtcLogsUIHTMLSource() {
41 content::WebUIDataSource* source = 41 content::WebUIDataSource* source =
42 content::WebUIDataSource::Create(chrome::kChromeUIWebRtcLogsHost); 42 content::WebUIDataSource::Create(chrome::kChromeUIWebRtcLogsHost);
43 source->SetUseJsonJSFormatV2();
44 43
45 source->AddLocalizedString("webrtcLogsTitle", IDS_WEBRTC_LOGS_TITLE); 44 source->AddLocalizedString("webrtcLogsTitle", IDS_WEBRTC_LOGS_TITLE);
46 source->AddLocalizedString("webrtcLogCountFormat", 45 source->AddLocalizedString("webrtcLogCountFormat",
47 IDS_WEBRTC_LOGS_LOG_COUNT_BANNER_FORMAT); 46 IDS_WEBRTC_LOGS_LOG_COUNT_BANNER_FORMAT);
48 source->AddLocalizedString("webrtcLogHeaderFormat", 47 source->AddLocalizedString("webrtcLogHeaderFormat",
49 IDS_WEBRTC_LOGS_LOG_HEADER_FORMAT); 48 IDS_WEBRTC_LOGS_LOG_HEADER_FORMAT);
50 source->AddLocalizedString("webrtcLogLocalFileLabelFormat", 49 source->AddLocalizedString("webrtcLogLocalFileLabelFormat",
51 IDS_WEBRTC_LOGS_LOG_LOCAL_FILE_LABEL_FORMAT); 50 IDS_WEBRTC_LOGS_LOG_LOCAL_FILE_LABEL_FORMAT);
52 source->AddLocalizedString("webrtcLogLocalFileFormat", 51 source->AddLocalizedString("webrtcLogLocalFileFormat",
53 IDS_WEBRTC_LOGS_LOG_LOCAL_FILE_FORMAT); 52 IDS_WEBRTC_LOGS_LOG_LOCAL_FILE_FORMAT);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // 191 //
193 /////////////////////////////////////////////////////////////////////////////// 192 ///////////////////////////////////////////////////////////////////////////////
194 193
195 WebRtcLogsUI::WebRtcLogsUI(content::WebUI* web_ui) : WebUIController(web_ui) { 194 WebRtcLogsUI::WebRtcLogsUI(content::WebUI* web_ui) : WebUIController(web_ui) {
196 Profile* profile = Profile::FromWebUI(web_ui); 195 Profile* profile = Profile::FromWebUI(web_ui);
197 web_ui->AddMessageHandler(new WebRtcLogsDOMHandler(profile)); 196 web_ui->AddMessageHandler(new WebRtcLogsDOMHandler(profile));
198 197
199 // Set up the chrome://webrtc-logs/ source. 198 // Set up the chrome://webrtc-logs/ source.
200 content::WebUIDataSource::Add(profile, CreateWebRtcLogsUIHTMLSource()); 199 content::WebUIDataSource::Add(profile, CreateWebRtcLogsUIHTMLSource());
201 } 200 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc ('k') | chrome/browser/ui/webui/nacl_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698