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

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

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media/media_internals_handler.cc ('k') | chrome/browser/ui/webui/metrics_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698