OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "chrome/browser/ui/webui/webrtc_internals_message_handler.h" |
| 6 |
| 7 #include "chrome/browser/ui/webui/webrtc_internals_proxy.h" |
| 8 #include "content/public/browser/render_view_host.h" |
| 9 #include "content/public/browser/web_contents.h" |
| 10 #include "content/public/browser/web_ui.h" |
| 11 |
| 12 WebRTCInternalsMessageHandler::WebRTCInternalsMessageHandler() |
| 13 : proxy_(new WebRTCInternalsProxy()) { |
| 14 proxy_->Attach(this); |
| 15 } |
| 16 |
| 17 WebRTCInternalsMessageHandler::~WebRTCInternalsMessageHandler() { |
| 18 proxy_->Detach(); |
| 19 } |
| 20 |
| 21 void WebRTCInternalsMessageHandler::RegisterMessages() { |
| 22 } |
| 23 |
| 24 void WebRTCInternalsMessageHandler::OnUpdate(const string16& update) { |
| 25 content::RenderViewHost* host = |
| 26 web_ui()->GetWebContents()->GetRenderViewHost(); |
| 27 if (host) |
| 28 host->ExecuteJavascriptInWebFrame(string16(), update); |
| 29 } |
OLD | NEW |