Commit 8da8a4fb authored by Marshall Greenblatt's avatar Marshall Greenblatt

Update to Chromium revision 12bfc336 (#338390).

- The ffmpeg library is now statically linked (see https://codereview.chromium.org/1141703002).
- Off-screen rendering of the PDF viewer does not work in combination with surfaces. Pass the
  `--disable-surfaces` command-line flag if GPU is enabled (see https://codereview.chromium.org/1169983006).
parent 50a9343c
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{ {
'chromium_checkout': '14bd12d63019fbdd6f9d6c16b986a5f64a21264b', 'chromium_checkout': '12bfc3360892ec53cd00fc239a47e5298beb063b',
} }
...@@ -278,7 +278,6 @@ if(OS_LINUX) ...@@ -278,7 +278,6 @@ if(OS_LINUX)
# List of CEF binary files. # List of CEF binary files.
set(CEF_BINARY_FILES set(CEF_BINARY_FILES
chrome-sandbox chrome-sandbox
libffmpegsumo.so
libcef.so libcef.so
natives_blob.bin natives_blob.bin
snapshot_blob.bin snapshot_blob.bin
...@@ -438,7 +437,6 @@ if(OS_WINDOWS) ...@@ -438,7 +437,6 @@ if(OS_WINDOWS)
set(CEF_BINARY_FILES set(CEF_BINARY_FILES
d3dcompiler_43.dll d3dcompiler_43.dll
d3dcompiler_47.dll d3dcompiler_47.dll
ffmpegsumo.dll
libcef.dll libcef.dll
libEGL.dll libEGL.dll
libGLESv2.dll libGLESv2.dll
......
...@@ -949,6 +949,7 @@ ...@@ -949,6 +949,7 @@
'<(DEPTH)/components/components.gyp:pref_registry', '<(DEPTH)/components/components.gyp:pref_registry',
'<(DEPTH)/components/components.gyp:printing_common', '<(DEPTH)/components/components.gyp:printing_common',
'<(DEPTH)/components/components.gyp:printing_renderer', '<(DEPTH)/components/components.gyp:printing_renderer',
'<(DEPTH)/components/components.gyp:proxy_config',
'<(DEPTH)/components/components.gyp:update_client', '<(DEPTH)/components/components.gyp:update_client',
'<(DEPTH)/components/components.gyp:user_prefs', '<(DEPTH)/components/components.gyp:user_prefs',
'<(DEPTH)/components/components.gyp:web_cache_renderer', '<(DEPTH)/components/components.gyp:web_cache_renderer',
...@@ -1276,10 +1277,6 @@ ...@@ -1276,10 +1277,6 @@
'<(DEPTH)/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h', '<(DEPTH)/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h',
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.cc', '<(DEPTH)/chrome/browser/prefs/command_line_pref_store.cc',
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.h', '<(DEPTH)/chrome/browser/prefs/command_line_pref_store.h',
'<(DEPTH)/chrome/browser/prefs/proxy_config_dictionary.cc',
'<(DEPTH)/chrome/browser/prefs/proxy_config_dictionary.h',
'<(DEPTH)/chrome/browser/prefs/proxy_prefs.cc',
'<(DEPTH)/chrome/browser/prefs/proxy_prefs.h',
'<(DEPTH)/chrome/common/pref_names.cc', '<(DEPTH)/chrome/common/pref_names.cc',
'<(DEPTH)/chrome/common/pref_names.h', '<(DEPTH)/chrome/common/pref_names.h',
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc', '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc',
...@@ -1546,13 +1543,6 @@ ...@@ -1546,13 +1543,6 @@
}, },
], ],
'copies': [ 'copies': [
{
# Copy binaries for HTML5 audio/video support.
'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
'files': [
'<(PRODUCT_DIR)/ffmpegsumo.so',
],
},
{ {
# Copy binaries for breakpad support. # Copy binaries for breakpad support.
'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#include "include/base/cef_string16.h" #include "include/base/cef_string16.h"
#include "include/internal/cef_string_types.h" #include "include/internal/cef_string_types.h"
#if defined(BUILDING_CEF_SHARED)
#include "base/files/file_path.h"
#endif
/// ///
// Traits implementation for wide character strings. // Traits implementation for wide character strings.
/// ///
...@@ -692,6 +696,17 @@ class CefStringBase { ...@@ -692,6 +696,17 @@ class CefStringBase {
return *this; return *this;
} }
#endif // WCHAR_T_IS_UTF32 #endif // WCHAR_T_IS_UTF32
#if defined(BUILDING_CEF_SHARED)
// The base::FilePath constructor is marked as explicit so provide the
// conversion here for convenience.
operator base::FilePath() const {
#if defined(OS_WIN)
return base::FilePath(ToWString());
#else
return base::FilePath(ToString());
#endif
}
#endif // BUILDING_CEF_SHARED
private: private:
// Allocate the string structure if it doesn't already exist. // Allocate the string structure if it doesn't already exist.
......
...@@ -886,8 +886,7 @@ void CefBrowserHostImpl::StartDownload(const CefString& url) { ...@@ -886,8 +886,7 @@ void CefBrowserHostImpl::StartDownload(const CefString& url) {
if (!manager) if (!manager)
return; return;
scoped_ptr<content::DownloadUrlParameters> params; scoped_ptr<content::DownloadUrlParameters> params(
params.reset(
content::DownloadUrlParameters::FromWebContents(web_contents(), gurl)); content::DownloadUrlParameters::FromWebContents(web_contents(), gurl));
manager->DownloadUrl(params.Pass()); manager->DownloadUrl(params.Pass());
} }
...@@ -1393,6 +1392,13 @@ bool CefBrowserHostImpl::CanGoBack() { ...@@ -1393,6 +1392,13 @@ bool CefBrowserHostImpl::CanGoBack() {
void CefBrowserHostImpl::GoBack() { void CefBrowserHostImpl::GoBack() {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (frame_destruction_pending_) {
// Try again after frame destruction has completed.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::GoBack, this));
return;
}
if (web_contents_.get() && web_contents_->GetController().CanGoBack()) if (web_contents_.get() && web_contents_->GetController().CanGoBack())
web_contents_->GetController().GoBack(); web_contents_->GetController().GoBack();
} else { } else {
...@@ -1408,6 +1414,13 @@ bool CefBrowserHostImpl::CanGoForward() { ...@@ -1408,6 +1414,13 @@ bool CefBrowserHostImpl::CanGoForward() {
void CefBrowserHostImpl::GoForward() { void CefBrowserHostImpl::GoForward() {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (frame_destruction_pending_) {
// Try again after frame destruction has completed.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::GoForward, this));
return;
}
if (web_contents_.get() && web_contents_->GetController().CanGoForward()) if (web_contents_.get() && web_contents_->GetController().CanGoForward())
web_contents_->GetController().GoForward(); web_contents_->GetController().GoForward();
} else { } else {
...@@ -1423,6 +1436,13 @@ bool CefBrowserHostImpl::IsLoading() { ...@@ -1423,6 +1436,13 @@ bool CefBrowserHostImpl::IsLoading() {
void CefBrowserHostImpl::Reload() { void CefBrowserHostImpl::Reload() {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (frame_destruction_pending_) {
// Try again after frame destruction has completed.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::Reload, this));
return;
}
if (web_contents_.get()) if (web_contents_.get())
web_contents_->GetController().Reload(true); web_contents_->GetController().Reload(true);
} else { } else {
...@@ -1433,6 +1453,13 @@ void CefBrowserHostImpl::Reload() { ...@@ -1433,6 +1453,13 @@ void CefBrowserHostImpl::Reload() {
void CefBrowserHostImpl::ReloadIgnoreCache() { void CefBrowserHostImpl::ReloadIgnoreCache() {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (frame_destruction_pending_) {
// Try again after frame destruction has completed.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::ReloadIgnoreCache, this));
return;
}
if (web_contents_.get()) if (web_contents_.get())
web_contents_->GetController().ReloadIgnoringCache(true); web_contents_->GetController().ReloadIgnoringCache(true);
} else { } else {
...@@ -1443,6 +1470,13 @@ void CefBrowserHostImpl::ReloadIgnoreCache() { ...@@ -1443,6 +1470,13 @@ void CefBrowserHostImpl::ReloadIgnoreCache() {
void CefBrowserHostImpl::StopLoad() { void CefBrowserHostImpl::StopLoad() {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (frame_destruction_pending_) {
// Try again after frame destruction has completed.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::StopLoad, this));
return;
}
if (web_contents_.get()) if (web_contents_.get())
web_contents_->Stop(); web_contents_->Stop();
} else { } else {
...@@ -1719,6 +1753,14 @@ void CefBrowserHostImpl::LoadURL( ...@@ -1719,6 +1753,14 @@ void CefBrowserHostImpl::LoadURL(
if (frame_id == CefFrameHostImpl::kMainFrameId) { if (frame_id == CefFrameHostImpl::kMainFrameId) {
// Go through the navigation controller. // Go through the navigation controller.
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (frame_destruction_pending_) {
// Try again after frame destruction has completed.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::LoadURL, this, frame_id, url,
referrer, transition, extra_headers));
return;
}
if (web_contents_.get()) { if (web_contents_.get()) {
GURL gurl = GURL(url); GURL gurl = GURL(url);
...@@ -2407,7 +2449,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents( ...@@ -2407,7 +2449,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
int route_id, int route_id,
int main_frame_route_id, int main_frame_route_id,
WindowContainerType window_container_type, WindowContainerType window_container_type,
const base::string16& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace, content::SessionStorageNamespace* session_storage_namespace,
...@@ -2433,7 +2475,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents( ...@@ -2433,7 +2475,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
void CefBrowserHostImpl::WebContentsCreated( void CefBrowserHostImpl::WebContentsCreated(
content::WebContents* source_contents, content::WebContents* source_contents,
int opener_render_frame_id, int opener_render_frame_id,
const base::string16& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
content::WebContents* new_contents) { content::WebContents* new_contents) {
DCHECK(new_contents); DCHECK(new_contents);
...@@ -2675,8 +2717,11 @@ void CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) { ...@@ -2675,8 +2717,11 @@ void CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) {
if (client_.get()) { if (client_.get()) {
CefRefPtr<CefRequestHandler> handler = client_->GetRequestHandler(); CefRefPtr<CefRequestHandler> handler = client_->GetRequestHandler();
if (handler.get()) if (handler.get()) {
frame_destruction_pending_ = true;
handler->OnRenderProcessTerminated(this, ts); handler->OnRenderProcessTerminated(this, ts);
frame_destruction_pending_ = false;
}
} }
} }
...@@ -2700,7 +2745,8 @@ void CefBrowserHostImpl::DidFailProvisionalLoad( ...@@ -2700,7 +2745,8 @@ void CefBrowserHostImpl::DidFailProvisionalLoad(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& validated_url, const GURL& validated_url,
int error_code, int error_code,
const base::string16& error_description) { const base::string16& error_description,
bool was_ignored_by_handler) {
const bool is_main_frame = !render_frame_host->GetParent(); const bool is_main_frame = !render_frame_host->GetParent();
CefRefPtr<CefFrame> frame = GetOrCreateFrame( CefRefPtr<CefFrame> frame = GetOrCreateFrame(
render_frame_host->GetRoutingID(), render_frame_host->GetRoutingID(),
...@@ -2720,7 +2766,8 @@ void CefBrowserHostImpl::DidFailLoad( ...@@ -2720,7 +2766,8 @@ void CefBrowserHostImpl::DidFailLoad(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& validated_url, const GURL& validated_url,
int error_code, int error_code,
const base::string16& error_description) { const base::string16& error_description,
bool was_ignored_by_handler) {
const bool is_main_frame = !render_frame_host->GetParent(); const bool is_main_frame = !render_frame_host->GetParent();
CefRefPtr<CefFrame> frame = GetOrCreateFrame( CefRefPtr<CefFrame> frame = GetOrCreateFrame(
render_frame_host->GetRoutingID(), render_frame_host->GetRoutingID(),
...@@ -2968,6 +3015,7 @@ CefBrowserHostImpl::CefBrowserHostImpl( ...@@ -2968,6 +3015,7 @@ CefBrowserHostImpl::CefBrowserHostImpl(
main_frame_id_(CefFrameHostImpl::kInvalidFrameId), main_frame_id_(CefFrameHostImpl::kInvalidFrameId),
focused_frame_id_(CefFrameHostImpl::kInvalidFrameId), focused_frame_id_(CefFrameHostImpl::kInvalidFrameId),
destruction_state_(DESTRUCTION_STATE_NONE), destruction_state_(DESTRUCTION_STATE_NONE),
frame_destruction_pending_(false),
window_destroyed_(false), window_destroyed_(false),
is_in_onsetfocus_(false), is_in_onsetfocus_(false),
focus_on_editable_field_(false), focus_on_editable_field_(false),
...@@ -3147,11 +3195,13 @@ void CefBrowserHostImpl::OnLoadError(CefRefPtr<CefFrame> frame, ...@@ -3147,11 +3195,13 @@ void CefBrowserHostImpl::OnLoadError(CefRefPtr<CefFrame> frame,
if (client_.get()) { if (client_.get()) {
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler(); CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
if (handler.get()) { if (handler.get()) {
frame_destruction_pending_ = true;
// Notify the handler that loading has failed. // Notify the handler that loading has failed.
handler->OnLoadError(this, frame, handler->OnLoadError(this, frame,
static_cast<cef_errorcode_t>(error_code), static_cast<cef_errorcode_t>(error_code),
CefString(error_description), CefString(error_description),
url.spec()); url.spec());
frame_destruction_pending_ = false;
} }
} }
} }
......
...@@ -397,7 +397,7 @@ class CefBrowserHostImpl : public CefBrowserHost, ...@@ -397,7 +397,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
int route_id, int route_id,
int main_frame_route_id, int main_frame_route_id,
WindowContainerType window_container_type, WindowContainerType window_container_type,
const base::string16& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace, content::SessionStorageNamespace* session_storage_namespace,
...@@ -405,7 +405,7 @@ class CefBrowserHostImpl : public CefBrowserHost, ...@@ -405,7 +405,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
content::RenderViewHostDelegateView** delegate_view) override; content::RenderViewHostDelegateView** delegate_view) override;
void WebContentsCreated(content::WebContents* source_contents, void WebContentsCreated(content::WebContents* source_contents,
int opener_render_frame_id, int opener_render_frame_id,
const base::string16& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
content::WebContents* new_contents) override; content::WebContents* new_contents) override;
void DidNavigateMainFramePostCommit( void DidNavigateMainFramePostCommit(
...@@ -461,12 +461,14 @@ class CefBrowserHostImpl : public CefBrowserHost, ...@@ -461,12 +461,14 @@ class CefBrowserHostImpl : public CefBrowserHost,
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& validated_url, const GURL& validated_url,
int error_code, int error_code,
const base::string16& error_description) override; const base::string16& error_description,
bool was_ignored_by_handler) override;
void DocumentAvailableInMainFrame() override; void DocumentAvailableInMainFrame() override;
void DidFailLoad(content::RenderFrameHost* render_frame_host, void DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url, const GURL& validated_url,
int error_code, int error_code,
const base::string16& error_description) override; const base::string16& error_description,
bool was_ignored_by_handler) override;
void FrameDeleted( void FrameDeleted(
content::RenderFrameHost* render_frame_host) override; content::RenderFrameHost* render_frame_host) override;
void PluginCrashed(const base::FilePath& plugin_path, void PluginCrashed(const base::FilePath& plugin_path,
...@@ -662,6 +664,10 @@ class CefBrowserHostImpl : public CefBrowserHost, ...@@ -662,6 +664,10 @@ class CefBrowserHostImpl : public CefBrowserHost,
// thread. // thread.
DestructionState destruction_state_; DestructionState destruction_state_;
// True if frame destruction is currently pending. Navigation should not occur
// while this flag is true.
bool frame_destruction_pending_;
// True if the OS window hosting the browser has been destroyed. Only accessed // True if the OS window hosting the browser has been destroyed. Only accessed
// on the UI thread. // on the UI thread.
bool window_destroyed_; bool window_destroyed_;
......
...@@ -82,7 +82,6 @@ void CefBrowserMainParts::ToolkitInitialized() { ...@@ -82,7 +82,6 @@ void CefBrowserMainParts::ToolkitInitialized() {
#if defined(USE_AURA) #if defined(USE_AURA)
CHECK(aura::Env::GetInstance()); CHECK(aura::Env::GetInstance());
DCHECK(!views::ViewsDelegate::views_delegate);
new views::DesktopTestViewsDelegate; new views::DesktopTestViewsDelegate;
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -193,7 +192,9 @@ void CefBrowserMainParts::PostMainMessageLoopRun() { ...@@ -193,7 +192,9 @@ void CefBrowserMainParts::PostMainMessageLoopRun() {
void CefBrowserMainParts::PostDestroyThreads() { void CefBrowserMainParts::PostDestroyThreads() {
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Env::DeleteInstance(); aura::Env::DeleteInstance();
delete views::ViewsDelegate::views_delegate;
// Delete the DesktopTestViewsDelegate.
delete views::ViewsDelegate::GetInstance();
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/net/pref_proxy_config_tracker_impl.h" #include "chrome/browser/net/pref_proxy_config_tracker_impl.h"
#include "chrome/browser/prefs/command_line_pref_store.h" #include "chrome/browser/prefs/command_line_pref_store.h"
#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h" #include "components/pref_registry/pref_registry_syncable.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "extensions/browser/extension_prefs.h" #include "extensions/browser/extension_prefs.h"
#include "grit/cef_strings.h" #include "grit/cef_strings.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
......
...@@ -58,9 +58,9 @@ class NET_EXPORT CefURLFetcherResponseWriter : ...@@ -58,9 +58,9 @@ class NET_EXPORT CefURLFetcherResponseWriter :
public: public:
CefURLFetcherResponseWriter( CefURLFetcherResponseWriter(
CefRefPtr<CefBrowserURLRequest> url_request, CefRefPtr<CefBrowserURLRequest> url_request,
scoped_refptr<base::MessageLoopProxy> message_loop_proxy) scoped_refptr<base::SequencedTaskRunner> task_runner)
: url_request_(url_request), : url_request_(url_request),
message_loop_proxy_(message_loop_proxy) { task_runner_(task_runner) {
} }
// net::URLFetcherResponseWriter methods. // net::URLFetcherResponseWriter methods.
...@@ -72,11 +72,11 @@ class NET_EXPORT CefURLFetcherResponseWriter : ...@@ -72,11 +72,11 @@ class NET_EXPORT CefURLFetcherResponseWriter :
int num_bytes, int num_bytes,
const net::CompletionCallback& callback) override { const net::CompletionCallback& callback) override {
if (url_request_.get()) { if (url_request_.get()) {
message_loop_proxy_->PostTask(FROM_HERE, task_runner_->PostTask(FROM_HERE,
base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread, base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread,
url_request_, scoped_refptr<net::IOBuffer>(buffer), url_request_, scoped_refptr<net::IOBuffer>(buffer),
num_bytes, callback, num_bytes, callback,
base::MessageLoop::current()->message_loop_proxy())); base::MessageLoop::current()->task_runner()));
return net::ERR_IO_PENDING; return net::ERR_IO_PENDING;
} }
return num_bytes; return num_bytes;
...@@ -94,7 +94,7 @@ class NET_EXPORT CefURLFetcherResponseWriter : ...@@ -94,7 +94,7 @@ class NET_EXPORT CefURLFetcherResponseWriter :
scoped_refptr<net::IOBuffer> buffer, scoped_refptr<net::IOBuffer> buffer,
int num_bytes, int num_bytes,
const net::CompletionCallback& callback, const net::CompletionCallback& callback,
scoped_refptr<base::MessageLoopProxy> source_message_loop_proxy) { scoped_refptr<base::SequencedTaskRunner> source_message_loop_proxy) {
CefRefPtr<CefURLRequestClient> client = url_request->GetClient(); CefRefPtr<CefURLRequestClient> client = url_request->GetClient();
if (client.get()) if (client.get())
client->OnDownloadData(url_request.get(), buffer->data(), num_bytes); client->OnDownloadData(url_request.get(), buffer->data(), num_bytes);
...@@ -111,7 +111,7 @@ class NET_EXPORT CefURLFetcherResponseWriter : ...@@ -111,7 +111,7 @@ class NET_EXPORT CefURLFetcherResponseWriter :
} }
CefRefPtr<CefBrowserURLRequest> url_request_; CefRefPtr<CefBrowserURLRequest> url_request_;
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; scoped_refptr<base::SequencedTaskRunner> task_runner_;
DISALLOW_COPY_AND_ASSIGN(CefURLFetcherResponseWriter); DISALLOW_COPY_AND_ASSIGN(CefURLFetcherResponseWriter);
}; };
...@@ -137,7 +137,7 @@ class CefBrowserURLRequest::Context ...@@ -137,7 +137,7 @@ class CefBrowserURLRequest::Context
request_(request), request_(request),
client_(client), client_(client),
request_context_(request_context), request_context_(request_context),
message_loop_proxy_(base::MessageLoop::current()->message_loop_proxy()), task_runner_(base::MessageLoop::current()->task_runner()),
status_(UR_IO_PENDING), status_(UR_IO_PENDING),
error_code_(ERR_NONE), error_code_(ERR_NONE),
upload_data_size_(0), upload_data_size_(0),
...@@ -147,7 +147,7 @@ class CefBrowserURLRequest::Context ...@@ -147,7 +147,7 @@ class CefBrowserURLRequest::Context
} }
inline bool CalledOnValidThread() { inline bool CalledOnValidThread() {
return message_loop_proxy_->BelongsToCurrentThread(); return task_runner_->RunsTasksOnCurrentThread();
} }
bool Start() { bool Start() {
...@@ -160,14 +160,14 @@ class CefBrowserURLRequest::Context ...@@ -160,14 +160,14 @@ class CefBrowserURLRequest::Context
std::string method = request_->GetMethod(); std::string method = request_->GetMethod();
base::StringToLowerASCII(&method); base::StringToLowerASCII(&method);
net::URLFetcher::RequestType request_type = net::URLFetcher::GET; net::URLFetcher::RequestType request_type = net::URLFetcher::GET;
if (LowerCaseEqualsASCII(method, "get")) { if (base::LowerCaseEqualsASCII(method, "get")) {
} else if (LowerCaseEqualsASCII(method, "post")) { } else if (base::LowerCaseEqualsASCII(method, "post")) {
request_type = net::URLFetcher::POST; request_type = net::URLFetcher::POST;
} else if (LowerCaseEqualsASCII(method, "head")) { } else if (base::LowerCaseEqualsASCII(method, "head")) {
request_type = net::URLFetcher::HEAD; request_type = net::URLFetcher::HEAD;
} else if (LowerCaseEqualsASCII(method, "delete")) { } else if (base::LowerCaseEqualsASCII(method, "delete")) {
request_type = net::URLFetcher::DELETE_REQUEST; request_type = net::URLFetcher::DELETE_REQUEST;
} else if (LowerCaseEqualsASCII(method, "put")) { } else if (base::LowerCaseEqualsASCII(method, "put")) {
request_type = net::URLFetcher::PUT; request_type = net::URLFetcher::PUT;
} else { } else {
NOTREACHED() << "invalid request type"; NOTREACHED() << "invalid request type";
...@@ -324,7 +324,7 @@ class CefBrowserURLRequest::Context ...@@ -324,7 +324,7 @@ class CefBrowserURLRequest::Context
response_writer.reset(new CefURLFetcherResponseWriter(NULL, NULL)); response_writer.reset(new CefURLFetcherResponseWriter(NULL, NULL));
} else { } else {
response_writer.reset( response_writer.reset(
new CefURLFetcherResponseWriter(url_request_, message_loop_proxy_)); new CefURLFetcherResponseWriter(url_request_, task_runner_));
} }
fetcher_->SaveResponseWithWriter(response_writer.Pass()); fetcher_->SaveResponseWithWriter(response_writer.Pass());
...@@ -429,7 +429,7 @@ class CefBrowserURLRequest::Context ...@@ -429,7 +429,7 @@ class CefBrowserURLRequest::Context
~Context() { ~Context() {
if (fetcher_.get()) { if (fetcher_.get()) {
// Delete the fetcher object on the thread that created it. // Delete the fetcher object on the thread that created it.
message_loop_proxy_->DeleteSoon(FROM_HERE, fetcher_.release()); task_runner_->DeleteSoon(FROM_HERE, fetcher_.release());
} }
} }
...@@ -463,7 +463,7 @@ class CefBrowserURLRequest::Context ...@@ -463,7 +463,7 @@ class CefBrowserURLRequest::Context
CefRefPtr<CefRequest> request_; CefRefPtr<CefRequest> request_;
CefRefPtr<CefURLRequestClient> client_; CefRefPtr<CefURLRequestClient> client_;
CefRefPtr<CefRequestContext> request_context_; CefRefPtr<CefRequestContext> request_context_;
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; scoped_refptr<base::SequencedTaskRunner> task_runner_;
scoped_ptr<net::URLFetcher> fetcher_; scoped_ptr<net::URLFetcher> fetcher_;
scoped_ptr<CefURLFetcherDelegate> fetcher_delegate_; scoped_ptr<CefURLFetcherDelegate> fetcher_delegate_;
CefURLRequest::Status status_; CefURLRequest::Status status_;
......
...@@ -273,3 +273,8 @@ gcm::GCMDriver* ChromeBrowserProcessStub::gcm_driver() { ...@@ -273,3 +273,8 @@ gcm::GCMDriver* ChromeBrowserProcessStub::gcm_driver() {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
return NULL; return NULL;
} }
memory::OomPriorityManager* ChromeBrowserProcessStub::GetOomPriorityManager() {
NOTIMPLEMENTED();
return NULL;
}
...@@ -96,6 +96,7 @@ class ChromeBrowserProcessStub : public BrowserProcess { ...@@ -96,6 +96,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
#endif #endif
network_time::NetworkTimeTracker* network_time_tracker() override; network_time::NetworkTimeTracker* network_time_tracker() override;
gcm::GCMDriver* gcm_driver() override; gcm::GCMDriver* gcm_driver() override;
memory::OomPriorityManager* GetOomPriorityManager() override;
private: private:
std::string locale_; std::string locale_;
......