mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 91.0.4472.0 (#870763)
This commit is contained in:
@@ -461,16 +461,12 @@ void AlloyContentRendererClient::DevToolsAgentDetached() {
|
||||
browser_manager_->DevToolsAgentDetached();
|
||||
}
|
||||
|
||||
std::unique_ptr<content::URLLoaderThrottleProvider>
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider>
|
||||
AlloyContentRendererClient::CreateURLLoaderThrottleProvider(
|
||||
content::URLLoaderThrottleProviderType provider_type) {
|
||||
blink::URLLoaderThrottleProviderType provider_type) {
|
||||
return std::make_unique<CefURLLoaderThrottleProviderImpl>(provider_type);
|
||||
}
|
||||
|
||||
bool AlloyContentRendererClient::RequiresHtmlImports(const GURL& url) {
|
||||
return url.SchemeIs(content::kChromeUIScheme);
|
||||
}
|
||||
|
||||
void AlloyContentRendererClient::GetInterface(
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle interface_pipe) {
|
||||
|
@@ -104,10 +104,9 @@ class AlloyContentRendererClient
|
||||
void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame) override;
|
||||
void DevToolsAgentAttached() override;
|
||||
void DevToolsAgentDetached() override;
|
||||
std::unique_ptr<content::URLLoaderThrottleProvider>
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider>
|
||||
CreateURLLoaderThrottleProvider(
|
||||
content::URLLoaderThrottleProviderType provider_type) override;
|
||||
bool RequiresHtmlImports(const GURL& url) override;
|
||||
blink::URLLoaderThrottleProviderType provider_type) override;
|
||||
|
||||
// service_manager::LocalInterfaceProvider implementation.
|
||||
void GetInterface(const std::string& name,
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
|
||||
CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl(
|
||||
content::URLLoaderThrottleProviderType type)
|
||||
blink::URLLoaderThrottleProviderType type)
|
||||
: type_(type) {
|
||||
DETACH_FROM_THREAD(thread_checker_);
|
||||
}
|
||||
@@ -33,19 +33,19 @@ CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl(
|
||||
DETACH_FROM_THREAD(thread_checker_);
|
||||
}
|
||||
|
||||
std::unique_ptr<content::URLLoaderThrottleProvider>
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider>
|
||||
CefURLLoaderThrottleProviderImpl::Clone() {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
return base::WrapUnique(new CefURLLoaderThrottleProviderImpl(*this));
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
CefURLLoaderThrottleProviderImpl::CreateThrottles(
|
||||
int render_frame_id,
|
||||
const blink::WebURLRequest& request) {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
|
||||
const network::mojom::RequestDestination request_destination =
|
||||
request.GetRequestDestination();
|
||||
@@ -56,9 +56,9 @@ CefURLLoaderThrottleProviderImpl::CreateThrottles(
|
||||
blink::IsRequestDestinationFrame(request_destination);
|
||||
|
||||
DCHECK(!is_frame_resource ||
|
||||
type_ == content::URLLoaderThrottleProviderType::kFrame);
|
||||
type_ == blink::URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
throttles.push_back(std::make_unique<GoogleURLLoaderThrottle>(
|
||||
throttles.emplace_back(std::make_unique<GoogleURLLoaderThrottle>(
|
||||
AlloyRenderThreadObserver::GetDynamicParams()));
|
||||
|
||||
return throttles;
|
||||
|
@@ -9,21 +9,21 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "content/public/renderer/url_loader_throttle_provider.h"
|
||||
#include "third_party/blink/public/platform/url_loader_throttle_provider.h"
|
||||
|
||||
// Instances must be constructed on the render thread, and then used and
|
||||
// destructed on a single thread, which can be different from the render thread.
|
||||
class CefURLLoaderThrottleProviderImpl
|
||||
: public content::URLLoaderThrottleProvider {
|
||||
: public blink::URLLoaderThrottleProvider {
|
||||
public:
|
||||
explicit CefURLLoaderThrottleProviderImpl(
|
||||
content::URLLoaderThrottleProviderType type);
|
||||
blink::URLLoaderThrottleProviderType type);
|
||||
|
||||
~CefURLLoaderThrottleProviderImpl() override;
|
||||
|
||||
// content::URLLoaderThrottleProvider implementation.
|
||||
std::unique_ptr<content::URLLoaderThrottleProvider> Clone() override;
|
||||
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
// blink::URLLoaderThrottleProvider implementation.
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
|
||||
int render_frame_id,
|
||||
const blink::WebURLRequest& request) override;
|
||||
void SetOnline(bool is_online) override;
|
||||
@@ -34,7 +34,7 @@ class CefURLLoaderThrottleProviderImpl
|
||||
CefURLLoaderThrottleProviderImpl(
|
||||
const CefURLLoaderThrottleProviderImpl& other);
|
||||
|
||||
content::URLLoaderThrottleProviderType type_;
|
||||
blink::URLLoaderThrottleProviderType type_;
|
||||
|
||||
THREAD_CHECKER(thread_checker_);
|
||||
|
||||
|
@@ -48,15 +48,13 @@ const int64_t kInvalidFrameId = -1;
|
||||
bool CanGoBack(blink::WebView* view) {
|
||||
if (!view)
|
||||
return false;
|
||||
blink::WebViewImpl* impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
return (impl->Client()->HistoryBackListCount() > 0);
|
||||
return view->HistoryBackListCount() > 0;
|
||||
}
|
||||
|
||||
bool CanGoForward(blink::WebView* view) {
|
||||
if (!view)
|
||||
return false;
|
||||
blink::WebViewImpl* impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
return (impl->Client()->HistoryForwardListCount() > 0);
|
||||
return view->HistoryForwardListCount() > 0;
|
||||
}
|
||||
|
||||
void GoBack(blink::WebView* view) {
|
||||
@@ -65,8 +63,7 @@ void GoBack(blink::WebView* view) {
|
||||
|
||||
blink::WebFrame* main_frame = view->MainFrame();
|
||||
if (main_frame && main_frame->IsWebLocalFrame()) {
|
||||
blink::WebViewImpl* view_impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
if (view_impl->Client()->HistoryBackListCount() > 0) {
|
||||
if (view->HistoryBackListCount() > 0) {
|
||||
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*main_frame);
|
||||
blink::To<blink::LocalFrame>(core_frame)
|
||||
->GetLocalFrameHostRemote()
|
||||
@@ -81,8 +78,7 @@ void GoForward(blink::WebView* view) {
|
||||
|
||||
blink::WebFrame* main_frame = view->MainFrame();
|
||||
if (main_frame && main_frame->IsWebLocalFrame()) {
|
||||
blink::WebViewImpl* view_impl = reinterpret_cast<blink::WebViewImpl*>(view);
|
||||
if (view_impl->Client()->HistoryForwardListCount() > 0) {
|
||||
if (view->HistoryForwardListCount() > 0) {
|
||||
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*main_frame);
|
||||
blink::To<blink::LocalFrame>(core_frame)
|
||||
->GetLocalFrameHostRemote()
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include "libcef/renderer/render_frame_util.h"
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/public/renderer/document_state.h"
|
||||
|
@@ -118,7 +118,7 @@ CefString CefDOMNodeImpl::GetFormControlElementType() {
|
||||
const WebFormControlElement& formElement =
|
||||
node_.ToConst<WebFormControlElement>();
|
||||
|
||||
const base::string16& form_control_type =
|
||||
const std::u16string& form_control_type =
|
||||
formElement.FormControlType().Utf16();
|
||||
str = form_control_type;
|
||||
}
|
||||
@@ -162,14 +162,14 @@ CefString CefDOMNodeImpl::GetValue() {
|
||||
const WebFormControlElement& formElement =
|
||||
node_.ToConst<WebFormControlElement>();
|
||||
|
||||
base::string16 value;
|
||||
const base::string16& form_control_type =
|
||||
std::u16string value;
|
||||
const std::u16string& form_control_type =
|
||||
formElement.FormControlType().Utf16();
|
||||
if (form_control_type == base::ASCIIToUTF16("text")) {
|
||||
if (form_control_type == u"text") {
|
||||
const WebInputElement& input_element =
|
||||
formElement.ToConst<WebInputElement>();
|
||||
value = input_element.Value().Utf16();
|
||||
} else if (form_control_type == base::ASCIIToUTF16("select-one")) {
|
||||
} else if (form_control_type == u"select-one") {
|
||||
const WebSelectElement& select_element =
|
||||
formElement.ToConst<WebSelectElement>();
|
||||
value = select_element.Value().Utf16();
|
||||
@@ -339,8 +339,8 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) {
|
||||
return;
|
||||
|
||||
for (unsigned int i = 0; i < len; ++i) {
|
||||
base::string16 name = element.AttributeLocalName(i).Utf16();
|
||||
base::string16 value = element.AttributeValue(i).Utf16();
|
||||
std::u16string name = element.AttributeLocalName(i).Utf16();
|
||||
std::u16string value = element.AttributeValue(i).Utf16();
|
||||
attrMap.insert(std::make_pair(name, value));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user