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

Unified Diff: content/child/webthread_impl.cc

Issue 515243002: Expose platform thread id on blink::WebThread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/child/webthread_impl.h ('k') | mojo/services/html_viewer/webthread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webthread_impl.cc
diff --git a/content/child/webthread_impl.cc b/content/child/webthread_impl.cc
index d53d06e061036ba3a2c8fb99c5bcee800471eb24..1f3097a268214841e360392e51893009dd8b06d3 100644
--- a/content/child/webthread_impl.cc
+++ b/content/child/webthread_impl.cc
@@ -88,13 +88,18 @@ bool WebThreadImpl::isCurrentThread() const {
return thread_->thread_id() == base::PlatformThread::CurrentId();
}
+blink::PlatformThreadId WebThreadImpl::threadId() const {
+ return thread_->thread_id();
+}
+
WebThreadImpl::~WebThreadImpl() {
thread_->Stop();
}
WebThreadImplForMessageLoop::WebThreadImplForMessageLoop(
base::MessageLoopProxy* message_loop)
- : message_loop_(message_loop) {}
+ : message_loop_(message_loop),
+ thread_id_(base::PlatformThread::CurrentId()) {}
void WebThreadImplForMessageLoop::postTask(Task* task) {
message_loop_->PostTask(
@@ -126,6 +131,10 @@ bool WebThreadImplForMessageLoop::isCurrentThread() const {
return message_loop_->BelongsToCurrentThread();
}
+blink::PlatformThreadId WebThreadImplForMessageLoop::threadId() const {
+ return thread_id_;
+}
+
WebThreadImplForMessageLoop::~WebThreadImplForMessageLoop() {}
} // namespace content
« no previous file with comments | « content/child/webthread_impl.h ('k') | mojo/services/html_viewer/webthread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698