Commit ea0e213b authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

Update to Chromium version 70.0.3516.0 (#581409)

parent a659b48f
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/70.0.3507.0',
'chromium_checkout': 'refs/tags/70.0.3516.0',
}
......@@ -59,6 +59,7 @@ namespace cef_subtle {
class RefCountedBase {
public:
bool HasOneRef() const { return ref_count_ == 1; }
bool HasAtLeastOneRef() const { return ref_count_ >= 1; }
protected:
RefCountedBase()
......@@ -109,6 +110,7 @@ class RefCountedBase {
class RefCountedThreadSafeBase {
public:
bool HasOneRef() const;
bool HasAtLeastOneRef() const;
protected:
RefCountedThreadSafeBase();
......
......@@ -69,6 +69,11 @@ typedef struct _cef_base_ref_counted_t {
// Returns true (1) if the current reference count is 1.
///
int(CEF_CALLBACK* has_one_ref)(struct _cef_base_ref_counted_t* self);
///
// Returns true (1) if the current reference count is at least 1.
///
int(CEF_CALLBACK* has_at_least_one_ref)(struct _cef_base_ref_counted_t* self);
} cef_base_ref_counted_t;
///
......
......@@ -68,6 +68,11 @@ class CefBaseRefCounted {
///
virtual bool HasOneRef() const = 0;
///
// Returns true if the reference count is at least 1.
///
virtual bool HasAtLeastOneRef() const = 0;
protected:
virtual ~CefBaseRefCounted() {}
};
......@@ -102,6 +107,13 @@ class CefRefCount {
///
bool HasOneRef() const { return base::AtomicRefCountIsOne(&ref_count_); }
///
// Returns true if the reference count is at least 1.
///
bool HasAtLeastOneRef() const {
return !base::AtomicRefCountIsZero(&ref_count_);
}
private:
mutable base::AtomicRefCount ref_count_;
DISALLOW_COPY_AND_ASSIGN(CefRefCount);
......@@ -122,6 +134,9 @@ class CefRefCount {
return false; \
} \
bool HasOneRef() const OVERRIDE { return ref_count_.HasOneRef(); } \
bool HasAtLeastOneRef() const OVERRIDE { \
return ref_count_.HasAtLeastOneRef(); \
} \
\
private: \
CefRefCount ref_count_;
......
......@@ -2606,7 +2606,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
bool webcam_requested =
(request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE);
bool screen_requested =
(request.video_type == content::MEDIA_DESKTOP_VIDEO_CAPTURE);
(request.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE);
if (microphone_requested || webcam_requested || screen_requested) {
// Pick the desired device or fall back to the first available of the
// given type.
......@@ -2628,8 +2628,9 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
media_id =
content::DesktopMediaID::Parse(request.requested_video_device_id);
}
devices.push_back(content::MediaStreamDevice(
content::MEDIA_DESKTOP_VIDEO_CAPTURE, media_id.ToString(), "Screen"));
devices.push_back(
content::MediaStreamDevice(content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE,
media_id.ToString(), "Screen"));
}
}
......
......@@ -26,7 +26,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task_scheduler/post_task.h"
#include "base/task/post_task.h"
#include "chrome/browser/chrome_browser_main_extra_parts.h"
#include "chrome/browser/plugins/plugin_finder.h"
#include "content/public/browser/gpu_data_manager.h"
......
......@@ -62,26 +62,26 @@ class CefURLFetcherResponseWriter : public net::URLFetcherResponseWriter {
: url_request_(url_request), task_runner_(task_runner) {}
// net::URLFetcherResponseWriter methods.
int Initialize(const net::CompletionCallback& callback) override {
int Initialize(net::CompletionOnceCallback callback) override {
return net::OK;
}
int Write(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback) override {
net::CompletionOnceCallback callback) override {
if (url_request_.get()) {
task_runner_->PostTask(
FROM_HERE,
base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread,
url_request_, scoped_refptr<net::IOBuffer>(buffer),
num_bytes, callback,
num_bytes, base::Passed(std::move(callback)),
CefTaskRunnerImpl::GetCurrentTaskRunner()));
return net::ERR_IO_PENDING;
}
return num_bytes;
}
int Finish(int net_error, const net::CompletionCallback& callback) override {
int Finish(int net_error, net::CompletionOnceCallback callback) override {
if (url_request_.get())
url_request_ = NULL;
return net::OK;
......@@ -92,7 +92,7 @@ class CefURLFetcherResponseWriter : public net::URLFetcherResponseWriter {
CefRefPtr<CefBrowserURLRequest> url_request,
scoped_refptr<net::IOBuffer> buffer,
int num_bytes,
const net::CompletionCallback& callback,
net::CompletionOnceCallback callback,
scoped_refptr<base::SequencedTaskRunner> source_message_loop_proxy) {
CefRefPtr<CefURLRequestClient> client = url_request->GetClient();
if (client.get())
......@@ -101,12 +101,12 @@ class CefURLFetcherResponseWriter : public net::URLFetcherResponseWriter {
source_message_loop_proxy->PostTask(
FROM_HERE,
base::Bind(&CefURLFetcherResponseWriter::ContinueOnSourceThread,
num_bytes, callback));
num_bytes, base::Passed(std::move(callback))));
}
static void ContinueOnSourceThread(int num_bytes,
const net::CompletionCallback& callback) {
callback.Run(num_bytes);
net::CompletionOnceCallback callback) {
std::move(callback).Run(num_bytes);
}
CefRefPtr<CefBrowserURLRequest> url_request_;
......
......@@ -111,7 +111,7 @@ ChromeBrowserProcessStub::system_network_context_manager() {
return NULL;
}
content::NetworkConnectionTracker*
network::NetworkConnectionTracker*
ChromeBrowserProcessStub::network_connection_tracker() {
NOTREACHED();
return NULL;
......
......@@ -49,7 +49,7 @@ class ChromeBrowserProcessStub : public BrowserProcess,
rappor::RapporServiceImpl* rappor_service() override;
IOThread* io_thread() override;
SystemNetworkContextManager* system_network_context_manager() override;
content::NetworkConnectionTracker* network_connection_tracker() override;
network::NetworkConnectionTracker* network_connection_tracker() override;
network::NetworkQualityTracker* network_quality_tracker() override;
WatchDogThread* watchdog_thread() override;
ProfileManager* profile_manager() override;
......
......@@ -1074,15 +1074,16 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
bool is_navigation,
network::mojom::URLLoaderFactoryRequest* factory_request) {
network::mojom::URLLoaderFactoryRequest* factory_request,
scoped_refptr<content::RedirectChecker>* redirect_checker) {
if (!extensions::ExtensionsEnabled())
return false;
auto* web_request_api =
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
browser_context);
return web_request_api->MaybeProxyURLLoaderFactory(frame, is_navigation,
factory_request);
return web_request_api->MaybeProxyURLLoaderFactory(
frame, is_navigation, factory_request, redirect_checker);
}
bool CefContentBrowserClient::HandleExternalProtocol(
......
......@@ -141,7 +141,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
bool is_navigation,
network::mojom::URLLoaderFactoryRequest* factory_request) override;
network::mojom::URLLoaderFactoryRequest* factory_request,
scoped_refptr<content::RedirectChecker>* redirect_checker) override;
bool HandleExternalProtocol(
const GURL& url,
......
......@@ -34,6 +34,7 @@
#include "content/public/common/content_client.h"
#include "content/public/common/url_constants.h"
#include "ipc/ipc_channel.h"
#include "net/base/completion_once_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
......@@ -52,11 +53,11 @@ class ResponseWriter : public net::URLFetcherResponseWriter {
~ResponseWriter() override;
// URLFetcherResponseWriter overrides:
int Initialize(const net::CompletionCallback& callback) override;
int Initialize(net::CompletionOnceCallback callback) override;
int Write(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback) override;
int Finish(int net_error, const net::CompletionCallback& callback) override;
net::CompletionOnceCallback callback) override;
int Finish(int net_error, net::CompletionOnceCallback callback) override;
private:
base::WeakPtr<CefDevToolsFrontend> shell_devtools_;
......@@ -72,13 +73,13 @@ ResponseWriter::ResponseWriter(
ResponseWriter::~ResponseWriter() {}
int ResponseWriter::Initialize(const net::CompletionCallback& callback) {
int ResponseWriter::Initialize(net::CompletionOnceCallback callback) {
return net::OK;
}
int ResponseWriter::Write(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback) {
net::CompletionOnceCallback callback) {
std::string chunk = std::string(buffer->data(), num_bytes);
if (!base::IsStringUTF8(chunk))
return num_bytes;
......@@ -95,7 +96,7 @@ int ResponseWriter::Write(net::IOBuffer* buffer,
}
int ResponseWriter::Finish(int net_error,
const net::CompletionCallback& callback) {
net::CompletionOnceCallback callback) {
return net::OK;
}
......
......@@ -11,7 +11,7 @@
#include "libcef/browser/thread_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task_scheduler/post_task.h"
#include "base/task/post_task.h"
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/profiles/profile.h"
......
......@@ -20,7 +20,7 @@
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
#include "chrome/browser/net/safe_search_util.h"
#include "chrome/common/net/safe_search_util.h"
#include "components/prefs/pref_member.h"
#include "components/prefs/pref_service.h"
#include "content/public/common/content_switches.h"
......@@ -143,7 +143,7 @@ class CefBeforeResourceLoadCallbackImpl : public CefRequestCallback {
// Only execute the callback if the request has not been canceled.
if (request->status().status() != net::URLRequestStatus::CANCELED) {
if (force_google_safesearch && allow && new_url->is_empty())
safe_search_util::ForceGoogleSafeSearch(request, new_url);
safe_search_util::ForceGoogleSafeSearch(request->url(), new_url);
std::move(callback).Run(allow ? net::OK : net::ERR_ABORTED);
}
......@@ -333,7 +333,7 @@ int CefNetworkDelegate::OnBeforeURLRequest(net::URLRequest* request,
}
if (force_google_safesearch && new_url->is_empty())
safe_search_util::ForceGoogleSafeSearch(request, new_url);
safe_search_util::ForceGoogleSafeSearch(request->url(), new_url);
// Continue the request immediately.
return net::OK;
......
......@@ -11,7 +11,7 @@
#include "libcef/common/net/scheme_registration.h"
#include "base/memory/ptr_util.h"
#include "base/task_scheduler/post_task.h"
#include "base/task/post_task.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_constants.h"
#include "net/net_buildflags.h"
......
......@@ -759,12 +759,6 @@ CefRenderWidgetHostViewOSR::CreateBrowserAccessibilityManager(
return NULL;
}
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
void CefRenderWidgetHostViewOSR::ShowDisambiguationPopup(
const gfx::Rect& rect_pixels,
const SkBitmap& zoomed_bitmap) {}
#endif
void CefRenderWidgetHostViewOSR::ImeSetComposition(
const CefString& text,
const std::vector<CefCompositionUnderline>& underlines,
......
......@@ -165,10 +165,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
content::BrowserAccessibilityDelegate* delegate,
bool for_root_frame) override;
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
const SkBitmap& zoomed_bitmap) override;
#endif
void ImeCompositionRangeChanged(
const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) override;
......
......@@ -13,7 +13,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/strings/string_number_conversions.h"
#include "base/task_scheduler/post_task.h"
#include "base/task/post_task.h"
#include "base/values.h"
#include "chrome/browser/accessibility/accessibility_ui.h"
#include "chrome/browser/net/prediction_options.h"
......@@ -87,7 +87,7 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
const base::FilePath& pref_path =
cache_path.AppendASCII(browser_prefs::kUserPrefsFileName);
scoped_refptr<JsonPrefStore> json_pref_store = new JsonPrefStore(
pref_path, sequenced_task_runner, std::unique_ptr<PrefFilter>());
pref_path, std::unique_ptr<PrefFilter>(), sequenced_task_runner);
factory.set_user_prefs(json_pref_store.get());
} else {
scoped_refptr<CefPrefStore> cef_pref_store = new CefPrefStore();
......
......@@ -94,9 +94,12 @@ void CefPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate) {
NotifyInitializationCompleted();
}
void CefPrefStore::CommitPendingWrite(base::OnceClosure done_callback) {
void CefPrefStore::CommitPendingWrite(
base::OnceClosure done_callback,
base::OnceClosure synchronous_done_callback) {
committed_ = true;
PersistentPrefStore::CommitPendingWrite(std::move(done_callback));
PersistentPrefStore::CommitPendingWrite(std::move(done_callback),
std::move(synchronous_done_callback));
}
void CefPrefStore::SchedulePendingLossyWrites() {}
......
......@@ -45,7 +45,9 @@ class CefPrefStore : public PersistentPrefStore {
PrefReadError GetReadError() const override;
PersistentPrefStore::PrefReadError ReadPrefs() override;
void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
virtual void CommitPendingWrite(base::OnceClosure done_callback) override;
virtual void CommitPendingWrite(
base::OnceClosure done_callback,
base::OnceClosure synchronous_done_callback) override;
void SchedulePendingLossyWrites() override;
void ClearMutableValues() override;
void OnStoreDeletionFromDisk() override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment