OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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/webrtc_internals_message_handler.h" | 5 #include "content/browser/media/webrtc_internals_message_handler.h" |
6 | 6 |
7 #include "content/browser/media/webrtc_internals.h" | 7 #include "content/browser/media/webrtc_internals.h" |
8 #include "content/common/media/peer_connection_tracker_messages.h" | 8 #include "content/common/media/peer_connection_tracker_messages.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 else | 74 else |
75 WebRTCInternals::GetInstance()->DisableAecDump(); | 75 WebRTCInternals::GetInstance()->DisableAecDump(); |
76 } | 76 } |
77 | 77 |
78 void WebRTCInternalsMessageHandler::OnDOMLoadDone( | 78 void WebRTCInternalsMessageHandler::OnDOMLoadDone( |
79 const base::ListValue* /* unused_list */) { | 79 const base::ListValue* /* unused_list */) { |
80 WebRTCInternals::GetInstance()->SendAllUpdates(); | 80 WebRTCInternals::GetInstance()->SendAllUpdates(); |
81 | 81 |
82 if (WebRTCInternals::GetInstance()->aec_dump_enabled()) { | 82 if (WebRTCInternals::GetInstance()->aec_dump_enabled()) { |
83 std::vector<const base::Value*> args_vector; | 83 std::vector<const base::Value*> args_vector; |
84 string16 script = WebUI::GetJavascriptCall("setAecRecordingEnabled", | 84 base::string16 script = WebUI::GetJavascriptCall("setAecRecordingEnabled", |
85 args_vector); | 85 args_vector); |
86 RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); | 86 RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); |
87 if (host) | 87 if (host) |
88 host->ExecuteJavascriptInWebFrame(string16(), script); | 88 host->ExecuteJavascriptInWebFrame(base::string16(), script); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 void WebRTCInternalsMessageHandler::OnUpdate(const std::string& command, | 92 void WebRTCInternalsMessageHandler::OnUpdate(const std::string& command, |
93 const base::Value* args) { | 93 const base::Value* args) { |
94 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 94 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
95 std::vector<const base::Value*> args_vector; | 95 std::vector<const base::Value*> args_vector; |
96 args_vector.push_back(args); | 96 args_vector.push_back(args); |
97 base::string16 update = WebUI::GetJavascriptCall(command, args_vector); | 97 base::string16 update = WebUI::GetJavascriptCall(command, args_vector); |
98 | 98 |
99 RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); | 99 RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); |
100 if (host) | 100 if (host) |
101 host->ExecuteJavascriptInWebFrame(base::string16(), update); | 101 host->ExecuteJavascriptInWebFrame(base::string16(), update); |
102 } | 102 } |
103 | 103 |
104 } // namespace content | 104 } // namespace content |
OLD | NEW |