- Move to a unified thread model for CEF based on the CEF2 implementation.

- Add the ability to post user-defined tasks for execution on CEF threads (issue #25).
- Update the CEF swap image.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@90 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-07-24 01:13:55 +00:00
parent 38ded6eec6
commit 7ffa037988
42 changed files with 1800 additions and 1034 deletions

View File

@ -7,7 +7,6 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "base/worker_pool.h"
#include "googleurl/src/url_util.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
@ -19,7 +18,7 @@
#include "include/cef.h"
#include "tracker.h"
#include "context.h"
#include "cef_context.h"
#include "request_impl.h"
#include <map>
@ -68,8 +67,8 @@ public:
// Continue asynchronously.
DCHECK(!async_resolver_);
async_resolver_ = new AsyncResolver(this);
WorkerPool::PostTask(FROM_HERE, NewRunnableMethod(
async_resolver_.get(), &AsyncResolver::Resolve, url_), true);
CefThread::PostTask(CefThread::IO, FROM_HERE, NewRunnableMethod(
async_resolver_.get(), &AsyncResolver::Resolve, url_));
return;
}
@ -411,7 +410,7 @@ bool CefRegisterScheme(const std::wstring& scheme_name,
new SchemeRequestJobWrapper(WideToUTF8(scheme_name),
WideToUTF8(host_name), factory));
PostTask(FROM_HERE, NewRunnableMethod(wrapper.get(),
CefThread::PostTask(CefThread::UI, FROM_HERE, NewRunnableMethod(wrapper.get(),
&SchemeRequestJobWrapper::RegisterScheme));
return true;