Use multiline attribute to check for IA2_STATE_MULTILINE.
[chromium-blink-merge.git] / content / browser / media / webrtc_internals_ui.cc
blob6797030574190fd345d6ac04aa7d23c2315bfe23
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/media/webrtc_internals_ui.h"
7 #include "content/browser/media/webrtc_internals_message_handler.h"
8 #include "content/grit/content_resources.h"
9 #include "content/public/browser/web_contents.h"
10 #include "content/public/browser/web_ui.h"
11 #include "content/public/browser/web_ui_data_source.h"
12 #include "content/public/common/url_constants.h"
14 namespace content {
15 namespace {
17 WebUIDataSource* CreateWebRTCInternalsHTMLSource() {
18 WebUIDataSource* source =
19 WebUIDataSource::Create(kChromeUIWebRTCInternalsHost);
21 source->SetJsonPath("strings.js");
22 source->AddResourcePath("webrtc_internals.js", IDR_WEBRTC_INTERNALS_JS);
23 source->SetDefaultResource(IDR_WEBRTC_INTERNALS_HTML);
24 return source;
27 } // namespace
29 ////////////////////////////////////////////////////////////////////////////////
31 // WebRTCInternalsUI
33 ////////////////////////////////////////////////////////////////////////////////
35 WebRTCInternalsUI::WebRTCInternalsUI(WebUI* web_ui)
36 : WebUIController(web_ui) {
37 web_ui->AddMessageHandler(new WebRTCInternalsMessageHandler());
39 BrowserContext* browser_context =
40 web_ui->GetWebContents()->GetBrowserContext();
41 WebUIDataSource::Add(browser_context, CreateWebRTCInternalsHTMLSource());
44 } // namespace content