1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ios/web/public/web_thread.h"
7 #include "content/public/browser/browser_thread.h"
8 #include "ios/web/web_thread_impl.h"
13 bool WebThread::PostTask(ID identifier
,
14 const tracked_objects::Location
& from_here
,
15 const base::Closure
& task
) {
16 return content::BrowserThread::PostTask(
17 BrowserThreadIDFromWebThreadID(identifier
), from_here
, task
);
21 bool WebThread::PostDelayedTask(ID identifier
,
22 const tracked_objects::Location
& from_here
,
23 const base::Closure
& task
,
24 base::TimeDelta delay
) {
25 return content::BrowserThread::PostDelayedTask(
26 BrowserThreadIDFromWebThreadID(identifier
), from_here
, task
, delay
);
30 bool WebThread::PostTaskAndReply(ID identifier
,
31 const tracked_objects::Location
& from_here
,
32 const base::Closure
& task
,
33 const base::Closure
& reply
) {
34 return content::BrowserThread::PostTaskAndReply(
35 BrowserThreadIDFromWebThreadID(identifier
), from_here
, task
, reply
);
39 bool WebThread::PostBlockingPoolTask(const tracked_objects::Location
& from_here
,
40 const base::Closure
& task
) {
41 return content::BrowserThread::PostBlockingPoolTask(from_here
, task
);
45 bool WebThread::PostBlockingPoolSequencedTask(
46 const std::string
& sequence_token_name
,
47 const tracked_objects::Location
& from_here
,
48 const base::Closure
& task
) {
49 return content::BrowserThread::PostBlockingPoolSequencedTask(
50 sequence_token_name
, from_here
, task
);
54 base::SequencedWorkerPool
* WebThread::GetBlockingPool() {
55 return content::BrowserThread::GetBlockingPool();
59 base::MessageLoop
* WebThread::UnsafeGetMessageLoopForThread(ID identifier
) {
60 return content::BrowserThread::UnsafeGetMessageLoopForThread(
61 BrowserThreadIDFromWebThreadID(identifier
));
65 bool WebThread::CurrentlyOn(ID identifier
) {
66 return content::BrowserThread::CurrentlyOn(
67 BrowserThreadIDFromWebThreadID(identifier
));
71 scoped_refptr
<base::MessageLoopProxy
> WebThread::GetMessageLoopProxyForThread(
73 return content::BrowserThread::GetMessageLoopProxyForThread(
74 BrowserThreadIDFromWebThreadID(identifier
));
78 std::string
WebThread::GetDCheckCurrentlyOnErrorMessage(ID expected
) {
79 return content::BrowserThread::GetDCheckCurrentlyOnErrorMessage(
80 BrowserThreadIDFromWebThreadID(expected
));