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

Unified Diff: content/browser/media/capture/web_contents_tracker.cc

Issue 1112333002: [content/browser/media] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build break Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media/capture/web_contents_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/web_contents_tracker.cc
diff --git a/content/browser/media/capture/web_contents_tracker.cc b/content/browser/media/capture/web_contents_tracker.cc
index 6810ac097aac4b44ae976d439c1112d2ea611436..a9e161f1ce3fcf2ce299734fb103d805ea574eb5 100644
--- a/content/browser/media/capture/web_contents_tracker.cc
+++ b/content/browser/media/capture/web_contents_tracker.cc
@@ -4,7 +4,7 @@
#include "content/browser/media/capture/web_contents_tracker.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/thread_task_runner_handle.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/browser_thread.h"
@@ -24,10 +24,10 @@ WebContentsTracker::~WebContentsTracker() {
void WebContentsTracker::Start(int render_process_id, int main_render_frame_id,
const ChangeCallback& callback) {
- DCHECK(!message_loop_.get() || message_loop_->BelongsToCurrentThread());
+ DCHECK(!task_runner_.get() || task_runner_->BelongsToCurrentThread());
- message_loop_ = base::MessageLoopProxy::current();
- DCHECK(message_loop_.get());
+ task_runner_ = base::ThreadTaskRunnerHandle::Get();
+ DCHECK(task_runner_.get());
callback_ = callback;
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
@@ -41,7 +41,7 @@ void WebContentsTracker::Start(int render_process_id, int main_render_frame_id,
}
void WebContentsTracker::Stop() {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
callback_.Reset();
@@ -88,17 +88,17 @@ void WebContentsTracker::OnPossibleTargetChange(bool force_callback_run) {
<< " to RenderWidgetHost@" << rwh;
last_target_ = rwh;
- if (message_loop_->BelongsToCurrentThread()) {
+ if (task_runner_->BelongsToCurrentThread()) {
MaybeDoCallback(rwh);
} else {
- message_loop_->PostTask(
+ task_runner_->PostTask(
FROM_HERE,
base::Bind(&WebContentsTracker::MaybeDoCallback, this, rwh));
}
}
void WebContentsTracker::MaybeDoCallback(RenderWidgetHost* rwh) {
- DCHECK(message_loop_->BelongsToCurrentThread());
+ DCHECK(task_runner_->BelongsToCurrentThread());
if (!callback_.is_null())
callback_.Run(rwh);
« no previous file with comments | « content/browser/media/capture/web_contents_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698