| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/media_internals_proxy.h" | 5 #include "chrome/browser/ui/webui/media/media_internals_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/io_thread.h" | 9 #include "chrome/browser/io_thread.h" |
| 10 #include "chrome/browser/media/media_internals.h" | 10 #include "chrome/browser/media/media_internals.h" |
| 11 #include "chrome/browser/ui/webui/media/media_internals_handler.h" | 11 #include "chrome/browser/ui/webui/media/media_internals_handler.h" |
| 12 #include "content/browser/webui/web_ui.h" |
| 12 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 13 #include "content/public/browser/notification_types.h" | 14 #include "content/public/browser/notification_types.h" |
| 14 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
| 15 | 16 |
| 16 using content::BrowserThread; | 17 using content::BrowserThread; |
| 17 | 18 |
| 18 static const int kMediaInternalsProxyEventDelayMilliseconds = 100; | 19 static const int kMediaInternalsProxyEventDelayMilliseconds = 100; |
| 19 | 20 |
| 20 static const net::NetLog::EventType kNetEventTypeFilter[] = { | 21 static const net::NetLog::EventType kNetEventTypeFilter[] = { |
| 21 net::NetLog::TYPE_DISK_CACHE_ENTRY_IMPL, | 22 net::NetLog::TYPE_DISK_CACHE_ENTRY_IMPL, |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 182 |
| 182 void MediaInternalsProxy::CallJavaScriptFunctionOnUIThread( | 183 void MediaInternalsProxy::CallJavaScriptFunctionOnUIThread( |
| 183 const std::string& function, Value* args) { | 184 const std::string& function, Value* args) { |
| 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 185 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 185 scoped_ptr<Value> args_value(args); | 186 scoped_ptr<Value> args_value(args); |
| 186 std::vector<const Value*> args_vector; | 187 std::vector<const Value*> args_vector; |
| 187 args_vector.push_back(args_value.get()); | 188 args_vector.push_back(args_value.get()); |
| 188 string16 update = WebUI::GetJavascriptCall(function, args_vector); | 189 string16 update = WebUI::GetJavascriptCall(function, args_vector); |
| 189 UpdateUIOnUIThread(update); | 190 UpdateUIOnUIThread(update); |
| 190 } | 191 } |
| OLD | NEW |