diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index d966558e3..60d16519b 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -17,5 +17,5 @@ { 'chromium_url': 'http://src.chromium.org/svn/trunk/src', - 'chromium_revision': '139609', + 'chromium_revision': '140240', } diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 53a68b757..706f64e0c 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -907,6 +907,7 @@ void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source, void CefBrowserHostImpl::RenderViewCreated( content::RenderViewHost* render_view_host) { base::AutoLock lock_scope(state_lock_); + render_view_id_ = render_view_host->GetRoutingID(); render_process_id_ = render_view_host->GetProcess()->GetID(); } diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 5a25dcb2d..b098f6142 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -328,8 +328,7 @@ class CefBrowserHostImpl : public CefBrowserHost, // Unique ids used for routing communication to/from the renderer. We keep a // copy of them as member variables so that we can locate matching browsers in - // a thread safe manner. |render_process_id_| may change and access must be - // protected by |state_lock_|. + // a thread safe manner. All access must be protected by the state lock. int render_process_id_; int render_view_id_; diff --git a/libcef/browser/browser_main.h b/libcef/browser/browser_main.h index 1dbc120a4..7b277d083 100644 --- a/libcef/browser/browser_main.h +++ b/libcef/browser/browser_main.h @@ -28,16 +28,11 @@ class CefBrowserMainParts : public content::BrowserMainParts { explicit CefBrowserMainParts(const content::MainFunctionParams& parameters); virtual ~CefBrowserMainParts(); - virtual void PreEarlyInitialization() OVERRIDE {} - virtual void PostEarlyInitialization() OVERRIDE {} virtual void PreMainMessageLoopStart() OVERRIDE; - virtual void PostMainMessageLoopStart() OVERRIDE {} - virtual void ToolkitInitialized() OVERRIDE {} virtual int PreCreateThreads() OVERRIDE; virtual void PreMainMessageLoopRun() OVERRIDE; virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; virtual void PostMainMessageLoopRun() OVERRIDE; - virtual void PostDestroyThreads() OVERRIDE {} CefBrowserContext* browser_context() const { return browser_context_.get(); } CefDevToolsDelegate* devtools_delegate() const { return devtools_delegate_; } diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 91f5720b7..55fb74eb8 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -19,7 +19,6 @@ #include "content/public/browser/render_process_host.h" #include "content/public/common/content_switches.h" #include "googleurl/src/gurl.h" -#include "third_party/skia/include/core/SkBitmap.h" namespace { diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index dfba49c46..d46db29ad 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -313,6 +313,7 @@ CefRefPtr CefContext::GetBrowserByID(int id) { return it->get(); } + DLOG(ERROR) << "No browser matching unique id " << id; return NULL; } @@ -326,6 +327,8 @@ CefRefPtr CefContext::GetBrowserByRoutingID( return it->get(); } + DLOG(ERROR) << "No browser matching process id " << render_process_id << + " and view id " << render_view_id; return NULL; } diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index 1c0475efd..128f4c7b5 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -45,10 +45,14 @@ content::DownloadId CefDownloadManagerDelegate::GetNextId() { bool CefDownloadManagerDelegate::ShouldStartDownload(int32 download_id) { DownloadItem* download = download_manager_->GetActiveDownloadItem(download_id); - DownloadStateInfo state = download->GetStateInfo(); - if (!state.force_file_name.empty()) + if (!download->GetForcedFilePath().empty()) { + download->OnTargetPathDetermined( + download->GetForcedFilePath(), + DownloadItem::TARGET_DISPOSITION_OVERWRITE, + content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS); return true; + } FilePath generated_name = net::GenerateFileName( download->GetURL(), @@ -58,15 +62,12 @@ bool CefDownloadManagerDelegate::ShouldStartDownload(int32 download_id) { download->GetMimeType(), "download"); - // Since we have no download UI, show the user a dialog always. - state.prompt_user_for_save_location = true; - BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, base::Bind( &CefDownloadManagerDelegate::GenerateFilename, - this, download_id, state, generated_name)); + this, download_id, generated_name)); return false; } @@ -75,7 +76,7 @@ void CefDownloadManagerDelegate::ChooseDownloadPath( const FilePath& suggested_path, int32 download_id) { FilePath result; -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(USE_AURA) std::wstring file_part = FilePath(suggested_path).BaseName().value(); wchar_t file_name[MAX_PATH]; base::wcslcpy(file_name, file_part.c_str(), arraysize(file_name)); @@ -109,32 +110,32 @@ void CefDownloadManagerDelegate::ChooseDownloadPath( void CefDownloadManagerDelegate::GenerateFilename( int32 download_id, - DownloadStateInfo state, const FilePath& generated_name) { - if (state.suggested_path.empty()) { - state.suggested_path = download_manager_->GetBrowserContext()->GetPath(). - Append(FILE_PATH_LITERAL("Downloads")); - if (!file_util::PathExists(state.suggested_path)) - file_util::CreateDirectory(state.suggested_path); - } - - state.suggested_path = state.suggested_path.Append(generated_name); + FilePath suggested_path = download_manager_->GetBrowserContext()->GetPath(). + Append(FILE_PATH_LITERAL("Downloads")); + if (!file_util::PathExists(suggested_path)) + file_util::CreateDirectory(suggested_path); + suggested_path = suggested_path.Append(generated_name); BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind( &CefDownloadManagerDelegate::RestartDownload, - this, download_id, state)); + this, download_id, suggested_path)); } void CefDownloadManagerDelegate::RestartDownload( int32 download_id, - DownloadStateInfo state) { + const FilePath& suggested_path) { DownloadItem* download = download_manager_->GetActiveDownloadItem(download_id); if (!download) return; - download->SetFileCheckResults(state); + + // Since we have no download UI, show the user a dialog always. + download->OnTargetPathDetermined(suggested_path, + DownloadItem::TARGET_DISPOSITION_PROMPT, + content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS); download_manager_->RestartDownload(download_id); } diff --git a/libcef/browser/download_manager_delegate.h b/libcef/browser/download_manager_delegate.h index ed2dbae5d..7fa278555 100644 --- a/libcef/browser/download_manager_delegate.h +++ b/libcef/browser/download_manager_delegate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,10 +37,9 @@ class CefDownloadManagerDelegate virtual ~CefDownloadManagerDelegate(); void GenerateFilename(int32 download_id, - DownloadStateInfo state, const FilePath& generated_name); void RestartDownload(int32 download_id, - DownloadStateInfo state); + const FilePath& suggested_path); content::DownloadManager* download_manager_; diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index f908d68ee..1770cf2cc 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -32,20 +32,6 @@ CefContentClient* CefContentClient::Get() { return static_cast(content::GetContentClient()); } -void CefContentClient::SetActiveURL(const GURL& url) { -} - -void CefContentClient::SetGpuInfo(const content::GPUInfo& gpu_info) { -} - -void CefContentClient::AddPepperPlugins( - std::vector* plugins) { -} - -void CefContentClient::AddNPAPIPlugins( - webkit::npapi::PluginList* plugin_list) { -} - void CefContentClient::AddAdditionalSchemes( std::vector* standard_schemes, std::vector* savable_schemes) { @@ -68,15 +54,6 @@ void CefContentClient::AddAdditionalSchemes( } } -bool CefContentClient::HasWebUIScheme(const GURL& url) const { - // There are no WebUI URLs in CEF. - return false; -} - -bool CefContentClient::CanHandleWhileSwappedOut(const IPC::Message& msg) { - return false; -} - std::string CefContentClient::GetUserAgent() const { std::string product_version; @@ -114,21 +91,6 @@ base::StringPiece CefContentClient::GetDataResource( return value; } -#if defined(OS_WIN) -bool CefContentClient::SandboxPlugin(CommandLine* command_line, - sandbox::TargetPolicy* policy) { - return false; -} -#endif - -#if defined(OS_MACOSX) -bool CefContentClient::GetSandboxProfileForSandboxType( - int sandbox_type, - int* sandbox_profile_resource_id) const { - return false; -} -#endif - FilePath CefContentClient::GetPathForResourcePack( const FilePath& pack_path, ui::ScaleFactor scale_factor) { diff --git a/libcef/common/content_client.h b/libcef/common/content_client.h index ffebe84cf..095d81b6d 100644 --- a/libcef/common/content_client.h +++ b/libcef/common/content_client.h @@ -25,34 +25,15 @@ class CefContentClient : public content::ContentClient, static CefContentClient* Get(); // content::ContentClient methods. - virtual void SetActiveURL(const GURL& url) OVERRIDE; - virtual void SetGpuInfo(const content::GPUInfo& gpu_info) OVERRIDE; - virtual void AddPepperPlugins( - std::vector* plugins) OVERRIDE; - virtual void AddNPAPIPlugins( - webkit::npapi::PluginList* plugin_list) OVERRIDE; virtual void AddAdditionalSchemes( std::vector* standard_schemes, std::vector* savable_schemes) OVERRIDE; - virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE; - virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) OVERRIDE; virtual std::string GetUserAgent() const OVERRIDE; virtual string16 GetLocalizedString(int message_id) const OVERRIDE; virtual base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const OVERRIDE; -#if defined(OS_WIN) - virtual bool SandboxPlugin(CommandLine* command_line, - sandbox::TargetPolicy* policy) OVERRIDE; -#endif - -#if defined(OS_MACOSX) - virtual bool GetSandboxProfileForSandboxType( - int sandbox_type, - int* sandbox_profile_resource_id) const OVERRIDE; -#endif - CefRefPtr application() const { return application_; } void set_pack_loading_disabled(bool val) { pack_loading_disabled_ = val; }