mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 939b32ee (#454471)
This commit is contained in:
7
BUILD.gn
7
BUILD.gn
@ -118,7 +118,6 @@ if (is_linux) {
|
|||||||
}
|
}
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
import("//build/config/mac/rules.gni")
|
import("//build/config/mac/rules.gni")
|
||||||
import("//build_overrides/v8.gni")
|
|
||||||
import("//build/mac/tweak_info_plist.gni")
|
import("//build/mac/tweak_info_plist.gni")
|
||||||
import("//build/util/version.gni")
|
import("//build/util/version.gni")
|
||||||
import("//media/cdm/ppapi/cdm_paths.gni")
|
import("//media/cdm/ppapi/cdm_paths.gni")
|
||||||
@ -755,7 +754,7 @@ static_library("libcef_static") {
|
|||||||
|
|
||||||
deps += [
|
deps += [
|
||||||
"//build/linux:fontconfig",
|
"//build/linux:fontconfig",
|
||||||
"//third_party/freetype2",
|
"//build/linux:freetype2",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1025,7 +1024,7 @@ repack("pak_devtools") {
|
|||||||
# Each input pak file should also have a deps line for completeness.
|
# Each input pak file should also have a deps line for completeness.
|
||||||
# Add associated .h files in the make_pack_header("resources") target.
|
# Add associated .h files in the make_pack_header("resources") target.
|
||||||
sources = [
|
sources = [
|
||||||
"$root_gen_dir/blink/devtools_resources.pak",
|
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Use public_deps so that generated grit headers are discoverable from
|
# Use public_deps so that generated grit headers are discoverable from
|
||||||
@ -1163,7 +1162,6 @@ template("make_pack_header") {
|
|||||||
make_pack_header("resources") {
|
make_pack_header("resources") {
|
||||||
header = "$root_out_dir/includes/include/cef_pack_resources.h"
|
header = "$root_out_dir/includes/include/cef_pack_resources.h"
|
||||||
inputs = [
|
inputs = [
|
||||||
"$root_gen_dir/blink/grit/devtools_resources.h",
|
|
||||||
"$root_gen_dir/blink/public/resources/grit/blink_image_resources.h",
|
"$root_gen_dir/blink/public/resources/grit/blink_image_resources.h",
|
||||||
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
||||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||||
@ -1173,6 +1171,7 @@ make_pack_header("resources") {
|
|||||||
"$root_gen_dir/chrome/grit/net_internals_resources.h",
|
"$root_gen_dir/chrome/grit/net_internals_resources.h",
|
||||||
"$root_gen_dir/chrome/grit/renderer_resources.h",
|
"$root_gen_dir/chrome/grit/renderer_resources.h",
|
||||||
"$root_gen_dir/components/grit/components_resources.h",
|
"$root_gen_dir/components/grit/components_resources.h",
|
||||||
|
"$root_gen_dir/content/browser/devtools/grit/devtools_resources.h",
|
||||||
"$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
|
"$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
|
||||||
"$root_gen_dir/content/grit/content_resources.h",
|
"$root_gen_dir/content/grit/content_resources.h",
|
||||||
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
|
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||||
|
|
||||||
{
|
{
|
||||||
'chromium_checkout': 'ad51088c0e8776e8dcd963dbe752c4035ba6dab6',
|
'chromium_checkout': '939b32ee5ba05c396eef3fd992822fcca9a2e262',
|
||||||
}
|
}
|
||||||
|
@ -70,15 +70,16 @@ typedef struct _cef_load_handler_t {
|
|||||||
int canGoForward);
|
int canGoForward);
|
||||||
|
|
||||||
///
|
///
|
||||||
// Called when the browser begins loading a frame. The |frame| value will
|
// Called after a navigation has been committed and before the browser begins
|
||||||
// never be NULL -- call the is_main() function to check if this frame is the
|
// loading contents in the frame. The |frame| value will never be NULL -- call
|
||||||
// main frame. |transition_type| provides information about the source of the
|
// the is_main() function to check if this frame is the main frame.
|
||||||
// navigation and an accurate value is only available in the browser process.
|
// |transition_type| provides information about the source of the navigation
|
||||||
// Multiple frames may be loading at the same time. Sub-frames may start or
|
// and an accurate value is only available in the browser process. Multiple
|
||||||
// continue loading after the main frame load has ended. This function will
|
// frames may be loading at the same time. Sub-frames may start or continue
|
||||||
// always be called for all frames irrespective of whether the request
|
// loading after the main frame load has ended. This function will not be
|
||||||
// completes successfully. For notification of overall browser load status use
|
// called for same page navigations (fragments, history state, etc.) or for
|
||||||
// OnLoadingStateChange instead.
|
// navigations that fail or are canceled before commit. For notification of
|
||||||
|
// overall browser load status use OnLoadingStateChange instead.
|
||||||
///
|
///
|
||||||
void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,
|
void (CEF_CALLBACK *on_load_start)(struct _cef_load_handler_t* self,
|
||||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||||
@ -89,19 +90,21 @@ typedef struct _cef_load_handler_t {
|
|||||||
// never be NULL -- call the is_main() function to check if this frame is the
|
// never be NULL -- call the is_main() function to check if this frame is the
|
||||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||||
// start or continue loading after the main frame load has ended. This
|
// start or continue loading after the main frame load has ended. This
|
||||||
// function will always be called for all frames irrespective of whether the
|
// function will not be called for same page navigations (fragments, history
|
||||||
// request completes successfully. For notification of overall browser load
|
// state, etc.) or for navigations that fail or are canceled before commit.
|
||||||
// status use OnLoadingStateChange instead.
|
// For notification of overall browser load status use OnLoadingStateChange
|
||||||
|
// instead.
|
||||||
///
|
///
|
||||||
void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self,
|
void (CEF_CALLBACK *on_load_end)(struct _cef_load_handler_t* self,
|
||||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||||
int httpStatusCode);
|
int httpStatusCode);
|
||||||
|
|
||||||
///
|
///
|
||||||
// Called when the resource load for a navigation fails or is canceled.
|
// Called when a navigation fails or is canceled. This function may be called
|
||||||
// |errorCode| is the error code number, |errorText| is the error text and
|
// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
|
||||||
// |failedUrl| is the URL that failed to load. See net\base\net_error_list.h
|
// after commit. |errorCode| is the error code number, |errorText| is the
|
||||||
// for complete descriptions of the error codes.
|
// error text and |failedUrl| is the URL that failed to load. See
|
||||||
|
// net\base\net_error_list.h for complete descriptions of the error codes.
|
||||||
///
|
///
|
||||||
void (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self,
|
void (CEF_CALLBACK *on_load_error)(struct _cef_load_handler_t* self,
|
||||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||||
|
@ -108,9 +108,12 @@ typedef struct _cef_scheme_registrar_t {
|
|||||||
// security rules as those applied to "https" URLs. For example, loading this
|
// security rules as those applied to "https" URLs. For example, loading this
|
||||||
// scheme from other secure schemes will not trigger mixed content warnings.
|
// scheme from other secure schemes will not trigger mixed content warnings.
|
||||||
//
|
//
|
||||||
// If |is_cors_enabled| is true (1) the scheme that can be sent CORS requests.
|
// If |is_cors_enabled| is true (1) the scheme can be sent CORS requests. This
|
||||||
// This value should be true (1) in most cases where |is_standard| is true
|
// value should be true (1) in most cases where |is_standard| is true (1).
|
||||||
// (1).
|
//
|
||||||
|
// If |is_csp_bypassing| is true (1) the scheme can bypass Content-Security-
|
||||||
|
// Policy (CSP) checks. This value should be false (0) in most cases where
|
||||||
|
// |is_standard| is true (1).
|
||||||
//
|
//
|
||||||
// This function may be called on any thread. It should only be called once
|
// This function may be called on any thread. It should only be called once
|
||||||
// per unique |scheme_name| value. If |scheme_name| is already registered or
|
// per unique |scheme_name| value. If |scheme_name| is already registered or
|
||||||
@ -118,7 +121,8 @@ typedef struct _cef_scheme_registrar_t {
|
|||||||
///
|
///
|
||||||
int (CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t* self,
|
int (CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t* self,
|
||||||
const cef_string_t* scheme_name, int is_standard, int is_local,
|
const cef_string_t* scheme_name, int is_standard, int is_local,
|
||||||
int is_display_isolated, int is_secure, int is_cors_enabled);
|
int is_display_isolated, int is_secure, int is_cors_enabled,
|
||||||
|
int is_csp_bypassing);
|
||||||
} cef_scheme_registrar_t;
|
} cef_scheme_registrar_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,15 +67,16 @@ class CefLoadHandler : public virtual CefBaseRefCounted {
|
|||||||
bool canGoForward) {}
|
bool canGoForward) {}
|
||||||
|
|
||||||
///
|
///
|
||||||
// Called when the browser begins loading a frame. The |frame| value will
|
// Called after a navigation has been committed and before the browser begins
|
||||||
// never be empty -- call the IsMain() method to check if this frame is the
|
// loading contents in the frame. The |frame| value will never be empty --
|
||||||
// main frame. |transition_type| provides information about the source of the
|
// call the IsMain() method to check if this frame is the main frame.
|
||||||
// navigation and an accurate value is only available in the browser process.
|
// |transition_type| provides information about the source of the navigation
|
||||||
// Multiple frames may be loading at the same time. Sub-frames may start or
|
// and an accurate value is only available in the browser process. Multiple
|
||||||
// continue loading after the main frame load has ended. This method will
|
// frames may be loading at the same time. Sub-frames may start or continue
|
||||||
// always be called for all frames irrespective of whether the request
|
// loading after the main frame load has ended. This method will not be called
|
||||||
// completes successfully. For notification of overall browser load status use
|
// for same page navigations (fragments, history state, etc.) or for
|
||||||
// OnLoadingStateChange instead.
|
// navigations that fail or are canceled before commit. For notification of
|
||||||
|
// overall browser load status use OnLoadingStateChange instead.
|
||||||
///
|
///
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
|
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
|
||||||
@ -87,9 +88,10 @@ class CefLoadHandler : public virtual CefBaseRefCounted {
|
|||||||
// never be empty -- call the IsMain() method to check if this frame is the
|
// never be empty -- call the IsMain() method to check if this frame is the
|
||||||
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
// main frame. Multiple frames may be loading at the same time. Sub-frames may
|
||||||
// start or continue loading after the main frame load has ended. This method
|
// start or continue loading after the main frame load has ended. This method
|
||||||
// will always be called for all frames irrespective of whether the request
|
// will not be called for same page navigations (fragments, history state,
|
||||||
// completes successfully. For notification of overall browser load status use
|
// etc.) or for navigations that fail or are canceled before commit. For
|
||||||
// OnLoadingStateChange instead.
|
// notification of overall browser load status use OnLoadingStateChange
|
||||||
|
// instead.
|
||||||
///
|
///
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
|
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
|
||||||
@ -97,10 +99,11 @@ class CefLoadHandler : public virtual CefBaseRefCounted {
|
|||||||
int httpStatusCode) {}
|
int httpStatusCode) {}
|
||||||
|
|
||||||
///
|
///
|
||||||
// Called when the resource load for a navigation fails or is canceled.
|
// Called when a navigation fails or is canceled. This method may be called
|
||||||
// |errorCode| is the error code number, |errorText| is the error text and
|
// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
|
||||||
// |failedUrl| is the URL that failed to load. See net\base\net_error_list.h
|
// after commit. |errorCode| is the error code number, |errorText| is the
|
||||||
// for complete descriptions of the error codes.
|
// error text and |failedUrl| is the URL that failed to load.
|
||||||
|
// See net\base\net_error_list.h for complete descriptions of the error codes.
|
||||||
///
|
///
|
||||||
/*--cef(optional_param=errorText)--*/
|
/*--cef(optional_param=errorText)--*/
|
||||||
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
|
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
|
||||||
|
@ -132,8 +132,12 @@ class CefSchemeRegistrar : public CefBaseScoped {
|
|||||||
// rules as those applied to "https" URLs. For example, loading this scheme
|
// rules as those applied to "https" URLs. For example, loading this scheme
|
||||||
// from other secure schemes will not trigger mixed content warnings.
|
// from other secure schemes will not trigger mixed content warnings.
|
||||||
//
|
//
|
||||||
// If |is_cors_enabled| is true the scheme that can be sent CORS requests.
|
// If |is_cors_enabled| is true the scheme can be sent CORS requests. This
|
||||||
// This value should be true in most cases where |is_standard| is true.
|
// value should be true in most cases where |is_standard| is true.
|
||||||
|
//
|
||||||
|
// If |is_csp_bypassing| is true the scheme can bypass Content-Security-Policy
|
||||||
|
// (CSP) checks. This value should be false in most cases where |is_standard|
|
||||||
|
// is true.
|
||||||
//
|
//
|
||||||
// This function may be called on any thread. It should only be called once
|
// This function may be called on any thread. It should only be called once
|
||||||
// per unique |scheme_name| value. If |scheme_name| is already registered or
|
// per unique |scheme_name| value. If |scheme_name| is already registered or
|
||||||
@ -145,7 +149,8 @@ class CefSchemeRegistrar : public CefBaseScoped {
|
|||||||
bool is_local,
|
bool is_local,
|
||||||
bool is_display_isolated,
|
bool is_display_isolated,
|
||||||
bool is_secure,
|
bool is_secure,
|
||||||
bool is_cors_enabled) =0;
|
bool is_cors_enabled,
|
||||||
|
bool is_csp_bypassing) =0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1947,7 +1947,6 @@ typedef struct _cef_popup_features_t {
|
|||||||
|
|
||||||
int fullscreen;
|
int fullscreen;
|
||||||
int dialog;
|
int dialog;
|
||||||
cef_string_list_t additionalFeatures;
|
|
||||||
} cef_popup_features_t;
|
} cef_popup_features_t;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -509,18 +509,10 @@ struct CefPopupFeaturesTraits {
|
|||||||
s->resizable = true;
|
s->resizable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void clear(struct_type* s) {
|
static inline void clear(struct_type* s) {}
|
||||||
if (s->additionalFeatures)
|
|
||||||
cef_string_list_free(s->additionalFeatures);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void set(const struct_type* src, struct_type* target,
|
static inline void set(const struct_type* src, struct_type* target,
|
||||||
bool copy) {
|
bool copy) {
|
||||||
if (target->additionalFeatures)
|
|
||||||
cef_string_list_free(target->additionalFeatures);
|
|
||||||
target->additionalFeatures = src->additionalFeatures ?
|
|
||||||
cef_string_list_copy(src->additionalFeatures) : NULL;
|
|
||||||
|
|
||||||
target->x = src->x;
|
target->x = src->x;
|
||||||
target->xSet = src->xSet;
|
target->xSet = src->xSet;
|
||||||
target->y = src->y;
|
target->y = src->y;
|
||||||
|
@ -98,6 +98,14 @@ void CefBrowserContextProxy::SetUserData(const void* key, Data* data) {
|
|||||||
BrowserContext::SetUserData(key, data);
|
BrowserContext::SetUserData(key, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefBrowserContextProxy::SetUserData(const void* key,
|
||||||
|
std::unique_ptr<Data> data) {
|
||||||
|
if (ShouldProxyUserData(key))
|
||||||
|
parent_->SetUserData(key, std::move(data));
|
||||||
|
else
|
||||||
|
BrowserContext::SetUserData(key, std::move(data));
|
||||||
|
}
|
||||||
|
|
||||||
void CefBrowserContextProxy::RemoveUserData(const void* key) {
|
void CefBrowserContextProxy::RemoveUserData(const void* key) {
|
||||||
if (ShouldProxyUserData(key))
|
if (ShouldProxyUserData(key))
|
||||||
parent_->RemoveUserData(key);
|
parent_->RemoveUserData(key);
|
||||||
|
@ -29,6 +29,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
|||||||
// SupportsUserData methods.
|
// SupportsUserData methods.
|
||||||
Data* GetUserData(const void* key) const override;
|
Data* GetUserData(const void* key) const override;
|
||||||
void SetUserData(const void* key, Data* data) override;
|
void SetUserData(const void* key, Data* data) override;
|
||||||
|
void SetUserData(const void* key, std::unique_ptr<Data> data) override;
|
||||||
void RemoveUserData(const void* key) override;
|
void RemoveUserData(const void* key) override;
|
||||||
|
|
||||||
// BrowserContext methods.
|
// BrowserContext methods.
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "content/public/browser/navigation_controller.h"
|
#include "content/public/browser/navigation_controller.h"
|
||||||
#include "content/public/browser/navigation_entry.h"
|
#include "content/public/browser/navigation_entry.h"
|
||||||
|
#include "content/public/browser/navigation_handle.h"
|
||||||
#include "content/public/browser/notification_details.h"
|
#include "content/public/browser/notification_details.h"
|
||||||
#include "content/public/browser/notification_source.h"
|
#include "content/public/browser/notification_source.h"
|
||||||
#include "content/public/browser/notification_types.h"
|
#include "content/public/browser/notification_types.h"
|
||||||
@ -61,6 +62,7 @@
|
|||||||
#include "content/public/browser/render_view_host.h"
|
#include "content/public/browser/render_view_host.h"
|
||||||
#include "content/public/browser/render_widget_host.h"
|
#include "content/public/browser/render_widget_host.h"
|
||||||
#include "content/public/browser/resource_request_info.h"
|
#include "content/public/browser/resource_request_info.h"
|
||||||
|
#include "net/base/net_errors.h"
|
||||||
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
||||||
#include "ui/events/base_event_utils.h"
|
#include "ui/events/base_event_utils.h"
|
||||||
|
|
||||||
@ -2499,36 +2501,50 @@ void CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::DidCommitProvisionalLoadForFrame(
|
void CefBrowserHostImpl::DidFinishNavigation(
|
||||||
content::RenderFrameHost* render_frame_host,
|
content::NavigationHandle* navigation_handle) {
|
||||||
const GURL& url,
|
CHECK(navigation_handle->GetRenderFrameHost());
|
||||||
ui::PageTransition transition_type) {
|
|
||||||
const bool is_main_frame = !render_frame_host->GetParent();
|
|
||||||
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
|
||||||
render_frame_host->GetRoutingID(),
|
|
||||||
CefFrameHostImpl::kUnspecifiedFrameId,
|
|
||||||
is_main_frame,
|
|
||||||
base::string16(),
|
|
||||||
url);
|
|
||||||
OnLoadStart(frame, url, transition_type);
|
|
||||||
if (is_main_frame)
|
|
||||||
OnAddressChange(frame, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefBrowserHostImpl::DidFailProvisionalLoad(
|
const net::Error error_code = navigation_handle->GetNetErrorCode();
|
||||||
content::RenderFrameHost* render_frame_host,
|
if (error_code == net::OK) {
|
||||||
const GURL& validated_url,
|
// The navigation has been committed.
|
||||||
int error_code,
|
const bool is_main_frame = navigation_handle->IsInMainFrame();
|
||||||
const base::string16& error_description,
|
const GURL& url = navigation_handle->GetURL();
|
||||||
bool was_ignored_by_handler) {
|
|
||||||
const bool is_main_frame = !render_frame_host->GetParent();
|
// This also updates the URL associated with the frame.
|
||||||
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
||||||
render_frame_host->GetRoutingID(),
|
navigation_handle->GetRenderFrameHost()->GetRoutingID(),
|
||||||
CefFrameHostImpl::kUnspecifiedFrameId,
|
CefFrameHostImpl::kUnspecifiedFrameId,
|
||||||
is_main_frame,
|
is_main_frame, base::string16(), url);
|
||||||
base::string16(),
|
|
||||||
GURL());
|
// Don't call OnLoadStart for same page navigations (fragments,
|
||||||
OnLoadError(frame, validated_url, error_code, error_description);
|
// history state).
|
||||||
|
if (!navigation_handle->IsSamePage())
|
||||||
|
OnLoadStart(frame, navigation_handle->GetPageTransition());
|
||||||
|
|
||||||
|
if (is_main_frame)
|
||||||
|
OnAddressChange(frame, url);
|
||||||
|
} else {
|
||||||
|
// The navigation failed before commit. Originates from
|
||||||
|
// RenderFrameHostImpl::OnDidFailProvisionalLoadWithError.
|
||||||
|
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
||||||
|
navigation_handle->GetRenderFrameHost()->GetRoutingID(),
|
||||||
|
CefFrameHostImpl::kUnspecifiedFrameId,
|
||||||
|
navigation_handle->IsInMainFrame(), base::string16(), GURL());
|
||||||
|
|
||||||
|
// OnLoadStart/OnLoadEnd will not be called.
|
||||||
|
OnLoadError(frame, navigation_handle->GetURL(), error_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!web_contents())
|
||||||
|
return;
|
||||||
|
|
||||||
|
CefBrowserContext* context =
|
||||||
|
static_cast<CefBrowserContext*>(web_contents()->GetBrowserContext());
|
||||||
|
if (!context)
|
||||||
|
return;
|
||||||
|
|
||||||
|
context->AddVisitedURLs(navigation_handle->GetRedirectChain());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::DocumentAvailableInMainFrame() {
|
void CefBrowserHostImpl::DocumentAvailableInMainFrame() {
|
||||||
@ -2542,6 +2558,8 @@ void CefBrowserHostImpl::DidFailLoad(
|
|||||||
int error_code,
|
int error_code,
|
||||||
const base::string16& error_description,
|
const base::string16& error_description,
|
||||||
bool was_ignored_by_handler) {
|
bool was_ignored_by_handler) {
|
||||||
|
// The navigation failed after commit. OnLoadStart was called so we also call
|
||||||
|
// OnLoadEnd.
|
||||||
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(),
|
||||||
@ -2549,7 +2567,7 @@ void CefBrowserHostImpl::DidFailLoad(
|
|||||||
is_main_frame,
|
is_main_frame,
|
||||||
base::string16(),
|
base::string16(),
|
||||||
validated_url);
|
validated_url);
|
||||||
OnLoadError(frame, validated_url, error_code, error_description);
|
OnLoadError(frame, validated_url, error_code);
|
||||||
OnLoadEnd(frame, validated_url, error_code);
|
OnLoadEnd(frame, validated_url, error_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2570,21 +2588,6 @@ void CefBrowserHostImpl::FrameDeleted(
|
|||||||
focused_frame_id_ = CefFrameHostImpl::kInvalidFrameId;
|
focused_frame_id_ = CefFrameHostImpl::kInvalidFrameId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::DidNavigateAnyFrame(
|
|
||||||
content::RenderFrameHost* render_frame_host,
|
|
||||||
const content::LoadCommittedDetails& details,
|
|
||||||
const content::FrameNavigateParams& params) {
|
|
||||||
if (!web_contents())
|
|
||||||
return;
|
|
||||||
|
|
||||||
CefBrowserContext* context =
|
|
||||||
static_cast<CefBrowserContext*>(web_contents()->GetBrowserContext());
|
|
||||||
if (!context)
|
|
||||||
return;
|
|
||||||
|
|
||||||
context->AddVisitedURLs(params.redirects);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefBrowserHostImpl::TitleWasSet(content::NavigationEntry* entry,
|
void CefBrowserHostImpl::TitleWasSet(content::NavigationEntry* entry,
|
||||||
bool explicit_set) {
|
bool explicit_set) {
|
||||||
// |entry| may be NULL if a popup is created via window.open and never
|
// |entry| may be NULL if a popup is created via window.open and never
|
||||||
@ -3034,7 +3037,6 @@ void CefBrowserHostImpl::OnAddressChange(CefRefPtr<CefFrame> frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::OnLoadStart(CefRefPtr<CefFrame> frame,
|
void CefBrowserHostImpl::OnLoadStart(CefRefPtr<CefFrame> frame,
|
||||||
const GURL& url,
|
|
||||||
ui::PageTransition transition_type) {
|
ui::PageTransition transition_type) {
|
||||||
if (client_.get()) {
|
if (client_.get()) {
|
||||||
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
|
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
|
||||||
@ -3048,8 +3050,7 @@ void CefBrowserHostImpl::OnLoadStart(CefRefPtr<CefFrame> frame,
|
|||||||
|
|
||||||
void CefBrowserHostImpl::OnLoadError(CefRefPtr<CefFrame> frame,
|
void CefBrowserHostImpl::OnLoadError(CefRefPtr<CefFrame> frame,
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
int error_code,
|
int error_code) {
|
||||||
const base::string16& error_description) {
|
|
||||||
if (client_.get()) {
|
if (client_.get()) {
|
||||||
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
|
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
|
||||||
if (handler.get()) {
|
if (handler.get()) {
|
||||||
@ -3057,7 +3058,7 @@ void CefBrowserHostImpl::OnLoadError(CefRefPtr<CefFrame> frame,
|
|||||||
// 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),
|
net::ErrorToShortString(error_code),
|
||||||
url.spec());
|
url.spec());
|
||||||
frame_destruction_pending_ = false;
|
frame_destruction_pending_ = false;
|
||||||
}
|
}
|
||||||
|
@ -448,38 +448,21 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
|||||||
// content::WebContentsObserver methods.
|
// content::WebContentsObserver methods.
|
||||||
using content::WebContentsObserver::BeforeUnloadFired;
|
using content::WebContentsObserver::BeforeUnloadFired;
|
||||||
using content::WebContentsObserver::WasHidden;
|
using content::WebContentsObserver::WasHidden;
|
||||||
void RenderFrameCreated(
|
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
||||||
content::RenderFrameHost* render_frame_host) override;
|
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||||
void RenderFrameDeleted(
|
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
|
||||||
content::RenderFrameHost* render_frame_host) override;
|
void RenderViewDeleted(content::RenderViewHost* render_view_host) override;
|
||||||
void RenderViewCreated(
|
|
||||||
content::RenderViewHost* render_view_host) override;
|
|
||||||
void RenderViewDeleted(
|
|
||||||
content::RenderViewHost* render_view_host) override;
|
|
||||||
void RenderViewReady() override;
|
void RenderViewReady() override;
|
||||||
void RenderProcessGone(base::TerminationStatus status) override;
|
void RenderProcessGone(base::TerminationStatus status) override;
|
||||||
void DidCommitProvisionalLoadForFrame(
|
void DidFinishNavigation(
|
||||||
content::RenderFrameHost* render_frame_host,
|
content::NavigationHandle* navigation_handle) override;
|
||||||
const GURL& url,
|
|
||||||
ui::PageTransition transition_type) override;
|
|
||||||
void DidFailProvisionalLoad(
|
|
||||||
content::RenderFrameHost* render_frame_host,
|
|
||||||
const GURL& validated_url,
|
|
||||||
int error_code,
|
|
||||||
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,
|
const base::string16& error_description,
|
||||||
bool was_ignored_by_handler) override;
|
bool was_ignored_by_handler) override;
|
||||||
void FrameDeleted(
|
void FrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||||
content::RenderFrameHost* render_frame_host) override;
|
|
||||||
void DidNavigateAnyFrame(
|
|
||||||
content::RenderFrameHost* render_frame_host,
|
|
||||||
const content::LoadCommittedDetails& details,
|
|
||||||
const content::FrameNavigateParams& params) override;
|
|
||||||
void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
|
void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
|
||||||
void PluginCrashed(const base::FilePath& plugin_path,
|
void PluginCrashed(const base::FilePath& plugin_path,
|
||||||
base::ProcessId plugin_pid) override;
|
base::ProcessId plugin_pid) override;
|
||||||
@ -554,12 +537,10 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
|||||||
void OnAddressChange(CefRefPtr<CefFrame> frame,
|
void OnAddressChange(CefRefPtr<CefFrame> frame,
|
||||||
const GURL& url);
|
const GURL& url);
|
||||||
void OnLoadStart(CefRefPtr<CefFrame> frame,
|
void OnLoadStart(CefRefPtr<CefFrame> frame,
|
||||||
const GURL& url,
|
|
||||||
ui::PageTransition transition_type);
|
ui::PageTransition transition_type);
|
||||||
void OnLoadError(CefRefPtr<CefFrame> frame,
|
void OnLoadError(CefRefPtr<CefFrame> frame,
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
int error_code,
|
int error_code);
|
||||||
const base::string16& error_description);
|
|
||||||
void OnLoadEnd(CefRefPtr<CefFrame> frame,
|
void OnLoadEnd(CefRefPtr<CefFrame> frame,
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
int http_status_code);
|
int http_status_code);
|
||||||
|
@ -23,35 +23,26 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void TranslatePopupFeatures(const blink::WebWindowFeatures& webKitFeatures,
|
void TranslatePopupFeatures(const blink::mojom::WindowFeatures& webKitFeatures,
|
||||||
CefPopupFeatures& features) {
|
CefPopupFeatures& features) {
|
||||||
features.x = static_cast<int>(webKitFeatures.x);
|
features.x = static_cast<int>(webKitFeatures.x);
|
||||||
features.xSet = webKitFeatures.xSet;
|
features.xSet = webKitFeatures.has_x;
|
||||||
features.y = static_cast<int>(webKitFeatures.y);
|
features.y = static_cast<int>(webKitFeatures.y);
|
||||||
features.ySet = webKitFeatures.ySet;
|
features.ySet = webKitFeatures.has_y;
|
||||||
features.width = static_cast<int>(webKitFeatures.width);
|
features.width = static_cast<int>(webKitFeatures.width);
|
||||||
features.widthSet = webKitFeatures.widthSet;
|
features.widthSet = webKitFeatures.has_width;
|
||||||
features.height = static_cast<int>(webKitFeatures.height);
|
features.height = static_cast<int>(webKitFeatures.height);
|
||||||
features.heightSet = webKitFeatures.heightSet;
|
features.heightSet = webKitFeatures.has_height;
|
||||||
|
|
||||||
features.menuBarVisible = webKitFeatures.menuBarVisible;
|
features.menuBarVisible = webKitFeatures.menu_bar_visible;
|
||||||
features.statusBarVisible = webKitFeatures.statusBarVisible;
|
features.statusBarVisible = webKitFeatures.status_bar_visible;
|
||||||
features.toolBarVisible = webKitFeatures.toolBarVisible;
|
features.toolBarVisible = webKitFeatures.tool_bar_visible;
|
||||||
features.locationBarVisible = webKitFeatures.locationBarVisible;
|
features.locationBarVisible = webKitFeatures.location_bar_visible;
|
||||||
features.scrollbarsVisible = webKitFeatures.scrollbarsVisible;
|
features.scrollbarsVisible = webKitFeatures.scrollbars_visible;
|
||||||
features.resizable = webKitFeatures.resizable;
|
features.resizable = webKitFeatures.resizable;
|
||||||
|
|
||||||
features.fullscreen = webKitFeatures.fullscreen;
|
features.fullscreen = webKitFeatures.fullscreen;
|
||||||
features.dialog = webKitFeatures.dialog;
|
features.dialog = webKitFeatures.dialog;
|
||||||
features.additionalFeatures = NULL;
|
|
||||||
if (webKitFeatures.additionalFeatures.size() > 0)
|
|
||||||
features.additionalFeatures = cef_string_list_alloc();
|
|
||||||
|
|
||||||
CefString str;
|
|
||||||
for (unsigned int i = 0; i < webKitFeatures.additionalFeatures.size(); ++i) {
|
|
||||||
str = base::string16(webKitFeatures.additionalFeatures[i]);
|
|
||||||
cef_string_list_append(features.additionalFeatures, str.GetStruct());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CefBrowserInfoManager* g_info_manager = nullptr;
|
CefBrowserInfoManager* g_info_manager = nullptr;
|
||||||
@ -142,7 +133,7 @@ bool CefBrowserInfoManager::CanCreateWindow(
|
|||||||
const content::Referrer& referrer,
|
const content::Referrer& referrer,
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
WindowOpenDisposition disposition,
|
WindowOpenDisposition disposition,
|
||||||
const blink::WebWindowFeatures& features,
|
const blink::mojom::WindowFeatures& features,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
bool opener_suppressed,
|
bool opener_suppressed,
|
||||||
int opener_render_process_id,
|
int opener_render_process_id,
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "base/memory/scoped_vector.h"
|
#include "base/memory/scoped_vector.h"
|
||||||
#include "base/synchronization/lock.h"
|
#include "base/synchronization/lock.h"
|
||||||
#include "content/public/browser/render_process_host_observer.h"
|
#include "content/public/browser/render_process_host_observer.h"
|
||||||
|
#include "third_party/WebKit/public/web/window_features.mojom.h"
|
||||||
#include "ui/base/window_open_disposition.h"
|
#include "ui/base/window_open_disposition.h"
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
|
|
||||||
@ -64,7 +65,7 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
|
|||||||
const content::Referrer& referrer,
|
const content::Referrer& referrer,
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
WindowOpenDisposition disposition,
|
WindowOpenDisposition disposition,
|
||||||
const blink::WebWindowFeatures& features,
|
const blink::mojom::WindowFeatures& features,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
bool opener_suppressed,
|
bool opener_suppressed,
|
||||||
int opener_render_process_id,
|
int opener_render_process_id,
|
||||||
|
@ -112,6 +112,11 @@ WatchDogThread* ChromeBrowserProcessStub::watchdog_thread() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ukm::UkmService* ChromeBrowserProcessStub::ukm_service() {
|
||||||
|
NOTREACHED();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ProfileManager* ChromeBrowserProcessStub::profile_manager() {
|
ProfileManager* ChromeBrowserProcessStub::profile_manager() {
|
||||||
DCHECK(context_initialized_);
|
DCHECK(context_initialized_);
|
||||||
return profile_manager_.get();
|
return profile_manager_.get();
|
||||||
|
@ -47,6 +47,7 @@ class ChromeBrowserProcessStub : public BrowserProcess,
|
|||||||
rappor::RapporServiceImpl* rappor_service() override;
|
rappor::RapporServiceImpl* rappor_service() override;
|
||||||
IOThread* io_thread() override;
|
IOThread* io_thread() override;
|
||||||
WatchDogThread* watchdog_thread() override;
|
WatchDogThread* watchdog_thread() override;
|
||||||
|
ukm::UkmService* ukm_service() override;
|
||||||
ProfileManager* profile_manager() override;
|
ProfileManager* profile_manager() override;
|
||||||
PrefService* local_state() override;
|
PrefService* local_state() override;
|
||||||
net::URLRequestContextGetter* system_request_context() override;
|
net::URLRequestContextGetter* system_request_context() override;
|
||||||
|
@ -829,12 +829,12 @@ bool CefContentBrowserClient::CanCreateWindow(
|
|||||||
const GURL& opener_url,
|
const GURL& opener_url,
|
||||||
const GURL& opener_top_level_frame_url,
|
const GURL& opener_top_level_frame_url,
|
||||||
const GURL& source_origin,
|
const GURL& source_origin,
|
||||||
WindowContainerType container_type,
|
content::mojom::WindowContainerType container_type,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
const content::Referrer& referrer,
|
const content::Referrer& referrer,
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
WindowOpenDisposition disposition,
|
WindowOpenDisposition disposition,
|
||||||
const blink::WebWindowFeatures& features,
|
const blink::mojom::WindowFeatures& features,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
bool opener_suppressed,
|
bool opener_suppressed,
|
||||||
content::ResourceContext* context,
|
content::ResourceContext* context,
|
||||||
|
@ -79,12 +79,12 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
const GURL& opener_url,
|
const GURL& opener_url,
|
||||||
const GURL& opener_top_level_frame_url,
|
const GURL& opener_top_level_frame_url,
|
||||||
const GURL& source_origin,
|
const GURL& source_origin,
|
||||||
WindowContainerType container_type,
|
content::mojom::WindowContainerType container_type,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
const content::Referrer& referrer,
|
const content::Referrer& referrer,
|
||||||
const std::string& frame_name,
|
const std::string& frame_name,
|
||||||
WindowOpenDisposition disposition,
|
WindowOpenDisposition disposition,
|
||||||
const blink::WebWindowFeatures& features,
|
const blink::mojom::WindowFeatures& features,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
bool opener_suppressed,
|
bool opener_suppressed,
|
||||||
content::ResourceContext* context,
|
content::ResourceContext* context,
|
||||||
|
@ -587,7 +587,6 @@ void CefCookieManagerImpl::SetCookieInternal(
|
|||||||
cookie.secure ? true : false,
|
cookie.secure ? true : false,
|
||||||
cookie.httponly ? true : false,
|
cookie.httponly ? true : false,
|
||||||
net::CookieSameSite::DEFAULT_MODE,
|
net::CookieSameSite::DEFAULT_MODE,
|
||||||
CefNetworkDelegate::AreStrictSecureCookiesEnabled(),
|
|
||||||
net::COOKIE_PRIORITY_DEFAULT,
|
net::COOKIE_PRIORITY_DEFAULT,
|
||||||
base::Bind(SetCookieCallbackImpl, callback));
|
base::Bind(SetCookieCallbackImpl, callback));
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ int ResponseWriter::Write(net::IOBuffer* buffer,
|
|||||||
if (!base::IsStringUTF8(chunk))
|
if (!base::IsStringUTF8(chunk))
|
||||||
return num_bytes;
|
return num_bytes;
|
||||||
|
|
||||||
base::FundamentalValue* id = new base::FundamentalValue(stream_id_);
|
base::Value* id = new base::Value(stream_id_);
|
||||||
base::StringValue* chunkValue = new base::StringValue(chunk);
|
base::StringValue* chunkValue = new base::StringValue(chunk);
|
||||||
|
|
||||||
content::BrowserThread::PostTask(
|
content::BrowserThread::PostTask(
|
||||||
@ -322,6 +322,9 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
|
|||||||
} else if (method == "requestFileSystems") {
|
} else if (method == "requestFileSystems") {
|
||||||
web_contents()->GetMainFrame()->ExecuteJavaScriptForTests(
|
web_contents()->GetMainFrame()->ExecuteJavaScriptForTests(
|
||||||
base::ASCIIToUTF16("DevToolsAPI.fileSystemsLoaded([]);"));
|
base::ASCIIToUTF16("DevToolsAPI.fileSystemsLoaded([]);"));
|
||||||
|
} else if (method == "reattach") {
|
||||||
|
agent_host_->DetachClient(this);
|
||||||
|
agent_host_->AttachClient(this);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -404,7 +407,7 @@ void CefDevToolsFrontend::CallClientFunction(
|
|||||||
|
|
||||||
void CefDevToolsFrontend::SendMessageAck(int request_id,
|
void CefDevToolsFrontend::SendMessageAck(int request_id,
|
||||||
const base::Value* arg) {
|
const base::Value* arg) {
|
||||||
base::FundamentalValue id_value(request_id);
|
base::Value id_value(request_id);
|
||||||
CallClientFunction("DevToolsAPI.embedderMessageAck",
|
CallClientFunction("DevToolsAPI.embedderMessageAck",
|
||||||
&id_value, arg, nullptr);
|
&id_value, arg, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,6 @@ CefPDFWebContentsHelperClient::CefPDFWebContentsHelperClient() {
|
|||||||
CefPDFWebContentsHelperClient::~CefPDFWebContentsHelperClient() {
|
CefPDFWebContentsHelperClient::~CefPDFWebContentsHelperClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefPDFWebContentsHelperClient::UpdateLocationBar(
|
|
||||||
content::WebContents* contents) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefPDFWebContentsHelperClient::UpdateContentRestrictions(
|
void CefPDFWebContentsHelperClient::UpdateContentRestrictions(
|
||||||
content::WebContents* contents,
|
content::WebContents* contents,
|
||||||
int content_restrictions) {
|
int content_restrictions) {
|
||||||
|
@ -18,13 +18,9 @@ class CefPDFWebContentsHelperClient
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// pdf::PDFWebContentsHelperClient:
|
// pdf::PDFWebContentsHelperClient:
|
||||||
void UpdateLocationBar(content::WebContents* contents) override;
|
|
||||||
|
|
||||||
void UpdateContentRestrictions(content::WebContents* contents,
|
void UpdateContentRestrictions(content::WebContents* contents,
|
||||||
int content_restrictions) override;
|
int content_restrictions) override;
|
||||||
|
|
||||||
void OnPDFHasUnsupportedFeature(content::WebContents* contents) override;
|
void OnPDFHasUnsupportedFeature(content::WebContents* contents) override;
|
||||||
|
|
||||||
void OnSaveURL(content::WebContents* contents) override;
|
void OnSaveURL(content::WebContents* contents) override;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefPDFWebContentsHelperClient);
|
DISALLOW_COPY_AND_ASSIGN(CefPDFWebContentsHelperClient);
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "libcef/browser/browser_host_impl.h"
|
#include "libcef/browser/browser_host_impl.h"
|
||||||
#include "libcef/browser/thread_util.h"
|
#include "libcef/browser/thread_util.h"
|
||||||
|
|
||||||
#include "base/threading/worker_pool.h"
|
|
||||||
#include "content/public/browser/render_frame_host.h"
|
#include "content/public/browser/render_frame_host.h"
|
||||||
#include "content/public/common/file_chooser_file_info.h"
|
#include "content/public/common/file_chooser_file_info.h"
|
||||||
#include "net/base/directory_lister.h"
|
#include "net/base/directory_lister.h"
|
||||||
@ -363,7 +362,7 @@ void CefFileDialogManager::OnRunFileChooserUploadFolderDelegateCallback(
|
|||||||
new UploadFolderHelper(
|
new UploadFolderHelper(
|
||||||
base::Bind(&CefFileDialogManager::OnRunFileChooserDelegateCallback,
|
base::Bind(&CefFileDialogManager::OnRunFileChooserDelegateCallback,
|
||||||
weak_ptr_factory_.GetWeakPtr(), mode))));
|
weak_ptr_factory_.GetWeakPtr(), mode))));
|
||||||
lister_->Start(base::WorkerPool::GetTaskRunner(true).get());
|
lister_->Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ void CefJavaScriptDialogManager::Destroy() {
|
|||||||
void CefJavaScriptDialogManager::RunJavaScriptDialog(
|
void CefJavaScriptDialogManager::RunJavaScriptDialog(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
const GURL& origin_url,
|
const GURL& origin_url,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
const DialogClosedCallback& callback,
|
const DialogClosedCallback& callback,
|
||||||
@ -187,7 +187,7 @@ void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
|
|||||||
dialog_running_ = true;
|
dialog_running_ = true;
|
||||||
|
|
||||||
runner_->Run(browser_,
|
runner_->Run(browser_,
|
||||||
content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM,
|
content::JAVASCRIPT_DIALOG_TYPE_CONFIRM,
|
||||||
base::string16(), // display_url
|
base::string16(), // display_url
|
||||||
message_text,
|
message_text,
|
||||||
base::string16(), // default_prompt_text
|
base::string16(), // default_prompt_text
|
||||||
@ -197,7 +197,6 @@ void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
|
|||||||
|
|
||||||
void CefJavaScriptDialogManager::CancelDialogs(
|
void CefJavaScriptDialogManager::CancelDialogs(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
bool suppress_callbacks,
|
|
||||||
bool reset_state) {
|
bool reset_state) {
|
||||||
CefRefPtr<CefClient> client = browser_->GetClient();
|
CefRefPtr<CefClient> client = browser_->GetClient();
|
||||||
if (client.get()) {
|
if (client.get()) {
|
||||||
|
@ -32,7 +32,7 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
|||||||
void RunJavaScriptDialog(
|
void RunJavaScriptDialog(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
const GURL& origin_url,
|
const GURL& origin_url,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
const DialogClosedCallback& callback,
|
const DialogClosedCallback& callback,
|
||||||
@ -42,7 +42,6 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
|||||||
bool is_reload,
|
bool is_reload,
|
||||||
const DialogClosedCallback& callback) override;
|
const DialogClosedCallback& callback) override;
|
||||||
void CancelDialogs(content::WebContents* web_contents,
|
void CancelDialogs(content::WebContents* web_contents,
|
||||||
bool suppress_callbacks,
|
|
||||||
bool reset_state) override;
|
bool reset_state) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
#include "base/strings/string16.h"
|
#include "base/strings/string16.h"
|
||||||
#include "content/public/common/javascript_message_type.h"
|
#include "content/public/common/javascript_dialog_type.h"
|
||||||
|
|
||||||
class CefBrowserHostImpl;
|
class CefBrowserHostImpl;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ class CefJavaScriptDialogRunner {
|
|||||||
// Run the dialog. Execute |callback| on completion.
|
// Run the dialog. Execute |callback| on completion.
|
||||||
virtual void Run(
|
virtual void Run(
|
||||||
CefBrowserHostImpl* browser,
|
CefBrowserHostImpl* browser,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& display_url,
|
const base::string16& display_url,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
|
@ -160,15 +160,10 @@ class CefSimpleMenuModel : public ui::MenuModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GetTextColor(int index,
|
bool GetTextColor(int index,
|
||||||
|
bool is_minor,
|
||||||
bool is_hovered,
|
bool is_hovered,
|
||||||
SkColor* override_color) const override {
|
SkColor* override_color) const override {
|
||||||
return impl_->GetTextColor(index, false, is_hovered, override_color);
|
return impl_->GetTextColor(index, is_minor, is_hovered, override_color);
|
||||||
}
|
|
||||||
|
|
||||||
bool GetMinorTextColor(int index,
|
|
||||||
bool is_hovered,
|
|
||||||
SkColor* override_color) const override {
|
|
||||||
return impl_->GetTextColor(index, true, is_hovered, override_color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetBackgroundColor(int index,
|
bool GetBackgroundColor(int index,
|
||||||
|
@ -26,7 +26,7 @@ class CefJavaScriptDialogRunnerMac : public CefJavaScriptDialogRunner {
|
|||||||
// CefJavaScriptDialogRunner methods:
|
// CefJavaScriptDialogRunner methods:
|
||||||
void Run(
|
void Run(
|
||||||
CefBrowserHostImpl* browser,
|
CefBrowserHostImpl* browser,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& display_url,
|
const base::string16& display_url,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
|
@ -89,7 +89,7 @@ CefJavaScriptDialogRunnerMac::~CefJavaScriptDialogRunnerMac() {
|
|||||||
|
|
||||||
void CefJavaScriptDialogRunnerMac::Run(
|
void CefJavaScriptDialogRunnerMac::Run(
|
||||||
CefBrowserHostImpl* browser,
|
CefBrowserHostImpl* browser,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& display_url,
|
const base::string16& display_url,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
@ -98,9 +98,9 @@ void CefJavaScriptDialogRunnerMac::Run(
|
|||||||
callback_ = callback;
|
callback_ = callback;
|
||||||
|
|
||||||
bool text_field =
|
bool text_field =
|
||||||
message_type == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT;
|
message_type == content::JAVASCRIPT_DIALOG_TYPE_PROMPT;
|
||||||
bool one_button =
|
bool one_button =
|
||||||
message_type == content::JAVASCRIPT_MESSAGE_TYPE_ALERT;
|
message_type == content::JAVASCRIPT_DIALOG_TYPE_ALERT;
|
||||||
|
|
||||||
helper_.reset(
|
helper_.reset(
|
||||||
[[CefJavaScriptDialogHelper alloc] initHelperWithCallback:
|
[[CefJavaScriptDialogHelper alloc] initHelperWithCallback:
|
||||||
@ -119,13 +119,13 @@ void CefJavaScriptDialogRunnerMac::Run(
|
|||||||
|
|
||||||
base::string16 label;
|
base::string16 label;
|
||||||
switch (message_type) {
|
switch (message_type) {
|
||||||
case content::JAVASCRIPT_MESSAGE_TYPE_ALERT:
|
case content::JAVASCRIPT_DIALOG_TYPE_ALERT:
|
||||||
label = base::ASCIIToUTF16("JavaScript Alert");
|
label = base::ASCIIToUTF16("JavaScript Alert");
|
||||||
break;
|
break;
|
||||||
case content::JAVASCRIPT_MESSAGE_TYPE_PROMPT:
|
case content::JAVASCRIPT_DIALOG_TYPE_PROMPT:
|
||||||
label = base::ASCIIToUTF16("JavaScript Prompt");
|
label = base::ASCIIToUTF16("JavaScript Prompt");
|
||||||
break;
|
break;
|
||||||
case content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM:
|
case content::JAVASCRIPT_DIALOG_TYPE_CONFIRM:
|
||||||
label = base::ASCIIToUTF16("JavaScript Confirm");
|
label = base::ASCIIToUTF16("JavaScript Confirm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ INT_PTR CALLBACK CefJavaScriptDialogRunnerWin::DialogProc(
|
|||||||
reinterpret_cast<CefJavaScriptDialogRunnerWin*>(lparam);
|
reinterpret_cast<CefJavaScriptDialogRunnerWin*>(lparam);
|
||||||
owner->dialog_win_ = dialog;
|
owner->dialog_win_ = dialog;
|
||||||
SetDlgItemText(dialog, IDC_DIALOGTEXT, owner->message_text_.c_str());
|
SetDlgItemText(dialog, IDC_DIALOGTEXT, owner->message_text_.c_str());
|
||||||
if (owner->message_type_ == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT)
|
if (owner->message_type_ == content::JAVASCRIPT_DIALOG_TYPE_PROMPT)
|
||||||
SetDlgItemText(dialog, IDC_PROMPTEDIT,
|
SetDlgItemText(dialog, IDC_PROMPTEDIT,
|
||||||
owner->default_prompt_text_.c_str());
|
owner->default_prompt_text_.c_str());
|
||||||
break;
|
break;
|
||||||
@ -57,7 +57,7 @@ INT_PTR CALLBACK CefJavaScriptDialogRunnerWin::DialogProc(
|
|||||||
case IDOK:
|
case IDOK:
|
||||||
finish = true;
|
finish = true;
|
||||||
result = true;
|
result = true;
|
||||||
if (owner->message_type_ == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) {
|
if (owner->message_type_ == content::JAVASCRIPT_DIALOG_TYPE_PROMPT) {
|
||||||
size_t length =
|
size_t length =
|
||||||
GetWindowTextLength(GetDlgItem(dialog, IDC_PROMPTEDIT)) + 1;
|
GetWindowTextLength(GetDlgItem(dialog, IDC_PROMPTEDIT)) + 1;
|
||||||
if (length > 1) {
|
if (length > 1) {
|
||||||
@ -95,7 +95,7 @@ CefJavaScriptDialogRunnerWin::~CefJavaScriptDialogRunnerWin() {
|
|||||||
|
|
||||||
void CefJavaScriptDialogRunnerWin::Run(
|
void CefJavaScriptDialogRunnerWin::Run(
|
||||||
CefBrowserHostImpl* browser,
|
CefBrowserHostImpl* browser,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& display_url,
|
const base::string16& display_url,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
@ -111,11 +111,11 @@ void CefJavaScriptDialogRunnerWin::Run(
|
|||||||
hook_installed_ = true;
|
hook_installed_ = true;
|
||||||
|
|
||||||
int dialog_type;
|
int dialog_type;
|
||||||
if (message_type == content::JAVASCRIPT_MESSAGE_TYPE_ALERT)
|
if (message_type == content::JAVASCRIPT_DIALOG_TYPE_ALERT)
|
||||||
dialog_type = IDD_ALERT;
|
dialog_type = IDD_ALERT;
|
||||||
else if (message_type == content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM)
|
else if (message_type == content::JAVASCRIPT_DIALOG_TYPE_CONFIRM)
|
||||||
dialog_type = IDD_CONFIRM;
|
dialog_type = IDD_CONFIRM;
|
||||||
else // JAVASCRIPT_MESSAGE_TYPE_PROMPT
|
else // JAVASCRIPT_DIALOG_TYPE_PROMPT
|
||||||
dialog_type = IDD_PROMPT;
|
dialog_type = IDD_PROMPT;
|
||||||
|
|
||||||
base::FilePath file_path;
|
base::FilePath file_path;
|
||||||
|
@ -17,7 +17,7 @@ class CefJavaScriptDialogRunnerWin : public CefJavaScriptDialogRunner {
|
|||||||
// CefJavaScriptDialogRunner methods:
|
// CefJavaScriptDialogRunner methods:
|
||||||
void Run(
|
void Run(
|
||||||
CefBrowserHostImpl* browser,
|
CefBrowserHostImpl* browser,
|
||||||
content::JavaScriptMessageType message_type,
|
content::JavaScriptDialogType message_type,
|
||||||
const base::string16& display_url,
|
const base::string16& display_url,
|
||||||
const base::string16& message_text,
|
const base::string16& message_text,
|
||||||
const base::string16& default_prompt_text,
|
const base::string16& default_prompt_text,
|
||||||
@ -28,7 +28,7 @@ class CefJavaScriptDialogRunnerWin : public CefJavaScriptDialogRunner {
|
|||||||
HWND dialog_win_;
|
HWND dialog_win_;
|
||||||
HWND parent_win_;
|
HWND parent_win_;
|
||||||
|
|
||||||
content::JavaScriptMessageType message_type_;
|
content::JavaScriptDialogType message_type_;
|
||||||
base::string16 message_text_;
|
base::string16 message_text_;
|
||||||
base::string16 default_prompt_text_;
|
base::string16 default_prompt_text_;
|
||||||
DialogClosedCallback callback_;
|
DialogClosedCallback callback_;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/threading/thread_task_runner_handle.h"
|
#include "base/threading/thread_task_runner_handle.h"
|
||||||
#include "base/win/wrapped_window_proc.h"
|
#include "base/win/wrapped_window_proc.h"
|
||||||
|
#include "skia/ext/platform_canvas.h"
|
||||||
#include "skia/ext/skia_utils_win.h"
|
#include "skia/ext/skia_utils_win.h"
|
||||||
#include "ui/base/accelerators/accelerator.h"
|
#include "ui/base/accelerators/accelerator.h"
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <X11/extensions/XInput2.h>
|
#include <X11/extensions/XInput2.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
#include "ui/base/x/x11_util.h"
|
#include "ui/base/x/x11_util.h"
|
||||||
|
@ -7,7 +7,10 @@
|
|||||||
#define CEF_LIBCEF_BROWSER_NATIVE_WINDOW_X11_H_
|
#define CEF_LIBCEF_BROWSER_NATIVE_WINDOW_X11_H_
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
// Avoid including <X11/Xlib.h>
|
||||||
|
typedef unsigned long Window;
|
||||||
|
struct _XDisplay;
|
||||||
|
typedef struct _XDisplay Display;
|
||||||
|
|
||||||
#include "libcef/browser/browser_host_impl.h"
|
#include "libcef/browser/browser_host_impl.h"
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ void CefCookieStoreProxy::SetCookieWithDetailsAsync(
|
|||||||
bool secure,
|
bool secure,
|
||||||
bool http_only,
|
bool http_only,
|
||||||
net::CookieSameSite same_site,
|
net::CookieSameSite same_site,
|
||||||
bool enforce_strict_secure,
|
|
||||||
net::CookiePriority priority,
|
net::CookiePriority priority,
|
||||||
const SetCookiesCallback& callback) {
|
const SetCookiesCallback& callback) {
|
||||||
net::CookieStore* cookie_store = GetCookieStore();
|
net::CookieStore* cookie_store = GetCookieStore();
|
||||||
@ -57,8 +56,7 @@ void CefCookieStoreProxy::SetCookieWithDetailsAsync(
|
|||||||
cookie_store->SetCookieWithDetailsAsync(url, name, value, domain, path,
|
cookie_store->SetCookieWithDetailsAsync(url, name, value, domain, path,
|
||||||
creation_time, expiration_time,
|
creation_time, expiration_time,
|
||||||
last_access_time, secure, http_only,
|
last_access_time, secure, http_only,
|
||||||
same_site, enforce_strict_secure,
|
same_site, priority, callback);
|
||||||
priority, callback);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ class CefCookieStoreProxy : public net::CookieStore {
|
|||||||
bool secure,
|
bool secure,
|
||||||
bool http_only,
|
bool http_only,
|
||||||
net::CookieSameSite same_site,
|
net::CookieSameSite same_site,
|
||||||
bool enforce_strict_secure,
|
|
||||||
net::CookiePriority priority,
|
net::CookiePriority priority,
|
||||||
const SetCookiesCallback& callback) override;
|
const SetCookiesCallback& callback) override;
|
||||||
void GetCookiesWithOptionsAsync(
|
void GetCookiesWithOptionsAsync(
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "base/memory/ptr_util.h"
|
#include "base/memory/ptr_util.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "blink/grit/devtools_resources_map.h"
|
#include "content/browser/devtools/grit/devtools_resources_map.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
|
|
||||||
namespace scheme {
|
namespace scheme {
|
||||||
|
@ -252,15 +252,6 @@ bool CefNetworkDelegate::AreExperimentalCookieFeaturesEnabled() {
|
|||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
bool CefNetworkDelegate::AreStrictSecureCookiesEnabled() {
|
|
||||||
const std::string enforce_strict_secure_group =
|
|
||||||
base::FieldTrialList::FindFullName("StrictSecureCookies");
|
|
||||||
return AreExperimentalCookieFeaturesEnabled() ||
|
|
||||||
base::StartsWith(enforce_strict_secure_group, "Enabled",
|
|
||||||
base::CompareCase::INSENSITIVE_ASCII);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unique_ptr<net::SourceStream> CefNetworkDelegate::CreateSourceStream(
|
std::unique_ptr<net::SourceStream> CefNetworkDelegate::CreateSourceStream(
|
||||||
net::URLRequest* request,
|
net::URLRequest* request,
|
||||||
std::unique_ptr<net::SourceStream> upstream) {
|
std::unique_ptr<net::SourceStream> upstream) {
|
||||||
@ -468,7 +459,3 @@ bool CefNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
|||||||
bool CefNetworkDelegate::OnAreExperimentalCookieFeaturesEnabled() const {
|
bool CefNetworkDelegate::OnAreExperimentalCookieFeaturesEnabled() const {
|
||||||
return AreExperimentalCookieFeaturesEnabled();
|
return AreExperimentalCookieFeaturesEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefNetworkDelegate::OnAreStrictSecureCookiesEnabled() const {
|
|
||||||
return AreStrictSecureCookiesEnabled();
|
|
||||||
}
|
|
||||||
|
@ -22,7 +22,6 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl {
|
|||||||
// Match the logic from ChromeNetworkDelegate and
|
// Match the logic from ChromeNetworkDelegate and
|
||||||
// RenderFrameMessageFilter::OnSetCookie.
|
// RenderFrameMessageFilter::OnSetCookie.
|
||||||
static bool AreExperimentalCookieFeaturesEnabled();
|
static bool AreExperimentalCookieFeaturesEnabled();
|
||||||
static bool AreStrictSecureCookiesEnabled();
|
|
||||||
|
|
||||||
void set_force_google_safesearch(
|
void set_force_google_safesearch(
|
||||||
BooleanPrefMember* force_google_safesearch) {
|
BooleanPrefMember* force_google_safesearch) {
|
||||||
@ -46,7 +45,6 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl {
|
|||||||
bool OnCanAccessFile(const net::URLRequest& request,
|
bool OnCanAccessFile(const net::URLRequest& request,
|
||||||
const base::FilePath& path) const override;
|
const base::FilePath& path) const override;
|
||||||
bool OnAreExperimentalCookieFeaturesEnabled() const override;
|
bool OnAreExperimentalCookieFeaturesEnabled() const override;
|
||||||
bool OnAreStrictSecureCookiesEnabled() const override;
|
|
||||||
|
|
||||||
// Weak, owned by our owner (CefURLRequestContextGetterImpl).
|
// Weak, owned by our owner (CefURLRequestContextGetterImpl).
|
||||||
BooleanPrefMember* force_google_safesearch_;
|
BooleanPrefMember* force_google_safesearch_;
|
||||||
|
@ -171,7 +171,8 @@ std::unique_ptr<CefJavaScriptDialogRunner>
|
|||||||
return native_delegate_->CreateJavaScriptDialogRunner();
|
return native_delegate_->CreateJavaScriptDialogRunner();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<CefMenuRunner> CefBrowserPlatformDelegateOsr::CreateMenuRunner() {
|
std::unique_ptr<CefMenuRunner>
|
||||||
|
CefBrowserPlatformDelegateOsr::CreateMenuRunner() {
|
||||||
return native_delegate_->CreateMenuRunner();
|
return native_delegate_->CreateMenuRunner();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,6 +303,8 @@ void CefBrowserPlatformDelegateOsr::DragTargetDragOver(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const gfx::Point client_pt(event.x, event.y);
|
const gfx::Point client_pt(event.x, event.y);
|
||||||
|
const gfx::Point& screen_pt = GetScreenPoint(client_pt);
|
||||||
|
|
||||||
gfx::Point transformed_pt;
|
gfx::Point transformed_pt;
|
||||||
content::RenderWidgetHostImpl* target_rwh =
|
content::RenderWidgetHostImpl* target_rwh =
|
||||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
||||||
@ -309,15 +312,32 @@ void CefBrowserPlatformDelegateOsr::DragTargetDragOver(
|
|||||||
client_pt, &transformed_pt);
|
client_pt, &transformed_pt);
|
||||||
|
|
||||||
if (target_rwh != current_rwh_for_drag_.get()) {
|
if (target_rwh != current_rwh_for_drag_.get()) {
|
||||||
if (current_rwh_for_drag_)
|
if (current_rwh_for_drag_) {
|
||||||
current_rwh_for_drag_->DragTargetDragLeave();
|
gfx::Point transformed_leave_point = client_pt;
|
||||||
|
gfx::Point transformed_screen_point = screen_pt;
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
web_contents->GetRenderWidgetHostView())
|
||||||
|
->TransformPointToCoordSpaceForView(
|
||||||
|
client_pt,
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
current_rwh_for_drag_->GetView()),
|
||||||
|
&transformed_leave_point);
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
web_contents->GetRenderWidgetHostView())
|
||||||
|
->TransformPointToCoordSpaceForView(
|
||||||
|
screen_pt,
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
current_rwh_for_drag_->GetView()),
|
||||||
|
&transformed_screen_point);
|
||||||
|
current_rwh_for_drag_->DragTargetDragLeave(transformed_leave_point,
|
||||||
|
transformed_screen_point);
|
||||||
|
}
|
||||||
DragTargetDragEnter(drag_data_, event, drag_allowed_ops_);
|
DragTargetDragEnter(drag_data_, event, drag_allowed_ops_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!drag_data_)
|
if (!drag_data_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const gfx::Point& screen_pt = GetScreenPoint(client_pt);
|
|
||||||
blink::WebDragOperationsMask ops =
|
blink::WebDragOperationsMask ops =
|
||||||
static_cast<blink::WebDragOperationsMask>(allowed_ops);
|
static_cast<blink::WebDragOperationsMask>(allowed_ops);
|
||||||
int modifiers = TranslateModifiers(event.modifiers);
|
int modifiers = TranslateModifiers(event.modifiers);
|
||||||
@ -332,7 +352,7 @@ void CefBrowserPlatformDelegateOsr::DragTargetDragLeave() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (current_rwh_for_drag_) {
|
if (current_rwh_for_drag_) {
|
||||||
current_rwh_for_drag_->DragTargetDragLeave();
|
current_rwh_for_drag_->DragTargetDragLeave(gfx::Point(), gfx::Point());
|
||||||
current_rwh_for_drag_.reset();
|
current_rwh_for_drag_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,6 +369,8 @@ void CefBrowserPlatformDelegateOsr::DragTargetDrop(const CefMouseEvent& event) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
gfx::Point client_pt(event.x, event.y);
|
gfx::Point client_pt(event.x, event.y);
|
||||||
|
const gfx::Point& screen_pt = GetScreenPoint(client_pt);
|
||||||
|
|
||||||
gfx::Point transformed_pt;
|
gfx::Point transformed_pt;
|
||||||
content::RenderWidgetHostImpl* target_rwh =
|
content::RenderWidgetHostImpl* target_rwh =
|
||||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
||||||
@ -356,8 +378,26 @@ void CefBrowserPlatformDelegateOsr::DragTargetDrop(const CefMouseEvent& event) {
|
|||||||
client_pt, &transformed_pt);
|
client_pt, &transformed_pt);
|
||||||
|
|
||||||
if (target_rwh != current_rwh_for_drag_.get()) {
|
if (target_rwh != current_rwh_for_drag_.get()) {
|
||||||
if (current_rwh_for_drag_)
|
if (current_rwh_for_drag_) {
|
||||||
current_rwh_for_drag_->DragTargetDragLeave();
|
gfx::Point transformed_leave_point = client_pt;
|
||||||
|
gfx::Point transformed_screen_point = screen_pt;
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
web_contents->GetRenderWidgetHostView())
|
||||||
|
->TransformPointToCoordSpaceForView(
|
||||||
|
client_pt,
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
current_rwh_for_drag_->GetView()),
|
||||||
|
&transformed_leave_point);
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
web_contents->GetRenderWidgetHostView())
|
||||||
|
->TransformPointToCoordSpaceForView(
|
||||||
|
screen_pt,
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
current_rwh_for_drag_->GetView()),
|
||||||
|
&transformed_screen_point);
|
||||||
|
current_rwh_for_drag_->DragTargetDragLeave(transformed_leave_point,
|
||||||
|
transformed_screen_point);
|
||||||
|
}
|
||||||
DragTargetDragEnter(drag_data_, event, drag_allowed_ops_);
|
DragTargetDragEnter(drag_data_, event, drag_allowed_ops_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,7 +409,6 @@ void CefBrowserPlatformDelegateOsr::DragTargetDrop(const CefMouseEvent& event) {
|
|||||||
static_cast<CefDragDataImpl*>(drag_data_.get());
|
static_cast<CefDragDataImpl*>(drag_data_.get());
|
||||||
base::AutoLock lock_scope(data_impl->lock());
|
base::AutoLock lock_scope(data_impl->lock());
|
||||||
content::DropData* drop_data = data_impl->drop_data();
|
content::DropData* drop_data = data_impl->drop_data();
|
||||||
const gfx::Point& screen_pt = GetScreenPoint(client_pt);
|
|
||||||
int modifiers = TranslateModifiers(event.modifiers);
|
int modifiers = TranslateModifiers(event.modifiers);
|
||||||
|
|
||||||
target_rwh->DragTargetDrop(*drop_data, transformed_pt, screen_pt,
|
target_rwh->DragTargetDrop(*drop_data, transformed_pt, screen_pt,
|
||||||
@ -430,11 +469,36 @@ void CefBrowserPlatformDelegateOsr::DragSourceEndedAt(
|
|||||||
if (!web_contents)
|
if (!web_contents)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const gfx::Point& screen_pt = GetScreenPoint(gfx::Point(x, y));
|
content::RenderWidgetHostImpl* source_rwh = drag_start_rwh_.get();
|
||||||
|
const gfx::Point client_loc(gfx::Point(x, y));
|
||||||
|
const gfx::Point& screen_loc = GetScreenPoint(client_loc);
|
||||||
blink::WebDragOperation drag_op = static_cast<blink::WebDragOperation>(op);
|
blink::WebDragOperation drag_op = static_cast<blink::WebDragOperation>(op);
|
||||||
|
|
||||||
web_contents->DragSourceEndedAt(x, y, screen_pt.x(), screen_pt.y(), drag_op,
|
// |client_loc| and |screen_loc| are in the root coordinate space, for
|
||||||
drag_start_rwh_.get());
|
// non-root RenderWidgetHosts they need to be transformed.
|
||||||
|
gfx::Point transformed_point = client_loc;
|
||||||
|
gfx::Point transformed_screen_point = screen_loc;
|
||||||
|
if (source_rwh && web_contents->GetRenderWidgetHostView()) {
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
web_contents->GetRenderWidgetHostView())
|
||||||
|
->TransformPointToCoordSpaceForView(
|
||||||
|
client_loc,
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
source_rwh->GetView()),
|
||||||
|
&transformed_point);
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
web_contents->GetRenderWidgetHostView())
|
||||||
|
->TransformPointToCoordSpaceForView(
|
||||||
|
screen_loc,
|
||||||
|
static_cast<content::RenderWidgetHostViewBase*>(
|
||||||
|
source_rwh->GetView()),
|
||||||
|
&transformed_screen_point);
|
||||||
|
}
|
||||||
|
|
||||||
|
web_contents->DragSourceEndedAt(transformed_point.x(), transformed_point.y(),
|
||||||
|
transformed_screen_point.x(),
|
||||||
|
transformed_screen_point.y(), drag_op,
|
||||||
|
source_rwh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateOsr::DragSourceSystemDragEnded() {
|
void CefBrowserPlatformDelegateOsr::DragSourceSystemDragEnded() {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "content/browser/frame_host/render_widget_host_view_guest.h"
|
#include "content/browser/frame_host/render_widget_host_view_guest.h"
|
||||||
#include "content/browser/renderer_host/dip_util.h"
|
#include "content/browser/renderer_host/dip_util.h"
|
||||||
#include "content/browser/renderer_host/render_widget_host_delegate.h"
|
#include "content/browser/renderer_host/render_widget_host_delegate.h"
|
||||||
|
#include "content/browser/renderer_host/render_widget_host_view_frame_subscriber.h"
|
||||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||||
#include "content/browser/renderer_host/resize_lock.h"
|
#include "content/browser/renderer_host/resize_lock.h"
|
||||||
#include "content/common/input_messages.h"
|
#include "content/common/input_messages.h"
|
||||||
@ -33,8 +34,8 @@
|
|||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/browser/context_factory.h"
|
#include "content/public/browser/context_factory.h"
|
||||||
#include "content/public/browser/render_view_host.h"
|
#include "content/public/browser/render_view_host.h"
|
||||||
#include "content/public/browser/render_widget_host_view_frame_subscriber.h"
|
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
|
#include "media/base/video_frame.h"
|
||||||
#include "ui/gfx/geometry/dip_util.h"
|
#include "ui/gfx/geometry/dip_util.h"
|
||||||
#include "ui/gfx/geometry/size_conversions.h"
|
#include "ui/gfx/geometry/size_conversions.h"
|
||||||
#include "ui/gfx/image/image_skia_operations.h"
|
#include "ui/gfx/image/image_skia_operations.h"
|
||||||
@ -451,7 +452,8 @@ class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
|
|||||||
CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||||
bool transparent,
|
bool transparent,
|
||||||
content::RenderWidgetHost* widget,
|
content::RenderWidgetHost* widget,
|
||||||
CefRenderWidgetHostViewOSR* parent_host_view)
|
CefRenderWidgetHostViewOSR* parent_host_view,
|
||||||
|
bool is_guest_view_hack)
|
||||||
: transparent_(transparent),
|
: transparent_(transparent),
|
||||||
scale_factor_(kDefaultScaleFactor),
|
scale_factor_(kDefaultScaleFactor),
|
||||||
frame_rate_threshold_ms_(0),
|
frame_rate_threshold_ms_(0),
|
||||||
@ -483,20 +485,20 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(OS_MACOSX)
|
#if !defined(OS_MACOSX)
|
||||||
content::ImageTransportFactory* factory =
|
|
||||||
content::ImageTransportFactory::GetInstance();
|
|
||||||
ui::ContextFactoryPrivate* context_factory_private =
|
|
||||||
factory->GetContextFactoryPrivate();
|
|
||||||
delegated_frame_host_ = base::MakeUnique<content::DelegatedFrameHost>(
|
delegated_frame_host_ = base::MakeUnique<content::DelegatedFrameHost>(
|
||||||
context_factory_private->AllocateFrameSinkId(), this);
|
AllocateFrameSinkId(is_guest_view_hack), this);
|
||||||
|
|
||||||
root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
|
root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PlatformCreateCompositorWidget();
|
PlatformCreateCompositorWidget(is_guest_view_hack);
|
||||||
|
|
||||||
#if !defined(OS_MACOSX)
|
#if !defined(OS_MACOSX)
|
||||||
// On OS X the ui::Compositor is created/owned by the platform view.
|
// On macOS the ui::Compositor is created/owned by the platform view.
|
||||||
|
content::ImageTransportFactory* factory =
|
||||||
|
content::ImageTransportFactory::GetInstance();
|
||||||
|
ui::ContextFactoryPrivate* context_factory_private =
|
||||||
|
factory->GetContextFactoryPrivate();
|
||||||
compositor_.reset(
|
compositor_.reset(
|
||||||
new ui::Compositor(context_factory_private->AllocateFrameSinkId(),
|
new ui::Compositor(context_factory_private->AllocateFrameSinkId(),
|
||||||
content::GetContextFactory(), context_factory_private,
|
content::GetContextFactory(), context_factory_private,
|
||||||
@ -593,7 +595,7 @@ bool CefRenderWidgetHostViewOSR::HasFocus() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CefRenderWidgetHostViewOSR::IsSurfaceAvailableForCopy() const {
|
bool CefRenderWidgetHostViewOSR::IsSurfaceAvailableForCopy() const {
|
||||||
return GetDelegatedFrameHost()->CanCopyToBitmap();
|
return GetDelegatedFrameHost()->CanCopyFromCompositingSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::Show() {
|
void CefRenderWidgetHostViewOSR::Show() {
|
||||||
@ -697,17 +699,12 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame(
|
|||||||
|
|
||||||
// The compositor will draw directly to the SoftwareOutputDevice which
|
// The compositor will draw directly to the SoftwareOutputDevice which
|
||||||
// then calls OnPaint.
|
// then calls OnPaint.
|
||||||
#if defined(OS_MACOSX)
|
// We would normally call BrowserCompositorMac::SwapCompositorFrame on
|
||||||
// We would normally call BrowserCompositorMac::SwapCompositorFrame,
|
// macOS, however it contains compositor resize logic that we don't want.
|
||||||
// however it contains compositor resize logic that we don't want.
|
|
||||||
// Consequently we instead call the SwapDelegatedFrame method directly.
|
// Consequently we instead call the SwapDelegatedFrame method directly.
|
||||||
browser_compositor_->GetDelegatedFrameHost()->SwapDelegatedFrame(
|
GetDelegatedFrameHost()->SwapDelegatedFrame(output_surface_id,
|
||||||
output_surface_id, std::move(frame));
|
std::move(frame));
|
||||||
#else
|
} else {
|
||||||
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
|
||||||
std::move(frame));
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
if (!copy_frame_generator_.get()) {
|
if (!copy_frame_generator_.get()) {
|
||||||
copy_frame_generator_.reset(
|
copy_frame_generator_.reset(
|
||||||
new CefCopyFrameGenerator(frame_rate_threshold_ms_, this));
|
new CefCopyFrameGenerator(frame_rate_threshold_ms_, this));
|
||||||
@ -721,16 +718,11 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame(
|
|||||||
gfx::ToEnclosingRect(gfx::RectF(root_pass->damage_rect));
|
gfx::ToEnclosingRect(gfx::RectF(root_pass->damage_rect));
|
||||||
damage_rect.Intersect(gfx::Rect(frame_size));
|
damage_rect.Intersect(gfx::Rect(frame_size));
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
// We would normally call BrowserCompositorMac::SwapCompositorFrame on
|
||||||
// We would normally call BrowserCompositorMac::SwapCompositorFrame,
|
// macOS, however it contains compositor resize logic that we don't want.
|
||||||
// however it contains compositor resize logic that we don't want.
|
|
||||||
// Consequently we instead call the SwapDelegatedFrame method directly.
|
// Consequently we instead call the SwapDelegatedFrame method directly.
|
||||||
browser_compositor_->GetDelegatedFrameHost()->SwapDelegatedFrame(
|
GetDelegatedFrameHost()->SwapDelegatedFrame(output_surface_id,
|
||||||
output_surface_id, std::move(frame));
|
std::move(frame));
|
||||||
#else
|
|
||||||
delegated_frame_host_->SwapDelegatedFrame(output_surface_id,
|
|
||||||
std::move(frame));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Request a copy of the last compositor frame which will eventually call
|
// Request a copy of the last compositor frame which will eventually call
|
||||||
// OnPaint asynchronously.
|
// OnPaint asynchronously.
|
||||||
@ -892,7 +884,7 @@ gfx::Size CefRenderWidgetHostViewOSR::GetPhysicalBackingSize() const {
|
|||||||
return gfx::ConvertSizeToPixel(scale_factor_, GetRequestedRendererSize());
|
return gfx::ConvertSizeToPixel(scale_factor_, GetRequestedRendererSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface(
|
void CefRenderWidgetHostViewOSR::CopyFromSurface(
|
||||||
const gfx::Rect& src_subrect,
|
const gfx::Rect& src_subrect,
|
||||||
const gfx::Size& dst_size,
|
const gfx::Size& dst_size,
|
||||||
const content::ReadbackRequestCallback& callback,
|
const content::ReadbackRequestCallback& callback,
|
||||||
@ -901,18 +893,14 @@ void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface(
|
|||||||
src_subrect, dst_size, callback, color_type);
|
src_subrect, dst_size, callback, color_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame(
|
void CefRenderWidgetHostViewOSR::CopyFromSurfaceToVideoFrame(
|
||||||
const gfx::Rect& src_subrect,
|
const gfx::Rect& src_subrect,
|
||||||
const scoped_refptr<media::VideoFrame>& target,
|
scoped_refptr<media::VideoFrame> target,
|
||||||
const base::Callback<void(const gfx::Rect&, bool)>& callback) {
|
const base::Callback<void(const gfx::Rect&, bool)>& callback) {
|
||||||
GetDelegatedFrameHost()->CopyFromCompositingSurfaceToVideoFrame(
|
GetDelegatedFrameHost()->CopyFromCompositingSurfaceToVideoFrame(
|
||||||
src_subrect, target, callback);
|
src_subrect, target, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefRenderWidgetHostViewOSR::CanCopyToVideoFrame() const {
|
|
||||||
return GetDelegatedFrameHost()->CanCopyToVideoFrame();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::BeginFrameSubscription(
|
void CefRenderWidgetHostViewOSR::BeginFrameSubscription(
|
||||||
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber) {
|
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber) {
|
||||||
GetDelegatedFrameHost()->BeginFrameSubscription(std::move(subscriber));
|
GetDelegatedFrameHost()->BeginFrameSubscription(std::move(subscriber));
|
||||||
@ -950,14 +938,6 @@ content::BrowserAccessibilityManager*
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::LockCompositingSurface() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::UnlockCompositingSurface() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
|
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
|
||||||
void CefRenderWidgetHostViewOSR::ShowDisambiguationPopup(
|
void CefRenderWidgetHostViewOSR::ShowDisambiguationPopup(
|
||||||
const gfx::Rect& rect_pixels,
|
const gfx::Rect& rect_pixels,
|
||||||
@ -1046,6 +1026,40 @@ void CefRenderWidgetHostViewOSR::SetNeedsBeginFrames(bool enabled) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CefRenderWidgetHostViewOSR::TransformPointToLocalCoordSpace(
|
||||||
|
const gfx::Point& point,
|
||||||
|
const cc::SurfaceId& original_surface,
|
||||||
|
gfx::Point* transformed_point) {
|
||||||
|
// Transformations use physical pixels rather than DIP, so conversion
|
||||||
|
// is necessary.
|
||||||
|
gfx::Point point_in_pixels =
|
||||||
|
gfx::ConvertPointToPixel(scale_factor_, point);
|
||||||
|
if (!GetDelegatedFrameHost()->TransformPointToLocalCoordSpace(
|
||||||
|
point_in_pixels, original_surface, transformed_point)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
*transformed_point =
|
||||||
|
gfx::ConvertPointToDIP(scale_factor_, *transformed_point);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView(
|
||||||
|
const gfx::Point& point,
|
||||||
|
RenderWidgetHostViewBase* target_view,
|
||||||
|
gfx::Point* transformed_point) {
|
||||||
|
if (target_view == this) {
|
||||||
|
*transformed_point = point;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion,
|
||||||
|
// but it is not necessary here because the final target view is responsible
|
||||||
|
// for converting before computing the final transform.
|
||||||
|
return GetDelegatedFrameHost()->TransformPointToCoordSpaceForView(
|
||||||
|
point, target_view, transformed_point);
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_ptr<cc::SoftwareOutputDevice>
|
std::unique_ptr<cc::SoftwareOutputDevice>
|
||||||
CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice(
|
CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice(
|
||||||
ui::Compositor* compositor) {
|
ui::Compositor* compositor) {
|
||||||
@ -1613,3 +1627,20 @@ void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cc::FrameSinkId CefRenderWidgetHostViewOSR::AllocateFrameSinkId(
|
||||||
|
bool is_guest_view_hack) {
|
||||||
|
// GuestViews have two RenderWidgetHostViews and so we need to make sure
|
||||||
|
// we don't have FrameSinkId collisions.
|
||||||
|
// The FrameSinkId generated here must be unique with FrameSinkId allocated
|
||||||
|
// in ContextFactoryPrivate.
|
||||||
|
content::ImageTransportFactory* factory =
|
||||||
|
content::ImageTransportFactory::GetInstance();
|
||||||
|
return is_guest_view_hack
|
||||||
|
? factory->GetContextFactoryPrivate()->AllocateFrameSinkId()
|
||||||
|
: cc::FrameSinkId(base::checked_cast<uint32_t>(
|
||||||
|
render_widget_host_->GetProcess()->GetID()),
|
||||||
|
base::checked_cast<uint32_t>(
|
||||||
|
render_widget_host_->GetRoutingID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,8 @@ class CefRenderWidgetHostViewOSR
|
|||||||
public:
|
public:
|
||||||
CefRenderWidgetHostViewOSR(const bool transparent,
|
CefRenderWidgetHostViewOSR(const bool transparent,
|
||||||
content::RenderWidgetHost* widget,
|
content::RenderWidgetHost* widget,
|
||||||
CefRenderWidgetHostViewOSR* parent_host_view);
|
CefRenderWidgetHostViewOSR* parent_host_view,
|
||||||
|
bool is_guest_view_hack);
|
||||||
~CefRenderWidgetHostViewOSR() override;
|
~CefRenderWidgetHostViewOSR() override;
|
||||||
|
|
||||||
// RenderWidgetHostView implementation.
|
// RenderWidgetHostView implementation.
|
||||||
@ -142,16 +143,15 @@ class CefRenderWidgetHostViewOSR
|
|||||||
|
|
||||||
gfx::Size GetRequestedRendererSize() const override;
|
gfx::Size GetRequestedRendererSize() const override;
|
||||||
gfx::Size GetPhysicalBackingSize() const override;
|
gfx::Size GetPhysicalBackingSize() const override;
|
||||||
void CopyFromCompositingSurface(
|
void CopyFromSurface(
|
||||||
const gfx::Rect& src_subrect,
|
const gfx::Rect& src_subrect,
|
||||||
const gfx::Size& dst_size,
|
const gfx::Size& dst_size,
|
||||||
const content::ReadbackRequestCallback& callback,
|
const content::ReadbackRequestCallback& callback,
|
||||||
const SkColorType color_type) override;
|
const SkColorType color_type) override;
|
||||||
void CopyFromCompositingSurfaceToVideoFrame(
|
void CopyFromSurfaceToVideoFrame(
|
||||||
const gfx::Rect& src_subrect,
|
const gfx::Rect& src_subrect,
|
||||||
const scoped_refptr<media::VideoFrame>& target,
|
scoped_refptr<media::VideoFrame> target,
|
||||||
const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
|
const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
|
||||||
bool CanCopyToVideoFrame() const override;
|
|
||||||
void BeginFrameSubscription(
|
void BeginFrameSubscription(
|
||||||
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber)
|
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber)
|
||||||
override;
|
override;
|
||||||
@ -162,8 +162,6 @@ class CefRenderWidgetHostViewOSR
|
|||||||
CreateBrowserAccessibilityManager(
|
CreateBrowserAccessibilityManager(
|
||||||
content::BrowserAccessibilityDelegate* delegate,
|
content::BrowserAccessibilityDelegate* delegate,
|
||||||
bool for_root_frame) override;
|
bool for_root_frame) override;
|
||||||
void LockCompositingSurface() override;
|
|
||||||
void UnlockCompositingSurface() override;
|
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
|
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
|
||||||
void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
||||||
@ -175,6 +173,15 @@ class CefRenderWidgetHostViewOSR
|
|||||||
|
|
||||||
void SetNeedsBeginFrames(bool enabled) override;
|
void SetNeedsBeginFrames(bool enabled) override;
|
||||||
|
|
||||||
|
bool TransformPointToLocalCoordSpace(
|
||||||
|
const gfx::Point& point,
|
||||||
|
const cc::SurfaceId& original_surface,
|
||||||
|
gfx::Point* transformed_point) override;
|
||||||
|
bool TransformPointToCoordSpaceForView(
|
||||||
|
const gfx::Point& point,
|
||||||
|
RenderWidgetHostViewBase* target_view,
|
||||||
|
gfx::Point* transformed_point) override;
|
||||||
|
|
||||||
// ui::CompositorDelegate implementation.
|
// ui::CompositorDelegate implementation.
|
||||||
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
||||||
ui::Compositor* compositor) override;
|
ui::Compositor* compositor) override;
|
||||||
@ -280,10 +287,12 @@ class CefRenderWidgetHostViewOSR
|
|||||||
|
|
||||||
void RequestImeCompositionUpdate(bool start_monitoring);
|
void RequestImeCompositionUpdate(bool start_monitoring);
|
||||||
|
|
||||||
|
cc::FrameSinkId AllocateFrameSinkId(bool is_guest_view_hack);
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
friend class MacHelper;
|
friend class MacHelper;
|
||||||
#endif
|
#endif
|
||||||
void PlatformCreateCompositorWidget();
|
void PlatformCreateCompositorWidget(bool is_guest_view_hack);
|
||||||
void PlatformResizeCompositorWidget(const gfx::Size& size);
|
void PlatformResizeCompositorWidget(const gfx::Size& size);
|
||||||
void PlatformDestroyCompositorWidget();
|
void PlatformDestroyCompositorWidget();
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
#undef Status // Avoid conflicts with url_request_status.h
|
||||||
|
|
||||||
#include "libcef/browser/browser_host_impl.h"
|
|
||||||
#include "libcef/browser/native/window_x11.h"
|
#include "libcef/browser/native/window_x11.h"
|
||||||
|
|
||||||
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
||||||
@ -166,13 +166,15 @@ XCursorCache* cursor_cache = nullptr;
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget(
|
||||||
|
bool is_guest_view_hack) {
|
||||||
// Create a hidden 1x1 window. It will delete itself on close.
|
// Create a hidden 1x1 window. It will delete itself on close.
|
||||||
window_ = new CefWindowX11(NULL, None, gfx::Rect(0, 0, 1, 1));
|
window_ = new CefWindowX11(NULL, None, gfx::Rect(0, 0, 1, 1));
|
||||||
compositor_widget_ = window_->xwindow();
|
compositor_widget_ = window_->xwindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(
|
||||||
|
const gfx::Size&) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||||
|
@ -128,7 +128,8 @@ content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
|
|||||||
return browser_compositor_->GetDelegatedFrameHost();
|
return browser_compositor_->GetDelegatedFrameHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget(
|
||||||
|
bool is_guest_view_hack) {
|
||||||
// Create a borderless non-visible 1x1 window.
|
// Create a borderless non-visible 1x1 window.
|
||||||
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
||||||
styleMask:NSBorderlessWindowMask
|
styleMask:NSBorderlessWindowMask
|
||||||
@ -144,7 +145,8 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
|||||||
|
|
||||||
mac_helper_ = new MacHelper(this);
|
mac_helper_ = new MacHelper(this);
|
||||||
browser_compositor_.reset(new content::BrowserCompositorMac(
|
browser_compositor_.reset(new content::BrowserCompositorMac(
|
||||||
mac_helper_, mac_helper_, render_widget_host_->is_hidden(), true));
|
mac_helper_, mac_helper_, render_widget_host_->is_hidden(), true,
|
||||||
|
AllocateFrameSinkId(is_guest_view_hack)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size&) {
|
||||||
|
@ -143,13 +143,15 @@ bool IsSystemCursorID(LPCWSTR cursor_id) {
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget(
|
||||||
|
bool is_guest_view_hack) {
|
||||||
DCHECK(!window_);
|
DCHECK(!window_);
|
||||||
window_.reset(new CefCompositorHostWin());
|
window_.reset(new CefCompositorHostWin());
|
||||||
compositor_widget_ = window_->hwnd();
|
compositor_widget_ = window_->hwnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(const gfx::Size& size) {
|
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(
|
||||||
|
const gfx::Size& size) {
|
||||||
DCHECK(window_);
|
DCHECK(window_);
|
||||||
SetWindowPos(window_->hwnd(), NULL, 0, 0, size.width(), size.height(),
|
SetWindowPos(window_->hwnd(), NULL, 0, 0, size.width(), size.height(),
|
||||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE);
|
SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "libcef/browser/osr/render_widget_host_view_osr.h"
|
#include "libcef/browser/osr/render_widget_host_view_osr.h"
|
||||||
#include "libcef/browser/thread_util.h"
|
#include "libcef/browser/thread_util.h"
|
||||||
|
|
||||||
#include "third_party/skia/include/core/SkDevice.h"
|
#include "third_party/skia/src/core/SkDevice.h"
|
||||||
#include "ui/compositor/compositor.h"
|
#include "ui/compositor/compositor.h"
|
||||||
#include "ui/gfx/skia_util.h"
|
#include "ui/gfx/skia_util.h"
|
||||||
|
|
||||||
|
@ -99,8 +99,10 @@ content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget(
|
|||||||
embedder_render_widget_host->GetView());
|
embedder_render_widget_host->GetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool is_guest_view_hack = !!embedder_render_widget_host;
|
||||||
return new CefRenderWidgetHostViewOSR(transparent_, render_widget_host,
|
return new CefRenderWidgetHostViewOSR(transparent_, render_widget_host,
|
||||||
embedder_host_view);
|
embedder_host_view,
|
||||||
|
is_guest_view_hack);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called for popup and fullscreen widgets.
|
// Called for popup and fullscreen widgets.
|
||||||
@ -110,7 +112,8 @@ content::RenderWidgetHostViewBase*
|
|||||||
CefRenderWidgetHostViewOSR* view = GetView();
|
CefRenderWidgetHostViewOSR* view = GetView();
|
||||||
CHECK(view);
|
CHECK(view);
|
||||||
|
|
||||||
return new CefRenderWidgetHostViewOSR(transparent_, render_widget_host, view);
|
return new CefRenderWidgetHostViewOSR(transparent_, render_widget_host, view,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {
|
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {
|
||||||
|
@ -159,12 +159,11 @@ void CefPermissionContext::DecidePermission(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentSetting content_setting =
|
ContentSetting content_setting =
|
||||||
profile_->GetHostContentSettingsMap()->
|
profile_->GetHostContentSettingsMap()->GetContentSetting(
|
||||||
GetContentSettingAndMaybeUpdateLastUsage(
|
requesting_origin,
|
||||||
requesting_origin,
|
embedding_origin,
|
||||||
embedding_origin,
|
permission_util::PermissionTypeToContentSetting(permission),
|
||||||
permission_util::PermissionTypeToContentSetting(permission),
|
std::string());
|
||||||
std::string());
|
|
||||||
|
|
||||||
if (content_setting == CONTENT_SETTING_ALLOW ||
|
if (content_setting == CONTENT_SETTING_ALLOW ||
|
||||||
content_setting == CONTENT_SETTING_BLOCK) {
|
content_setting == CONTENT_SETTING_BLOCK) {
|
||||||
|
@ -294,21 +294,6 @@ PermissionStatus CefPermissionManager::GetPermissionStatus(
|
|||||||
embedding_origin));
|
embedding_origin));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefPermissionManager::RegisterPermissionUsage(
|
|
||||||
PermissionType permission,
|
|
||||||
const GURL& requesting_origin,
|
|
||||||
const GURL& embedding_origin) {
|
|
||||||
// This is required because constant permissions don't have a
|
|
||||||
// ContentSettingsType.
|
|
||||||
if (IsConstantPermission(permission))
|
|
||||||
return;
|
|
||||||
|
|
||||||
profile_->GetHostContentSettingsMap()->UpdateLastUsage(
|
|
||||||
requesting_origin,
|
|
||||||
embedding_origin,
|
|
||||||
permission_util::PermissionTypeToContentSetting(permission));
|
|
||||||
}
|
|
||||||
|
|
||||||
int CefPermissionManager::SubscribePermissionStatusChange(
|
int CefPermissionManager::SubscribePermissionStatusChange(
|
||||||
PermissionType permission,
|
PermissionType permission,
|
||||||
const GURL& requesting_origin,
|
const GURL& requesting_origin,
|
||||||
|
@ -55,9 +55,6 @@ class CefPermissionManager : public KeyedService,
|
|||||||
content::PermissionType permission,
|
content::PermissionType permission,
|
||||||
const GURL& requesting_origin,
|
const GURL& requesting_origin,
|
||||||
const GURL& embedding_origin) override;
|
const GURL& embedding_origin) override;
|
||||||
void RegisterPermissionUsage(content::PermissionType permission,
|
|
||||||
const GURL& requesting_origin,
|
|
||||||
const GURL& embedding_origin) override;
|
|
||||||
int SubscribePermissionStatusChange(
|
int SubscribePermissionStatusChange(
|
||||||
content::PermissionType permission,
|
content::PermissionType permission,
|
||||||
const GURL& requesting_origin,
|
const GURL& requesting_origin,
|
||||||
|
@ -280,7 +280,7 @@ void SetBool(CommandLinePrefStore* prefs,
|
|||||||
const std::string& key,
|
const std::string& key,
|
||||||
bool value) {
|
bool value) {
|
||||||
prefs->SetValue(key,
|
prefs->SetValue(key,
|
||||||
base::WrapUnique(new base::FundamentalValue(value)),
|
base::WrapUnique(new base::Value(value)),
|
||||||
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
|
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "base/auto_reset.h"
|
#include "base/auto_reset.h"
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
|
#include "base/feature_list.h"
|
||||||
#include "base/location.h"
|
#include "base/location.h"
|
||||||
#include "base/memory/ptr_util.h"
|
#include "base/memory/ptr_util.h"
|
||||||
#include "base/run_loop.h"
|
#include "base/run_loop.h"
|
||||||
@ -23,6 +24,7 @@
|
|||||||
#include "chrome/browser/printing/print_job_manager.h"
|
#include "chrome/browser/printing/print_job_manager.h"
|
||||||
#include "chrome/browser/printing/printer_query.h"
|
#include "chrome/browser/printing/printer_query.h"
|
||||||
#include "chrome/browser/profiles/profile.h"
|
#include "chrome/browser/profiles/profile.h"
|
||||||
|
#include "chrome/common/chrome_features.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
#include "chrome/grit/generated_resources.h"
|
#include "chrome/grit/generated_resources.h"
|
||||||
#include "components/prefs/pref_service.h"
|
#include "components/prefs/pref_service.h"
|
||||||
@ -163,24 +165,40 @@ void CefPrintViewManagerBase::OnDidPrintPage(
|
|||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
print_job_->AppendPrintedPage(params.page_number);
|
print_job_->AppendPrintedPage(params.page_number);
|
||||||
if (metafile_must_be_valid) {
|
if (metafile_must_be_valid) {
|
||||||
// TODO(thestig): Figure out why rendering text with GDI results in random
|
|
||||||
// missing characters for some users. https://crbug.com/658606
|
|
||||||
bool print_text_with_gdi =
|
|
||||||
document->settings().print_text_with_gdi() &&
|
|
||||||
!document->settings().printer_is_xps() &&
|
|
||||||
switches::GDITextPrintingEnabled();
|
|
||||||
scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(
|
scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(
|
||||||
reinterpret_cast<const unsigned char*>(shared_buf->memory()),
|
reinterpret_cast<const unsigned char*>(shared_buf->memory()),
|
||||||
params.data_size);
|
params.data_size);
|
||||||
|
|
||||||
document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf"));
|
document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf"));
|
||||||
print_job_->StartPdfToEmfConversion(
|
|
||||||
bytes, params.page_size, params.content_area,
|
const auto& settings = document->settings();
|
||||||
print_text_with_gdi);
|
if ((settings.printer_is_ps2() || settings.printer_is_ps3()) &&
|
||||||
|
base::FeatureList::IsEnabled(features::kPostScriptPrinting)) {
|
||||||
|
print_job_->StartPdfToPostScriptConversion(bytes, params.content_area,
|
||||||
|
params.physical_offsets,
|
||||||
|
settings.printer_is_ps2());
|
||||||
|
} else {
|
||||||
|
// TODO(thestig): Figure out why rendering text with GDI results in random
|
||||||
|
// missing characters for some users. https://crbug.com/658606
|
||||||
|
// Update : The missing letters seem to have been caused by the same
|
||||||
|
// problem as https://crbug.com/659604 which was resolved. GDI printing
|
||||||
|
// seems to work with the fix for this bug applied.
|
||||||
|
bool print_text_with_gdi = settings.print_text_with_gdi() &&
|
||||||
|
!settings.printer_is_xps() &&
|
||||||
|
base::FeatureList::IsEnabled(
|
||||||
|
features::kGdiTextPrinting);
|
||||||
|
print_job_->StartPdfToEmfConversion(
|
||||||
|
bytes, params.page_size, params.content_area, print_text_with_gdi);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Update the rendered document. It will send notifications to the listener.
|
// Update the rendered document. It will send notifications to the listener.
|
||||||
document->SetPage(params.page_number, std::move(metafile), params.page_size,
|
document->SetPage(params.page_number,
|
||||||
|
std::move(metafile),
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
0.0f /* dummy shrink_factor */,
|
||||||
|
#endif
|
||||||
|
params.page_size,
|
||||||
params.content_area);
|
params.content_area);
|
||||||
|
|
||||||
ShouldQuitFromInnerMessageLoop();
|
ShouldQuitFromInnerMessageLoop();
|
||||||
|
@ -73,6 +73,14 @@ void CefResourceContext::SetUserData(const void* key, Data* data) {
|
|||||||
content::ResourceContext::SetUserData(key, data);
|
content::ResourceContext::SetUserData(key, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefResourceContext::SetUserData(const void* key,
|
||||||
|
std::unique_ptr<Data> data) {
|
||||||
|
if (parent_ && ShouldProxyUserData(key))
|
||||||
|
parent_->SetUserData(key, std::move(data));
|
||||||
|
else
|
||||||
|
content::ResourceContext::SetUserData(key, std::move(data));
|
||||||
|
}
|
||||||
|
|
||||||
void CefResourceContext::RemoveUserData(const void* key) {
|
void CefResourceContext::RemoveUserData(const void* key) {
|
||||||
if (parent_ && ShouldProxyUserData(key))
|
if (parent_ && ShouldProxyUserData(key))
|
||||||
parent_->RemoveUserData(key);
|
parent_->RemoveUserData(key);
|
||||||
|
@ -35,6 +35,7 @@ class CefResourceContext : public content::ResourceContext {
|
|||||||
// SupportsUserData implementation.
|
// SupportsUserData implementation.
|
||||||
Data* GetUserData(const void* key) const override;
|
Data* GetUserData(const void* key) const override;
|
||||||
void SetUserData(const void* key, Data* data) override;
|
void SetUserData(const void* key, Data* data) override;
|
||||||
|
void SetUserData(const void* key, std::unique_ptr<Data> data) override;
|
||||||
void RemoveUserData(const void* key) override;
|
void RemoveUserData(const void* key) override;
|
||||||
|
|
||||||
// ResourceContext implementation.
|
// ResourceContext implementation.
|
||||||
|
@ -91,6 +91,11 @@ CefStoragePartitionProxy::GetBroadcastChannelProvider() {
|
|||||||
return parent_->GetBroadcastChannelProvider();
|
return parent_->GetBroadcastChannelProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
content::BluetoothAllowedDevicesMap*
|
||||||
|
CefStoragePartitionProxy::GetBluetoothAllowedDevicesMap() {
|
||||||
|
return parent_->GetBluetoothAllowedDevicesMap();
|
||||||
|
}
|
||||||
|
|
||||||
void CefStoragePartitionProxy::ClearDataForOrigin(
|
void CefStoragePartitionProxy::ClearDataForOrigin(
|
||||||
uint32_t remove_mask,
|
uint32_t remove_mask,
|
||||||
uint32_t quota_storage_remove_mask,
|
uint32_t quota_storage_remove_mask,
|
||||||
@ -129,6 +134,10 @@ void CefStoragePartitionProxy::Flush() {
|
|||||||
parent_->Flush();
|
parent_->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefStoragePartitionProxy::ClearBluetoothAllowedDevicesMapForTesting() {
|
||||||
|
parent_->ClearBluetoothAllowedDevicesMapForTesting();
|
||||||
|
}
|
||||||
|
|
||||||
void CefStoragePartitionProxy::Bind(
|
void CefStoragePartitionProxy::Bind(
|
||||||
mojo::InterfaceRequest<content::mojom::StoragePartitionService> request) {
|
mojo::InterfaceRequest<content::mojom::StoragePartitionService> request) {
|
||||||
parent_->Bind(std::move(request));
|
parent_->Bind(std::move(request));
|
||||||
|
@ -39,6 +39,7 @@ class CefStoragePartitionProxy : public content::StoragePartition {
|
|||||||
content::BackgroundSyncContext* GetBackgroundSyncContext() override;
|
content::BackgroundSyncContext* GetBackgroundSyncContext() override;
|
||||||
content::PaymentAppContextImpl* GetPaymentAppContext() override;
|
content::PaymentAppContextImpl* GetPaymentAppContext() override;
|
||||||
content::BroadcastChannelProvider* GetBroadcastChannelProvider() override;
|
content::BroadcastChannelProvider* GetBroadcastChannelProvider() override;
|
||||||
|
content::BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() override;
|
||||||
void ClearDataForOrigin(uint32_t remove_mask,
|
void ClearDataForOrigin(uint32_t remove_mask,
|
||||||
uint32_t quota_storage_remove_mask,
|
uint32_t quota_storage_remove_mask,
|
||||||
const GURL& storage_origin,
|
const GURL& storage_origin,
|
||||||
@ -59,6 +60,7 @@ class CefStoragePartitionProxy : public content::StoragePartition {
|
|||||||
const base::Time end,
|
const base::Time end,
|
||||||
const base::Closure& callback) override;
|
const base::Closure& callback) override;
|
||||||
void Flush() override;
|
void Flush() override;
|
||||||
|
void ClearBluetoothAllowedDevicesMapForTesting() override;
|
||||||
void Bind(
|
void Bind(
|
||||||
mojo::InterfaceRequest<content::mojom::StoragePartitionService> request)
|
mojo::InterfaceRequest<content::mojom::StoragePartitionService> request)
|
||||||
override;
|
override;
|
||||||
|
@ -41,14 +41,15 @@ CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// views::CustomButton methods:
|
// views::CustomButton methods:
|
||||||
void StateChanged() override;
|
void StateChanged(views::CustomButton::ButtonState old_state) override;
|
||||||
|
|
||||||
// views::ButtonListener methods:
|
// views::ButtonListener methods:
|
||||||
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged() {
|
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged(
|
||||||
ParentClass::StateChanged();
|
views::CustomButton::ButtonState old_state) {
|
||||||
|
ParentClass::StateChanged(old_state);
|
||||||
if (ParentClass::cef_delegate())
|
if (ParentClass::cef_delegate())
|
||||||
ParentClass::cef_delegate()->OnButtonStateChanged(GetCefButton());
|
ParentClass::cef_delegate()->OnButtonStateChanged(GetCefButton());
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,9 @@ CefCrashReportUploadThread::CefCrashReportUploadThread(
|
|||||||
CrashReportDatabase* database,
|
CrashReportDatabase* database,
|
||||||
const std::string& url,
|
const std::string& url,
|
||||||
bool rate_limit,
|
bool rate_limit,
|
||||||
|
bool upload_gzip,
|
||||||
int max_uploads)
|
int max_uploads)
|
||||||
: CrashReportUploadThread(database, url, rate_limit),
|
: CrashReportUploadThread(database, url, rate_limit, upload_gzip),
|
||||||
max_uploads_(max_uploads) {
|
max_uploads_(max_uploads) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ class CefCrashReportUploadThread : public crashpad::CrashReportUploadThread {
|
|||||||
CefCrashReportUploadThread(crashpad::CrashReportDatabase* database,
|
CefCrashReportUploadThread(crashpad::CrashReportDatabase* database,
|
||||||
const std::string& url,
|
const std::string& url,
|
||||||
bool rate_limit,
|
bool rate_limit,
|
||||||
|
bool upload_gzip,
|
||||||
int max_uploads);
|
int max_uploads);
|
||||||
~CefCrashReportUploadThread();
|
~CefCrashReportUploadThread();
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ class CefContentClient : public content::ContentClient,
|
|||||||
// A scheme that can be sent CORS requests. This value should be true in
|
// A scheme that can be sent CORS requests. This value should be true in
|
||||||
// most cases where |is_standard| is true.
|
// most cases where |is_standard| is true.
|
||||||
bool is_cors_enabled;
|
bool is_cors_enabled;
|
||||||
|
|
||||||
|
// A scheme that can bypass Content-Security-Policy (CSP) checks. This value
|
||||||
|
// should be false in most cases where |is_standard| is true.
|
||||||
|
bool is_csp_bypassing;
|
||||||
};
|
};
|
||||||
typedef std::list<SchemeInfo> SchemeInfoList;
|
typedef std::list<SchemeInfo> SchemeInfoList;
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include "libcef/browser/stream_impl.h"
|
#include "libcef/browser/stream_impl.h"
|
||||||
#include "libcef/common/drag_data_impl.h"
|
#include "libcef/common/drag_data_impl.h"
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "net/base/filename_util.h"
|
|
||||||
|
|
||||||
#define CHECK_READONLY_RETURN_VOID() \
|
#define CHECK_READONLY_RETURN_VOID() \
|
||||||
if (read_only_) { \
|
if (read_only_) { \
|
||||||
@ -44,18 +43,21 @@ bool CefDragDataImpl::IsReadOnly() {
|
|||||||
|
|
||||||
bool CefDragDataImpl::IsLink() {
|
bool CefDragDataImpl::IsLink() {
|
||||||
base::AutoLock lock_scope(lock_);
|
base::AutoLock lock_scope(lock_);
|
||||||
return (data_.url.is_valid() && data_.file_description_filename.empty());
|
return (data_.url.is_valid() &&
|
||||||
|
data_.file_contents_content_disposition.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefDragDataImpl::IsFragment() {
|
bool CefDragDataImpl::IsFragment() {
|
||||||
base::AutoLock lock_scope(lock_);
|
base::AutoLock lock_scope(lock_);
|
||||||
return (!data_.url.is_valid() && data_.file_description_filename.empty() &&
|
return (!data_.url.is_valid() &&
|
||||||
|
data_.file_contents_content_disposition.empty() &&
|
||||||
data_.filenames.empty());
|
data_.filenames.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefDragDataImpl::IsFile() {
|
bool CefDragDataImpl::IsFile() {
|
||||||
base::AutoLock lock_scope(lock_);
|
base::AutoLock lock_scope(lock_);
|
||||||
return (!data_.file_description_filename.empty() || !data_.filenames.empty());
|
return (!data_.file_contents_content_disposition.empty() ||
|
||||||
|
!data_.filenames.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
CefString CefDragDataImpl::GetLinkURL() {
|
CefString CefDragDataImpl::GetLinkURL() {
|
||||||
@ -90,20 +92,12 @@ CefString CefDragDataImpl::GetFragmentBaseURL() {
|
|||||||
|
|
||||||
CefString CefDragDataImpl::GetFileName() {
|
CefString CefDragDataImpl::GetFileName() {
|
||||||
base::AutoLock lock_scope(lock_);
|
base::AutoLock lock_scope(lock_);
|
||||||
if (data_.file_description_filename.empty())
|
if (data_.file_contents_content_disposition.empty())
|
||||||
return CefString();
|
return CefString();
|
||||||
|
|
||||||
base::FilePath file_name(CefString(data_.file_description_filename));
|
base::Optional<base::FilePath> filename =
|
||||||
// Images without ALT text will only have a file extension so we need to
|
data_.GetSafeFilenameForImageFileContents();
|
||||||
// synthesize one from the provided extension and URL.
|
return filename ? CefString(filename->value()) : CefString();
|
||||||
if (file_name.BaseName().RemoveExtension().empty()) {
|
|
||||||
base::FilePath::StringType extension = file_name.Extension();
|
|
||||||
// Retrieve the name from the URL.
|
|
||||||
CefString suggested_file_name =
|
|
||||||
net::GetSuggestedFilename(data_.url, "", "", "", "", "");
|
|
||||||
file_name = base::FilePath(suggested_file_name).ReplaceExtension(extension);
|
|
||||||
}
|
|
||||||
return file_name.value();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CefDragDataImpl::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
|
size_t CefDragDataImpl::GetFileContents(CefRefPtr<CefStreamWriter> writer) {
|
||||||
@ -173,7 +167,9 @@ void CefDragDataImpl::ResetFileContents() {
|
|||||||
base::AutoLock lock_scope(lock_);
|
base::AutoLock lock_scope(lock_);
|
||||||
CHECK_READONLY_RETURN_VOID();
|
CHECK_READONLY_RETURN_VOID();
|
||||||
data_.file_contents.erase();
|
data_.file_contents.erase();
|
||||||
data_.file_description_filename.erase();
|
data_.file_contents_source_url = GURL();
|
||||||
|
data_.file_contents_filename_extension.erase();
|
||||||
|
data_.file_contents_content_disposition.erase();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefDragDataImpl::AddFile(const CefString& path,
|
void CefDragDataImpl::AddFile(const CefString& path,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// This file defines extension APIs implemented in CEF.
|
// This file defines extension APIs implemented in CEF.
|
||||||
// See extensions/common/features/* to understand this file, in particular
|
// See extensions/common/features/* to understand this file, in particular
|
||||||
// feature.h, simple_feature.h, and base_feature_provider.h.
|
// feature.h, simple_feature.h, and feature_provider.h.
|
||||||
|
|
||||||
// If APIs are defined in chrome then entries must also be added in
|
// If APIs are defined in chrome then entries must also be added in
|
||||||
// libcef/browser/extensions/chrome_api_registration.cc.
|
// libcef/browser/extensions/chrome_api_registration.cc.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// This file defines permissions for extension APIs implemented by CEF.
|
// This file defines permissions for extension APIs implemented by CEF.
|
||||||
// See extensions/common/features/* to understand this file, in particular
|
// See extensions/common/features/* to understand this file, in particular
|
||||||
// feature.h, simple_feature.h, and base_feature_provider.h.
|
// feature.h, simple_feature.h, and feature_provider.h.
|
||||||
|
|
||||||
// If APIs are defined in chrome then entries must also be added in
|
// If APIs are defined in chrome then entries must also be added in
|
||||||
// libcef/browser/extensions/chrome_api_registration.cc.
|
// libcef/browser/extensions/chrome_api_registration.cc.
|
||||||
|
@ -25,7 +25,8 @@ void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
|
|||||||
false, /* is_local */
|
false, /* is_local */
|
||||||
false, /* is_display_isolated */
|
false, /* is_display_isolated */
|
||||||
true, /* is_secure */
|
true, /* is_secure */
|
||||||
true /* is_cors_enabled */
|
true, /* is_cors_enabled */
|
||||||
|
true, /* is_csp_bypassing */
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -42,6 +43,8 @@ void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
|
|||||||
schemes->secure_schemes.push_back(internal_schemes[i].scheme_name);
|
schemes->secure_schemes.push_back(internal_schemes[i].scheme_name);
|
||||||
if (internal_schemes[i].is_cors_enabled)
|
if (internal_schemes[i].is_cors_enabled)
|
||||||
schemes->cors_enabled_schemes.push_back(internal_schemes[i].scheme_name);
|
schemes->cors_enabled_schemes.push_back(internal_schemes[i].scheme_name);
|
||||||
|
if (internal_schemes[i].is_csp_bypassing)
|
||||||
|
schemes->csp_bypassing_schemes.push_back(internal_schemes[i].scheme_name);
|
||||||
client->AddCustomScheme(internal_schemes[i]);
|
client->AddCustomScheme(internal_schemes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/strings/sys_string_conversions.h"
|
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "components/navigation_interception/navigation_params.h"
|
#include "components/navigation_interception/navigation_params.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
@ -139,9 +138,9 @@ std::string GetURLRequestReferrer(const GURL& referrer_url) {
|
|||||||
blink::WebString FilePathStringToWebString(
|
blink::WebString FilePathStringToWebString(
|
||||||
const base::FilePath::StringType& str) {
|
const base::FilePath::StringType& str) {
|
||||||
#if defined(OS_POSIX)
|
#if defined(OS_POSIX)
|
||||||
return base::WideToUTF16(base::SysNativeMBToWide(str));
|
return blink::WebString::fromUTF8(str);
|
||||||
#elif defined(OS_WIN)
|
#elif defined(OS_WIN)
|
||||||
return base::WideToUTF16(str);
|
return blink::WebString::fromUTF16(str);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,8 +178,8 @@ void GetHeaderMap(const blink::WebURLRequest& request,
|
|||||||
|
|
||||||
void visitHeader(const blink::WebString& name,
|
void visitHeader(const blink::WebString& name,
|
||||||
const blink::WebString& value) override {
|
const blink::WebString& value) override {
|
||||||
const base::string16& nameStr = name;
|
const base::string16& nameStr = name.utf16();
|
||||||
const base::string16& valueStr = value;
|
const base::string16& valueStr = value.utf16();
|
||||||
if (base::LowerCaseEqualsASCII(nameStr, kReferrerLowerCase))
|
if (base::LowerCaseEqualsASCII(nameStr, kReferrerLowerCase))
|
||||||
*referrer_ = GURL(valueStr);
|
*referrer_ = GURL(valueStr);
|
||||||
else
|
else
|
||||||
@ -216,8 +215,8 @@ void SetHeaderMap(const CefRequest::HeaderMap& map,
|
|||||||
blink::WebURLRequest& request) {
|
blink::WebURLRequest& request) {
|
||||||
CefRequest::HeaderMap::const_iterator it = map.begin();
|
CefRequest::HeaderMap::const_iterator it = map.begin();
|
||||||
for (; it != map.end(); ++it) {
|
for (; it != map.end(); ++it) {
|
||||||
request.setHTTPHeaderField(base::string16(it->first),
|
request.setHTTPHeaderField(blink::WebString::fromUTF16(it->first),
|
||||||
base::string16(it->second));
|
blink::WebString::fromUTF16(it->second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,7 +619,7 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
|
|||||||
blink::WebURLRequest& request) {
|
blink::WebURLRequest& request) {
|
||||||
request.setURL(params.url);
|
request.setURL(params.url);
|
||||||
if (!params.method.empty())
|
if (!params.method.empty())
|
||||||
request.setHTTPMethod(base::ASCIIToUTF16(params.method));
|
request.setHTTPMethod(blink::WebString::fromASCII(params.method));
|
||||||
|
|
||||||
if (params.referrer.is_valid()) {
|
if (params.referrer.is_valid()) {
|
||||||
const blink::WebString& referrer =
|
const blink::WebString& referrer =
|
||||||
@ -645,18 +644,18 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.upload_data.get()) {
|
if (params.upload_data.get()) {
|
||||||
const base::string16& method = request.httpMethod();
|
const base::string16& method = request.httpMethod().utf16();
|
||||||
if (method == base::ASCIIToUTF16("GET") ||
|
if (method == base::ASCIIToUTF16("GET") ||
|
||||||
method == base::ASCIIToUTF16("HEAD")) {
|
method == base::ASCIIToUTF16("HEAD")) {
|
||||||
request.setHTTPMethod(base::ASCIIToUTF16("POST"));
|
request.setHTTPMethod(blink::WebString::fromASCII("POST"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The comparison performed by httpHeaderField() is case insensitive.
|
// The comparison performed by httpHeaderField() is case insensitive.
|
||||||
if (request.httpHeaderField(base::ASCIIToUTF16(
|
if (request.httpHeaderField(blink::WebString::fromASCII(
|
||||||
net::HttpRequestHeaders::kContentType)).length()== 0) {
|
net::HttpRequestHeaders::kContentType)).length()== 0) {
|
||||||
request.setHTTPHeaderField(
|
request.setHTTPHeaderField(
|
||||||
base::ASCIIToUTF16(net::HttpRequestHeaders::kContentType),
|
blink::WebString::fromASCII(net::HttpRequestHeaders::kContentType),
|
||||||
base::ASCIIToUTF16(kApplicationFormURLEncoded));
|
blink::WebString::fromASCII(kApplicationFormURLEncoded));
|
||||||
}
|
}
|
||||||
|
|
||||||
blink::WebHTTPBody body;
|
blink::WebHTTPBody body;
|
||||||
@ -1314,7 +1313,7 @@ void CefPostDataElementImpl::Set(const blink::WebHTTPBody::Element& element) {
|
|||||||
SetToBytes(element.data.size(),
|
SetToBytes(element.data.size(),
|
||||||
static_cast<const void*>(element.data.data()));
|
static_cast<const void*>(element.data.data()));
|
||||||
} else if (element.type == blink::WebHTTPBody::Element::TypeFile) {
|
} else if (element.type == blink::WebHTTPBody::Element::TypeFile) {
|
||||||
SetToFile(base::string16(element.filePath));
|
SetToFile(element.filePath.utf16());
|
||||||
} else {
|
} else {
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
}
|
}
|
||||||
@ -1329,7 +1328,8 @@ void CefPostDataElementImpl::Get(blink::WebHTTPBody::Element& element) const {
|
|||||||
static_cast<char*>(data_.bytes.bytes), data_.bytes.size);
|
static_cast<char*>(data_.bytes.bytes), data_.bytes.size);
|
||||||
} else if (type_ == PDE_TYPE_FILE) {
|
} else if (type_ == PDE_TYPE_FILE) {
|
||||||
element.type = blink::WebHTTPBody::Element::TypeFile;
|
element.type = blink::WebHTTPBody::Element::TypeFile;
|
||||||
element.filePath.assign(base::string16(CefString(&data_.filename)));
|
element.filePath.assign(
|
||||||
|
blink::WebString::fromUTF16(CefString(&data_.filename)));
|
||||||
} else {
|
} else {
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
}
|
}
|
||||||
|
@ -193,9 +193,9 @@ void CefResponseImpl::Set(const blink::WebURLResponse& response) {
|
|||||||
blink::WebString str;
|
blink::WebString str;
|
||||||
status_code_ = response.httpStatusCode();
|
status_code_ = response.httpStatusCode();
|
||||||
str = response.httpStatusText();
|
str = response.httpStatusText();
|
||||||
status_text_ = CefString(str);
|
status_text_ = str.utf16();
|
||||||
str = response.mimeType();
|
str = response.mimeType();
|
||||||
mime_type_ = CefString(str);
|
mime_type_ = str.utf16();
|
||||||
|
|
||||||
class HeaderVisitor : public blink::WebHTTPHeaderVisitor {
|
class HeaderVisitor : public blink::WebHTTPHeaderVisitor {
|
||||||
public:
|
public:
|
||||||
@ -203,8 +203,7 @@ void CefResponseImpl::Set(const blink::WebURLResponse& response) {
|
|||||||
|
|
||||||
void visitHeader(const blink::WebString& name,
|
void visitHeader(const blink::WebString& name,
|
||||||
const blink::WebString& value) override {
|
const blink::WebString& value) override {
|
||||||
map_->insert(std::make_pair(base::string16(name),
|
map_->insert(std::make_pair(name.utf16(), value.utf16()));
|
||||||
base::string16(value)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,7 +33,8 @@ bool CefSchemeRegistrarImpl::AddCustomScheme(
|
|||||||
bool is_local,
|
bool is_local,
|
||||||
bool is_display_isolated,
|
bool is_display_isolated,
|
||||||
bool is_secure,
|
bool is_secure,
|
||||||
bool is_cors_enabled) {
|
bool is_cors_enabled,
|
||||||
|
bool is_csp_bypassing) {
|
||||||
const std::string& scheme = base::ToLowerASCII(scheme_name.ToString());
|
const std::string& scheme = base::ToLowerASCII(scheme_name.ToString());
|
||||||
if (scheme::IsInternalHandledScheme(scheme) ||
|
if (scheme::IsInternalHandledScheme(scheme) ||
|
||||||
registered_schemes_.find(scheme) != registered_schemes_.end()) {
|
registered_schemes_.find(scheme) != registered_schemes_.end()) {
|
||||||
@ -52,10 +53,12 @@ bool CefSchemeRegistrarImpl::AddCustomScheme(
|
|||||||
schemes_.secure_schemes.push_back(scheme);
|
schemes_.secure_schemes.push_back(scheme);
|
||||||
if (is_cors_enabled)
|
if (is_cors_enabled)
|
||||||
schemes_.cors_enabled_schemes.push_back(scheme);
|
schemes_.cors_enabled_schemes.push_back(scheme);
|
||||||
|
if (is_csp_bypassing)
|
||||||
|
schemes_.csp_bypassing_schemes.push_back(scheme);
|
||||||
|
|
||||||
CefContentClient::SchemeInfo scheme_info = {
|
CefContentClient::SchemeInfo scheme_info = {
|
||||||
scheme, is_standard, is_local, is_display_isolated, is_secure,
|
scheme, is_standard, is_local, is_display_isolated, is_secure,
|
||||||
is_cors_enabled
|
is_cors_enabled, is_csp_bypassing
|
||||||
};
|
};
|
||||||
CefContentClient::Get()->AddCustomScheme(scheme_info);
|
CefContentClient::Get()->AddCustomScheme(scheme_info);
|
||||||
|
|
||||||
@ -68,4 +71,5 @@ void CefSchemeRegistrarImpl::GetSchemes(
|
|||||||
AppendArray(schemes_.local_schemes, &schemes->local_schemes);
|
AppendArray(schemes_.local_schemes, &schemes->local_schemes);
|
||||||
AppendArray(schemes_.secure_schemes, &schemes->secure_schemes);
|
AppendArray(schemes_.secure_schemes, &schemes->secure_schemes);
|
||||||
AppendArray(schemes_.cors_enabled_schemes, &schemes->cors_enabled_schemes);
|
AppendArray(schemes_.cors_enabled_schemes, &schemes->cors_enabled_schemes);
|
||||||
|
AppendArray(schemes_.csp_bypassing_schemes, &schemes->csp_bypassing_schemes);
|
||||||
}
|
}
|
||||||
|
@ -23,14 +23,12 @@ class CefSchemeRegistrarImpl : public CefSchemeRegistrar {
|
|||||||
bool is_local,
|
bool is_local,
|
||||||
bool is_display_isolated,
|
bool is_display_isolated,
|
||||||
bool is_secure,
|
bool is_secure,
|
||||||
bool is_cors_enabled) override;
|
bool is_cors_enabled,
|
||||||
|
bool is_csp_bypassing) override;
|
||||||
|
|
||||||
void GetSchemes(content::ContentClient::Schemes* schemes);
|
void GetSchemes(content::ContentClient::Schemes* schemes);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Verify that the object is being accessed from the correct thread.
|
|
||||||
bool VerifyContext();
|
|
||||||
|
|
||||||
content::ContentClient::Schemes schemes_;
|
content::ContentClient::Schemes schemes_;
|
||||||
std::set<std::string> registered_schemes_;
|
std::set<std::string> registered_schemes_;
|
||||||
|
|
||||||
|
@ -297,17 +297,17 @@ bool CefValueImpl::SetNull() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CefValueImpl::SetBool(bool value) {
|
bool CefValueImpl::SetBool(bool value) {
|
||||||
SetValue(new base::FundamentalValue(value));
|
SetValue(new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefValueImpl::SetInt(int value) {
|
bool CefValueImpl::SetInt(int value) {
|
||||||
SetValue(new base::FundamentalValue(value));
|
SetValue(new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefValueImpl::SetDouble(double value) {
|
bool CefValueImpl::SetDouble(double value) {
|
||||||
SetValue(new base::FundamentalValue(value));
|
SetValue(new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,7 +425,7 @@ CefRefPtr<CefBinaryValue> CefBinaryValue::Create(const void* data,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return new CefBinaryValueImpl(static_cast<char*>(const_cast<void*>(data)),
|
return new CefBinaryValueImpl(static_cast<char*>(const_cast<void*>(data)),
|
||||||
data_size, true);
|
data_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@ -453,12 +453,9 @@ CefBinaryValueImpl::CefBinaryValueImpl(base::BinaryValue* value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CefBinaryValueImpl::CefBinaryValueImpl(char* data,
|
CefBinaryValueImpl::CefBinaryValueImpl(char* data,
|
||||||
size_t data_size,
|
size_t data_size)
|
||||||
bool copy)
|
|
||||||
: CefValueBase<CefBinaryValue, base::BinaryValue>(
|
: CefValueBase<CefBinaryValue, base::BinaryValue>(
|
||||||
copy ? base::BinaryValue::CreateWithCopiedBuffer(data,
|
new base::BinaryValue(std::vector<char>(data, data + data_size)),
|
||||||
data_size).release() :
|
|
||||||
new base::BinaryValue(std::unique_ptr<char[]>(data), data_size),
|
|
||||||
NULL, kOwnerWillDelete, true, NULL) {
|
NULL, kOwnerWillDelete, true, NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -898,19 +895,19 @@ bool CefDictionaryValueImpl::SetNull(const CefString& key) {
|
|||||||
|
|
||||||
bool CefDictionaryValueImpl::SetBool(const CefString& key, bool value) {
|
bool CefDictionaryValueImpl::SetBool(const CefString& key, bool value) {
|
||||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||||
SetInternal(key, new base::FundamentalValue(value));
|
SetInternal(key, new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefDictionaryValueImpl::SetInt(const CefString& key, int value) {
|
bool CefDictionaryValueImpl::SetInt(const CefString& key, int value) {
|
||||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||||
SetInternal(key, new base::FundamentalValue(value));
|
SetInternal(key, new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefDictionaryValueImpl::SetDouble(const CefString& key, double value) {
|
bool CefDictionaryValueImpl::SetDouble(const CefString& key, double value) {
|
||||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||||
SetInternal(key, new base::FundamentalValue(value));
|
SetInternal(key, new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1301,19 +1298,19 @@ bool CefListValueImpl::SetNull(size_t index) {
|
|||||||
|
|
||||||
bool CefListValueImpl::SetBool(size_t index, bool value) {
|
bool CefListValueImpl::SetBool(size_t index, bool value) {
|
||||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||||
SetInternal(index, new base::FundamentalValue(value));
|
SetInternal(index, new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefListValueImpl::SetInt(size_t index, int value) {
|
bool CefListValueImpl::SetInt(size_t index, int value) {
|
||||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||||
SetInternal(index, new base::FundamentalValue(value));
|
SetInternal(index, new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefListValueImpl::SetDouble(size_t index, double value) {
|
bool CefListValueImpl::SetDouble(size_t index, double value) {
|
||||||
CEF_VALUE_VERIFY_RETURN(true, false);
|
CEF_VALUE_VERIFY_RETURN(true, false);
|
||||||
SetInternal(index, new base::FundamentalValue(value));
|
SetInternal(index, new base::Value(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,11 +143,9 @@ class CefBinaryValueImpl
|
|||||||
CefBinaryValueImpl(base::BinaryValue* value,
|
CefBinaryValueImpl(base::BinaryValue* value,
|
||||||
bool will_delete);
|
bool will_delete);
|
||||||
|
|
||||||
// If |copy| is false this object will take ownership of the specified |data|
|
// The data will always be copied.
|
||||||
// buffer instead of copying it.
|
|
||||||
CefBinaryValueImpl(char* data,
|
CefBinaryValueImpl(char* data,
|
||||||
size_t data_size,
|
size_t data_size);
|
||||||
bool copy);
|
|
||||||
|
|
||||||
// Return a copy of the value.
|
// Return a copy of the value.
|
||||||
base::BinaryValue* CopyValue();
|
base::BinaryValue* CopyValue();
|
||||||
|
@ -187,7 +187,7 @@ CefRefPtr<CefFrame> CefBrowserImpl::GetFrame(const CefString& name) {
|
|||||||
|
|
||||||
blink::WebView* web_view = render_view()->GetWebView();
|
blink::WebView* web_view = render_view()->GetWebView();
|
||||||
if (web_view) {
|
if (web_view) {
|
||||||
const blink::WebString& frame_name = name.ToString16();
|
const blink::WebString& frame_name = blink::WebString::fromUTF16(name);
|
||||||
// Search by assigned frame name (Frame::name).
|
// Search by assigned frame name (Frame::name).
|
||||||
WebFrame* frame = web_view->findFrameByName(frame_name,
|
WebFrame* frame = web_view->findFrameByName(frame_name,
|
||||||
web_view->mainFrame());
|
web_view->mainFrame());
|
||||||
@ -325,7 +325,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
|||||||
int64_t parent_id = frame->parent() == NULL ?
|
int64_t parent_id = frame->parent() == NULL ?
|
||||||
webkit_glue::kInvalidFrameId :
|
webkit_glue::kInvalidFrameId :
|
||||||
webkit_glue::GetIdentifier(frame->parent());
|
webkit_glue::GetIdentifier(frame->parent());
|
||||||
base::string16 name = frame->uniqueName();
|
base::string16 name = frame->uniqueName().utf16();
|
||||||
|
|
||||||
// Notify the browser that the frame has been identified.
|
// Notify the browser that the frame has been identified.
|
||||||
Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name));
|
Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name));
|
||||||
@ -562,7 +562,7 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
|
|||||||
|
|
||||||
if (is_javascript) {
|
if (is_javascript) {
|
||||||
web_frame->executeScript(
|
web_frame->executeScript(
|
||||||
WebScriptSource(base::UTF8ToUTF16(code),
|
WebScriptSource(blink::WebString::fromUTF8(code),
|
||||||
GURL(script_url),
|
GURL(script_url),
|
||||||
script_start_line));
|
script_start_line));
|
||||||
success = true;
|
success = true;
|
||||||
@ -596,7 +596,7 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
|
|||||||
success = true;
|
success = true;
|
||||||
} else if (web_frame->isWebLocalFrame() &&
|
} else if (web_frame->isWebLocalFrame() &&
|
||||||
web_frame->toWebLocalFrame()->executeCommand(
|
web_frame->toWebLocalFrame()->executeCommand(
|
||||||
base::UTF8ToUTF16(command))) {
|
blink::WebString::fromUTF8(command))) {
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,8 +151,9 @@ void AppendParams(const std::vector<base::string16>& additional_names,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < additional_names.size(); ++i) {
|
for (size_t i = 0; i < additional_names.size(); ++i) {
|
||||||
names[existing_size + i] = additional_names[i];
|
names[existing_size + i] = blink::WebString::fromUTF16(additional_names[i]);
|
||||||
values[existing_size + i] = additional_values[i];
|
values[existing_size + i] =
|
||||||
|
blink::WebString::fromUTF16(additional_values[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
existing_names->swap(names);
|
existing_names->swap(names);
|
||||||
|
@ -77,14 +77,14 @@ CefString CefDOMDocumentImpl::GetTitle() {
|
|||||||
const WebDocument& document = frame_->document();
|
const WebDocument& document = frame_->document();
|
||||||
const WebString& title = document.title();
|
const WebString& title = document.title();
|
||||||
if (!title.isNull())
|
if (!title.isNull())
|
||||||
str = title;
|
str = title.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetElementById(const CefString& id) {
|
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetElementById(const CefString& id) {
|
||||||
const WebDocument& document = frame_->document();
|
const WebDocument& document = frame_->document();
|
||||||
return GetOrCreateNode(document.getElementById(base::string16(id)));
|
return GetOrCreateNode(document.getElementById(WebString::fromUTF16(id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetFocusedNode() {
|
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetFocusedNode() {
|
||||||
@ -140,7 +140,7 @@ CefString CefDOMDocumentImpl::GetSelectionAsMarkup() {
|
|||||||
|
|
||||||
const WebString& markup = local_frame->selectionAsMarkup();
|
const WebString& markup = local_frame->selectionAsMarkup();
|
||||||
if (!markup.isNull())
|
if (!markup.isNull())
|
||||||
str = markup;
|
str = markup.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ CefString CefDOMDocumentImpl::GetSelectionAsText() {
|
|||||||
|
|
||||||
const WebString& text = local_frame->selectionAsText();
|
const WebString& text = local_frame->selectionAsText();
|
||||||
if (!text.isNull())
|
if (!text.isNull())
|
||||||
str = text;
|
str = text.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ CefString CefDOMDocumentImpl::GetCompleteURL(const CefString& partialURL) {
|
|||||||
return str;
|
return str;
|
||||||
|
|
||||||
const WebDocument& document = frame_->document();
|
const WebDocument& document = frame_->document();
|
||||||
const WebURL& url = document.completeURL(base::string16(partialURL));
|
const WebURL& url = document.completeURL(WebString::fromUTF16(partialURL));
|
||||||
if (!url.isNull()) {
|
if (!url.isNull()) {
|
||||||
GURL gurl = url;
|
GURL gurl = url;
|
||||||
str = gurl.spec();
|
str = gurl.spec();
|
||||||
|
@ -121,7 +121,8 @@ CefString CefDOMNodeImpl::GetFormControlElementType() {
|
|||||||
const WebFormControlElement& formElement =
|
const WebFormControlElement& formElement =
|
||||||
node_.toConst<WebFormControlElement>();
|
node_.toConst<WebFormControlElement>();
|
||||||
|
|
||||||
const base::string16& form_control_type = formElement.formControlType();
|
const base::string16& form_control_type =
|
||||||
|
formElement.formControlType().utf16();
|
||||||
str = form_control_type;
|
str = form_control_type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,7 +148,7 @@ CefString CefDOMNodeImpl::GetName() {
|
|||||||
|
|
||||||
const WebString& name = webkit_glue::GetNodeName(node_);
|
const WebString& name = webkit_glue::GetNodeName(node_);
|
||||||
if (!name.isNull())
|
if (!name.isNull())
|
||||||
str = name;
|
str = name.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -165,15 +166,16 @@ CefString CefDOMNodeImpl::GetValue() {
|
|||||||
node_.toConst<WebFormControlElement>();
|
node_.toConst<WebFormControlElement>();
|
||||||
|
|
||||||
base::string16 value;
|
base::string16 value;
|
||||||
const base::string16& form_control_type = formElement.formControlType();
|
const base::string16& form_control_type =
|
||||||
|
formElement.formControlType().utf16();
|
||||||
if (form_control_type == base::ASCIIToUTF16("text")) {
|
if (form_control_type == base::ASCIIToUTF16("text")) {
|
||||||
const WebInputElement& input_element =
|
const WebInputElement& input_element =
|
||||||
formElement.toConst<WebInputElement>();
|
formElement.toConst<WebInputElement>();
|
||||||
value = input_element.value();
|
value = input_element.value().utf16();
|
||||||
} else if (form_control_type == base::ASCIIToUTF16("select-one")) {
|
} else if (form_control_type == base::ASCIIToUTF16("select-one")) {
|
||||||
const WebSelectElement& select_element =
|
const WebSelectElement& select_element =
|
||||||
formElement.toConst<WebSelectElement>();
|
formElement.toConst<WebSelectElement>();
|
||||||
value = select_element.value();
|
value = select_element.value().utf16();
|
||||||
}
|
}
|
||||||
|
|
||||||
base::TrimWhitespace(value, base::TRIM_LEADING, &value);
|
base::TrimWhitespace(value, base::TRIM_LEADING, &value);
|
||||||
@ -184,7 +186,7 @@ CefString CefDOMNodeImpl::GetValue() {
|
|||||||
if (str.empty()) {
|
if (str.empty()) {
|
||||||
const WebString& value = node_.nodeValue();
|
const WebString& value = node_.nodeValue();
|
||||||
if (!value.isNull())
|
if (!value.isNull())
|
||||||
str = value;
|
str = value.utf16();
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
@ -197,7 +199,7 @@ bool CefDOMNodeImpl::SetValue(const CefString& value) {
|
|||||||
if (node_.isElementNode())
|
if (node_.isElementNode())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return webkit_glue::SetNodeValue(node_, base::string16(value));
|
return webkit_glue::SetNodeValue(node_, WebString::fromUTF16(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
CefString CefDOMNodeImpl::GetAsMarkup() {
|
CefString CefDOMNodeImpl::GetAsMarkup() {
|
||||||
@ -207,7 +209,7 @@ CefString CefDOMNodeImpl::GetAsMarkup() {
|
|||||||
|
|
||||||
const WebString& markup = webkit_glue::CreateNodeMarkup(node_);
|
const WebString& markup = webkit_glue::CreateNodeMarkup(node_);
|
||||||
if (!markup.isNull())
|
if (!markup.isNull())
|
||||||
str = markup;
|
str = markup.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -274,7 +276,7 @@ CefString CefDOMNodeImpl::GetElementTagName() {
|
|||||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||||
const WebString& tagname = element.tagName();
|
const WebString& tagname = element.tagName();
|
||||||
if (!tagname.isNull())
|
if (!tagname.isNull())
|
||||||
str = tagname;
|
str = tagname.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -302,7 +304,7 @@ bool CefDOMNodeImpl::HasElementAttribute(const CefString& attrName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||||
return element.hasAttribute(base::string16(attrName));
|
return element.hasAttribute(WebString::fromUTF16(attrName));
|
||||||
}
|
}
|
||||||
|
|
||||||
CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) {
|
CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) {
|
||||||
@ -316,9 +318,9 @@ CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const WebElement& element = node_.toConst<blink::WebElement>();
|
const WebElement& element = node_.toConst<blink::WebElement>();
|
||||||
const WebString& attr = element.getAttribute(base::string16(attrName));
|
const WebString& attr = element.getAttribute(WebString::fromUTF16(attrName));
|
||||||
if (!attr.isNull())
|
if (!attr.isNull())
|
||||||
str = attr;
|
str = attr.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -338,8 +340,8 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < len; ++i) {
|
for (unsigned int i = 0; i < len; ++i) {
|
||||||
base::string16 name = element.attributeLocalName(i);
|
base::string16 name = element.attributeLocalName(i).utf16();
|
||||||
base::string16 value = element.attributeValue(i);
|
base::string16 value = element.attributeValue(i).utf16();
|
||||||
attrMap.insert(std::make_pair(name, value));
|
attrMap.insert(std::make_pair(name, value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -355,8 +357,8 @@ bool CefDOMNodeImpl::SetElementAttribute(const CefString& attrName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebElement element = node_.to<blink::WebElement>();
|
WebElement element = node_.to<blink::WebElement>();
|
||||||
element.setAttribute(base::string16(attrName),
|
element.setAttribute(WebString::fromUTF16(attrName),
|
||||||
base::string16(value));
|
WebString::fromUTF16(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +375,7 @@ CefString CefDOMNodeImpl::GetElementInnerText() {
|
|||||||
WebElement element = node_.to<blink::WebElement>();
|
WebElement element = node_.to<blink::WebElement>();
|
||||||
const WebString& text = element.textContent();
|
const WebString& text = element.textContent();
|
||||||
if (!text.isNull())
|
if (!text.isNull())
|
||||||
str = text;
|
str = text.utf16();
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,8 @@ void CefFrameImpl::ExecuteJavaScript(const CefString& jsCode,
|
|||||||
if (frame_) {
|
if (frame_) {
|
||||||
GURL gurl = GURL(scriptUrl.ToString());
|
GURL gurl = GURL(scriptUrl.ToString());
|
||||||
frame_->executeScript(
|
frame_->executeScript(
|
||||||
blink::WebScriptSource(jsCode.ToString16(), gurl, startLine));
|
blink::WebScriptSource(WebString::fromUTF16(jsCode.ToString16()), gurl,
|
||||||
|
startLine));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +194,7 @@ CefString CefFrameImpl::GetName() {
|
|||||||
CEF_REQUIRE_RT_RETURN(name);
|
CEF_REQUIRE_RT_RETURN(name);
|
||||||
|
|
||||||
if (frame_)
|
if (frame_)
|
||||||
name = frame_->uniqueName();
|
name = frame_->uniqueName().utf16();
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "libcef/common/cef_messages.h"
|
#include "libcef/common/cef_messages.h"
|
||||||
#include "media/base/eme_constants.h"
|
#include "media/base/eme_constants.h"
|
||||||
#include "media/base/key_system_properties.h"
|
#include "media/base/key_system_properties.h"
|
||||||
|
#include "media/media_features.h"
|
||||||
#include "ppapi/features/features.h"
|
#include "ppapi/features/features.h"
|
||||||
|
|
||||||
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
||||||
@ -107,21 +108,21 @@ void AddPepperBasedWidevine(
|
|||||||
// as those may offer a higher level of protection.
|
// as those may offer a higher level of protection.
|
||||||
supported_codecs |= media::EME_CODEC_WEBM_OPUS;
|
supported_codecs |= media::EME_CODEC_WEBM_OPUS;
|
||||||
supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
|
supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
|
||||||
#if defined(USE_PROPRIETARY_CODECS)
|
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||||
supported_codecs |= media::EME_CODEC_MP4_AAC;
|
supported_codecs |= media::EME_CODEC_MP4_AAC;
|
||||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||||
|
|
||||||
for (size_t i = 0; i < codecs.size(); ++i) {
|
for (size_t i = 0; i < codecs.size(); ++i) {
|
||||||
if (codecs[i] == kCdmSupportedCodecVp8)
|
if (codecs[i] == kCdmSupportedCodecVp8)
|
||||||
supported_codecs |= media::EME_CODEC_WEBM_VP8;
|
supported_codecs |= media::EME_CODEC_WEBM_VP8;
|
||||||
if (codecs[i] == kCdmSupportedCodecVp9)
|
if (codecs[i] == kCdmSupportedCodecVp9)
|
||||||
supported_codecs |= media::EME_CODEC_WEBM_VP9;
|
supported_codecs |= media::EME_CODEC_WEBM_VP9;
|
||||||
#if defined(USE_PROPRIETARY_CODECS)
|
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||||
if (codecs[i] == kCdmSupportedCodecAvc1)
|
if (codecs[i] == kCdmSupportedCodecAvc1)
|
||||||
supported_codecs |= media::EME_CODEC_MP4_AVC1;
|
supported_codecs |= media::EME_CODEC_MP4_AVC1;
|
||||||
if (codecs[i] == kCdmSupportedCodecVp9)
|
if (codecs[i] == kCdmSupportedCodecVp9)
|
||||||
supported_codecs |= media::EME_CODEC_MP4_VP9;
|
supported_codecs |= media::EME_CODEC_MP4_VP9;
|
||||||
#endif // defined(USE_PROPRIETARY_CODECS)
|
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||||
}
|
}
|
||||||
|
|
||||||
using Robustness = cdm::WidevineKeySystemProperties::Robustness;
|
using Robustness = cdm::WidevineKeySystemProperties::Robustness;
|
||||||
|
@ -87,7 +87,7 @@ CefPluginPlaceholder* CefPluginPlaceholder::CreateLoadableMissingPlugin(
|
|||||||
|
|
||||||
// Will destroy itself when its WebViewPlugin is going away.
|
// Will destroy itself when its WebViewPlugin is going away.
|
||||||
return new CefPluginPlaceholder(render_frame, frame, params, html_data,
|
return new CefPluginPlaceholder(render_frame, frame, params, html_data,
|
||||||
params.mimeType);
|
params.mimeType.utf16());
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -1116,8 +1116,8 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
|||||||
v8::Local<v8::Context> context = GetV8Context();
|
v8::Local<v8::Context> context = GetV8Context();
|
||||||
v8::Context::Scope context_scope(context);
|
v8::Context::Scope context_scope(context);
|
||||||
|
|
||||||
const blink::WebString& source = code.ToString16();
|
const blink::WebString& source = blink::WebString::fromUTF16(code);
|
||||||
const blink::WebString& source_url = script_url.ToString16();
|
const blink::WebString& source_url = blink::WebString::fromUTF16(script_url);
|
||||||
|
|
||||||
v8::TryCatch try_catch(isolate);
|
v8::TryCatch try_catch(isolate);
|
||||||
try_catch.SetVerbose(true);
|
try_catch.SetVerbose(true);
|
||||||
|
@ -179,7 +179,7 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
|
|||||||
toLocalFrame(blink::toFrameIfNotDetached(context));
|
toLocalFrame(blink::toFrameIfNotDetached(context));
|
||||||
DCHECK(frame);
|
DCHECK(frame);
|
||||||
if (frame &&
|
if (frame &&
|
||||||
frame->script().canExecuteScripts(blink::AboutToExecuteScript)) {
|
frame->document()->canExecuteScripts(blink::AboutToExecuteScript)) {
|
||||||
func_rv = blink::V8ScriptRunner::callFunction(
|
func_rv = blink::V8ScriptRunner::callFunction(
|
||||||
function, frame->document(), receiver, argc, args, isolate);
|
function, frame->document(), receiver, argc, args, isolate);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "include/internal/cef_types.h"
|
#include "include/internal/cef_types.h"
|
||||||
#include "third_party/WebKit/Source/core/fetch/AccessControlStatus.h"
|
#include "third_party/WebKit/Source/platform/loader/fetch/AccessControlStatus.h"
|
||||||
#include "v8/include/v8.h"
|
#include "v8/include/v8.h"
|
||||||
|
|
||||||
namespace blink {
|
namespace blink {
|
||||||
|
@ -115,6 +115,9 @@ need to be translated for each locale.-->
|
|||||||
<message name="IDS_TEXT_FILES" desc="The description of the text file extensions in the select file dialog.">
|
<message name="IDS_TEXT_FILES" desc="The description of the text file extensions in the select file dialog.">
|
||||||
Text Files
|
Text Files
|
||||||
</message>
|
</message>
|
||||||
|
<message name="IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS" desc="The name of the No Spelling Suggestions display in the content area context menu">
|
||||||
|
&No spelling suggestions
|
||||||
|
</message>
|
||||||
</messages>
|
</messages>
|
||||||
</release>
|
</release>
|
||||||
</grit>
|
</grit>
|
||||||
|
@ -20,7 +20,7 @@ namespace {
|
|||||||
int CEF_CALLBACK scheme_registrar_add_custom_scheme(
|
int CEF_CALLBACK scheme_registrar_add_custom_scheme(
|
||||||
struct _cef_scheme_registrar_t* self, const cef_string_t* scheme_name,
|
struct _cef_scheme_registrar_t* self, const cef_string_t* scheme_name,
|
||||||
int is_standard, int is_local, int is_display_isolated, int is_secure,
|
int is_standard, int is_local, int is_display_isolated, int is_secure,
|
||||||
int is_cors_enabled) {
|
int is_cors_enabled, int is_csp_bypassing) {
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||||
|
|
||||||
DCHECK(self);
|
DCHECK(self);
|
||||||
@ -38,7 +38,8 @@ int CEF_CALLBACK scheme_registrar_add_custom_scheme(
|
|||||||
is_local?true:false,
|
is_local?true:false,
|
||||||
is_display_isolated?true:false,
|
is_display_isolated?true:false,
|
||||||
is_secure?true:false,
|
is_secure?true:false,
|
||||||
is_cors_enabled?true:false);
|
is_cors_enabled?true:false,
|
||||||
|
is_csp_bypassing?true:false);
|
||||||
|
|
||||||
// Return type: bool
|
// Return type: bool
|
||||||
return _retval;
|
return _retval;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name,
|
bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name,
|
||||||
bool is_standard, bool is_local, bool is_display_isolated, bool is_secure,
|
bool is_standard, bool is_local, bool is_display_isolated, bool is_secure,
|
||||||
bool is_cors_enabled) {
|
bool is_cors_enabled, bool is_csp_bypassing) {
|
||||||
cef_scheme_registrar_t* _struct = GetStruct();
|
cef_scheme_registrar_t* _struct = GetStruct();
|
||||||
if (CEF_MEMBER_MISSING(_struct, add_custom_scheme))
|
if (CEF_MEMBER_MISSING(_struct, add_custom_scheme))
|
||||||
return false;
|
return false;
|
||||||
@ -36,7 +36,8 @@ bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name,
|
|||||||
is_local,
|
is_local,
|
||||||
is_display_isolated,
|
is_display_isolated,
|
||||||
is_secure,
|
is_secure,
|
||||||
is_cors_enabled);
|
is_cors_enabled,
|
||||||
|
is_csp_bypassing);
|
||||||
|
|
||||||
// Return type: bool
|
// Return type: bool
|
||||||
return _retval?true:false;
|
return _retval?true:false;
|
||||||
|
@ -33,7 +33,7 @@ class CefSchemeRegistrarCToCpp
|
|||||||
// CefSchemeRegistrar methods.
|
// CefSchemeRegistrar methods.
|
||||||
bool AddCustomScheme(const CefString& scheme_name, bool is_standard,
|
bool AddCustomScheme(const CefString& scheme_name, bool is_standard,
|
||||||
bool is_local, bool is_display_isolated, bool is_secure,
|
bool is_local, bool is_display_isolated, bool is_secure,
|
||||||
bool is_cors_enabled) OVERRIDE;
|
bool is_cors_enabled, bool is_csp_bypassing) OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_
|
#endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_
|
||||||
|
@ -327,4 +327,11 @@ patches = [
|
|||||||
'name': 'views_menu_2102',
|
'name': 'views_menu_2102',
|
||||||
'path': '../',
|
'path': '../',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Expose RFH via NavigationHandle for retrieval in DidFinishNavigation on
|
||||||
|
# network error.
|
||||||
|
# https://groups.google.com/a/chromium.org/d/msg/chromium-dev/6iAQPx_hwh8/gaTR5f1GAQAJ
|
||||||
|
'name': 'navigation_handle',
|
||||||
|
'path': '../',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
||||||
index 865b29f..ef44e27 100644
|
index d0ecb71..84c20b4 100644
|
||||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||||
@@ -55,9 +55,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver,
|
@@ -56,9 +56,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver,
|
||||||
|
|
||||||
// These will not return nullptr until Destroy is called.
|
// These will not return nullptr until Destroy is called.
|
||||||
DelegatedFrameHost* GetDelegatedFrameHost();
|
DelegatedFrameHost* GetDelegatedFrameHost();
|
||||||
@ -15,7 +15,7 @@ index 865b29f..ef44e27 100644
|
|||||||
|
|
||||||
void SwapCompositorFrame(uint32_t compositor_frame_sink_id,
|
void SwapCompositorFrame(uint32_t compositor_frame_sink_id,
|
||||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||||
index bd36336..9123781 100644
|
index e4c25e73..e2f789e 100644
|
||||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||||
@@ -201,6 +201,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
@@ -201,6 +201,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
||||||
index abb76e3..cdf5a84d 100644
|
index 2197f73a..ab100b6 100644
|
||||||
--- render_widget_host_view_guest.cc
|
--- render_widget_host_view_guest.cc
|
||||||
+++ render_widget_host_view_guest.cc
|
+++ render_widget_host_view_guest.cc
|
||||||
@@ -254,13 +254,14 @@ void RenderWidgetHostViewGuest::Destroy() {
|
@@ -247,13 +247,14 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
|
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
||||||
index 97ea047..8a4e4d4 100644
|
index 7b85e54..5afa575 100644
|
||||||
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
||||||
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
||||||
@@ -316,14 +316,20 @@ void BrowserPluginGuest::InitInternal(
|
@@ -318,14 +318,20 @@ void BrowserPluginGuest::InitInternal(
|
||||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ index 97ea047..8a4e4d4 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
RendererPreferences* renderer_prefs =
|
RendererPreferences* renderer_prefs =
|
||||||
@@ -791,7 +797,8 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
@@ -800,7 +806,8 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||||
web_contents_view->CreateViewForWidget(
|
web_contents_view->CreateViewForWidget(
|
||||||
@ -36,18 +36,18 @@ index 97ea047..8a4e4d4 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||||
index 66aab6f..1305f14 100644
|
index 1a04a52..4cfe9aa 100644
|
||||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||||
@@ -589,7 +589,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
@@ -594,7 +594,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||||
WebContentsView* wcv =
|
WebContentsView* wcv =
|
||||||
static_cast<WebContentsImpl*>(web_contents())->GetView();
|
static_cast<WebContentsImpl*>(web_contents())->GetView();
|
||||||
RenderWidgetHostViewBase* view =
|
RenderWidgetHostViewBase* view =
|
||||||
- wcv->CreateViewForWidget(render_view_host_->GetWidget(), false);
|
- wcv->CreateViewForWidget(render_view_host_->GetWidget(), false);
|
||||||
+ wcv->CreateViewForWidget(render_view_host_->GetWidget(), nullptr);
|
+ wcv->CreateViewForWidget(render_view_host_->GetWidget(), nullptr);
|
||||||
RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view);
|
RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view);
|
||||||
render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION);
|
render_view_host_->GetMainFrame()->AllowBindings(
|
||||||
|
BINDINGS_POLICY_DOM_AUTOMATION);
|
||||||
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
|
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
|
||||||
index e4401f8..f2fdb9b 100644
|
index e4401f8..f2fdb9b 100644
|
||||||
--- content/browser/web_contents/web_contents_view.h
|
--- content/browser/web_contents/web_contents_view.h
|
||||||
@ -69,10 +69,10 @@ index e4401f8..f2fdb9b 100644
|
|||||||
// Creates a new View that holds a popup and receives messages for it.
|
// Creates a new View that holds a popup and receives messages for it.
|
||||||
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
|
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
|
||||||
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
|
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
|
||||||
index ab62938..d1aeb67 100644
|
index 1bfef2c..7555040 100644
|
||||||
--- content/browser/web_contents/web_contents_view_aura.cc
|
--- content/browser/web_contents/web_contents_view_aura.cc
|
||||||
+++ content/browser/web_contents/web_contents_view_aura.cc
|
+++ content/browser/web_contents/web_contents_view_aura.cc
|
||||||
@@ -823,7 +823,8 @@ void WebContentsViewAura::CreateView(
|
@@ -843,7 +843,8 @@ void WebContentsViewAura::CreateView(
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||||
@ -82,21 +82,19 @@ index ab62938..d1aeb67 100644
|
|||||||
if (render_widget_host->GetView()) {
|
if (render_widget_host->GetView()) {
|
||||||
// During testing, the view will already be set up in most cases to the
|
// During testing, the view will already be set up in most cases to the
|
||||||
// test view, so we don't want to clobber it with a real one. To verify that
|
// test view, so we don't want to clobber it with a real one. To verify that
|
||||||
@@ -836,7 +837,8 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
@@ -855,6 +856,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||||
|
render_widget_host->GetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ const bool is_guest_view_hack = !!embedder_render_widget_host;
|
||||||
RenderWidgetHostViewAura* view =
|
RenderWidgetHostViewAura* view =
|
||||||
- new RenderWidgetHostViewAura(render_widget_host, is_guest_view_hack);
|
g_create_render_widget_host_view
|
||||||
+ new RenderWidgetHostViewAura(render_widget_host,
|
? g_create_render_widget_host_view(render_widget_host,
|
||||||
+ !!embedder_render_widget_host);
|
|
||||||
view->InitAsChild(GetRenderWidgetHostViewParent());
|
|
||||||
|
|
||||||
RenderWidgetHostImpl* host_impl =
|
|
||||||
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
|
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
|
||||||
index 2e7beab..a62b593 100644
|
index ed3641c..f8816357 100644
|
||||||
--- content/browser/web_contents/web_contents_view_aura.h
|
--- content/browser/web_contents/web_contents_view_aura.h
|
||||||
+++ content/browser/web_contents/web_contents_view_aura.h
|
+++ content/browser/web_contents/web_contents_view_aura.h
|
||||||
@@ -110,7 +110,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
@@ -117,7 +117,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||||
gfx::NativeView context) override;
|
gfx::NativeView context) override;
|
||||||
RenderWidgetHostViewBase* CreateViewForWidget(
|
RenderWidgetHostViewBase* CreateViewForWidget(
|
||||||
RenderWidgetHost* render_widget_host,
|
RenderWidgetHost* render_widget_host,
|
||||||
@ -106,10 +104,10 @@ index 2e7beab..a62b593 100644
|
|||||||
RenderWidgetHost* render_widget_host) override;
|
RenderWidgetHost* render_widget_host) override;
|
||||||
void SetPageTitle(const base::string16& title) override;
|
void SetPageTitle(const base::string16& title) override;
|
||||||
diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc
|
diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc
|
||||||
index 17d39e9..f591959 100644
|
index 74a587a..9f02836 100644
|
||||||
--- content/browser/web_contents/web_contents_view_child_frame.cc
|
--- content/browser/web_contents/web_contents_view_child_frame.cc
|
||||||
+++ content/browser/web_contents/web_contents_view_child_frame.cc
|
+++ content/browser/web_contents/web_contents_view_child_frame.cc
|
||||||
@@ -93,7 +93,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size,
|
@@ -94,7 +94,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size,
|
||||||
|
|
||||||
RenderWidgetHostViewBase* WebContentsViewChildFrame::CreateViewForWidget(
|
RenderWidgetHostViewBase* WebContentsViewChildFrame::CreateViewForWidget(
|
||||||
RenderWidgetHost* render_widget_host,
|
RenderWidgetHost* render_widget_host,
|
||||||
@ -132,7 +130,7 @@ index 86ce68b..fd21e5a 100644
|
|||||||
RenderWidgetHost* render_widget_host) override;
|
RenderWidgetHost* render_widget_host) override;
|
||||||
void SetPageTitle(const base::string16& title) override;
|
void SetPageTitle(const base::string16& title) override;
|
||||||
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
|
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
|
||||||
index b2b86fa..00c9126 100644
|
index a93bc37..18fed2e 100644
|
||||||
--- content/browser/web_contents/web_contents_view_guest.cc
|
--- content/browser/web_contents/web_contents_view_guest.cc
|
||||||
+++ content/browser/web_contents/web_contents_view_guest.cc
|
+++ content/browser/web_contents/web_contents_view_guest.cc
|
||||||
@@ -72,6 +72,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const {
|
@@ -72,6 +72,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const {
|
||||||
@ -153,7 +151,7 @@ index b2b86fa..00c9126 100644
|
|||||||
old_parent_view->GetNativeView()->RemoveChild(
|
old_parent_view->GetNativeView()->RemoveChild(
|
||||||
platform_view_->GetNativeView());
|
platform_view_->GetNativeView());
|
||||||
#endif // defined(USE_AURA)
|
#endif // defined(USE_AURA)
|
||||||
@@ -133,7 +137,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
|
@@ -134,7 +138,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||||
@ -163,7 +161,7 @@ index b2b86fa..00c9126 100644
|
|||||||
if (render_widget_host->GetView()) {
|
if (render_widget_host->GetView()) {
|
||||||
// During testing, the view will already be set up in most cases to the
|
// During testing, the view will already be set up in most cases to the
|
||||||
// test view, so we don't want to clobber it with a real one. To verify that
|
// test view, so we don't want to clobber it with a real one. To verify that
|
||||||
@@ -145,11 +150,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
@@ -146,11 +151,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||||
render_widget_host->GetView());
|
render_widget_host->GetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,10 +198,10 @@ index 0102d7e..b89d66c 100644
|
|||||||
RenderWidgetHost* render_widget_host) override;
|
RenderWidgetHost* render_widget_host) override;
|
||||||
void SetPageTitle(const base::string16& title) override;
|
void SetPageTitle(const base::string16& title) override;
|
||||||
diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h
|
diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h
|
||||||
index 3b34cbd..a22e22e 100644
|
index 4141b7f..921bc79 100644
|
||||||
--- content/browser/web_contents/web_contents_view_mac.h
|
--- content/browser/web_contents/web_contents_view_mac.h
|
||||||
+++ content/browser/web_contents/web_contents_view_mac.h
|
+++ content/browser/web_contents/web_contents_view_mac.h
|
||||||
@@ -89,7 +89,7 @@ class WebContentsViewMac : public WebContentsView,
|
@@ -90,7 +90,7 @@ class WebContentsViewMac : public WebContentsView,
|
||||||
gfx::NativeView context) override;
|
gfx::NativeView context) override;
|
||||||
RenderWidgetHostViewBase* CreateViewForWidget(
|
RenderWidgetHostViewBase* CreateViewForWidget(
|
||||||
RenderWidgetHost* render_widget_host,
|
RenderWidgetHost* render_widget_host,
|
||||||
@ -213,10 +211,10 @@ index 3b34cbd..a22e22e 100644
|
|||||||
RenderWidgetHost* render_widget_host) override;
|
RenderWidgetHost* render_widget_host) override;
|
||||||
void SetPageTitle(const base::string16& title) override;
|
void SetPageTitle(const base::string16& title) override;
|
||||||
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
|
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
|
||||||
index 1d01ac8..36f2dce 100644
|
index b236639..167f973 100644
|
||||||
--- content/browser/web_contents/web_contents_view_mac.mm
|
--- content/browser/web_contents/web_contents_view_mac.mm
|
||||||
+++ content/browser/web_contents/web_contents_view_mac.mm
|
+++ content/browser/web_contents/web_contents_view_mac.mm
|
||||||
@@ -338,7 +338,8 @@ void WebContentsViewMac::CreateView(
|
@@ -348,7 +348,8 @@ void WebContentsViewMac::CreateView(
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||||
@ -226,15 +224,14 @@ index 1d01ac8..36f2dce 100644
|
|||||||
if (render_widget_host->GetView()) {
|
if (render_widget_host->GetView()) {
|
||||||
// During testing, the view will already be set up in most cases to the
|
// During testing, the view will already be set up in most cases to the
|
||||||
// test view, so we don't want to clobber it with a real one. To verify that
|
// test view, so we don't want to clobber it with a real one. To verify that
|
||||||
@@ -351,7 +352,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
@@ -360,6 +361,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||||
|
render_widget_host->GetView());
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(
|
+ const bool is_guest_view_hack = !!embedder_render_widget_host;
|
||||||
- render_widget_host, is_guest_view_hack);
|
RenderWidgetHostViewMac* view =
|
||||||
+ render_widget_host, !!embedder_render_widget_host);
|
g_create_render_widget_host_view
|
||||||
if (delegate()) {
|
? g_create_render_widget_host_view(render_widget_host,
|
||||||
base::scoped_nsobject<NSObject<RenderWidgetHostViewMacDelegate> >
|
|
||||||
rw_delegate(
|
|
||||||
diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h
|
diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h
|
||||||
index a32205c..49f3c35 100644
|
index a32205c..49f3c35 100644
|
||||||
--- content/public/browser/browser_plugin_guest_delegate.h
|
--- content/public/browser/browser_plugin_guest_delegate.h
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||||
index 4255c1b..f4b197c 100644
|
index 91acb7d..d4f57cd 100644
|
||||||
--- chrome/common/chrome_content_client.cc
|
--- chrome/common/chrome_content_client.cc
|
||||||
+++ chrome/common/chrome_content_client.cc
|
+++ chrome/common/chrome_content_client.cc
|
||||||
@@ -80,7 +80,7 @@
|
@@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \
|
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||||
index 072d500..c2cc813 100644
|
index 50a66bb..4daaadf 100644
|
||||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||||
@@ -199,6 +199,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
@@ -220,6 +220,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||||
std::unique_ptr<cc::SoftwareOutputDevice>
|
std::unique_ptr<cc::SoftwareOutputDevice>
|
||||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||||
ui::Compositor* compositor) {
|
ui::Compositor* compositor) {
|
||||||
@ -17,7 +17,7 @@ index 072d500..c2cc813 100644
|
|||||||
if (command_line->HasSwitch(switches::kHeadless))
|
if (command_line->HasSwitch(switches::kHeadless))
|
||||||
return base::WrapUnique(new cc::SoftwareOutputDevice);
|
return base::WrapUnique(new cc::SoftwareOutputDevice);
|
||||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||||
index 7ecc5e5..e77f545 100644
|
index 92696ad..50aa222 100644
|
||||||
--- ui/compositor/compositor.h
|
--- ui/compositor/compositor.h
|
||||||
+++ ui/compositor/compositor.h
|
+++ ui/compositor/compositor.h
|
||||||
@@ -18,6 +18,7 @@
|
@@ -18,6 +18,7 @@
|
||||||
@ -28,7 +28,7 @@ index 7ecc5e5..e77f545 100644
|
|||||||
#include "cc/surfaces/surface_sequence.h"
|
#include "cc/surfaces/surface_sequence.h"
|
||||||
#include "cc/trees/layer_tree_host_client.h"
|
#include "cc/trees/layer_tree_host_client.h"
|
||||||
#include "cc/trees/layer_tree_host_single_thread_client.h"
|
#include "cc/trees/layer_tree_host_single_thread_client.h"
|
||||||
@@ -194,6 +195,17 @@ class COMPOSITOR_EXPORT CompositorLock
|
@@ -190,6 +191,17 @@ class COMPOSITOR_EXPORT CompositorLock
|
||||||
DISALLOW_COPY_AND_ASSIGN(CompositorLock);
|
DISALLOW_COPY_AND_ASSIGN(CompositorLock);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ index 7ecc5e5..e77f545 100644
|
|||||||
// Compositor object to take care of GPU painting.
|
// Compositor object to take care of GPU painting.
|
||||||
// A Browser compositor object is responsible for generating the final
|
// A Browser compositor object is responsible for generating the final
|
||||||
// displayable form of pixels comprising a single widget's contents. It draws an
|
// displayable form of pixels comprising a single widget's contents. It draws an
|
||||||
@@ -223,6 +235,9 @@ class COMPOSITOR_EXPORT Compositor
|
@@ -219,6 +231,9 @@ class COMPOSITOR_EXPORT Compositor
|
||||||
// Schedules a redraw of the layer tree associated with this compositor.
|
// Schedules a redraw of the layer tree associated with this compositor.
|
||||||
void ScheduleDraw();
|
void ScheduleDraw();
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ index 7ecc5e5..e77f545 100644
|
|||||||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||||
// must have no parent. The compositor's root layer is reset if the root layer
|
// must have no parent. The compositor's root layer is reset if the root layer
|
||||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||||
@@ -406,6 +421,8 @@ class COMPOSITOR_EXPORT Compositor
|
@@ -398,6 +413,8 @@ class COMPOSITOR_EXPORT Compositor
|
||||||
ui::ContextFactory* context_factory_;
|
ui::ContextFactory* context_factory_;
|
||||||
ui::ContextFactoryPrivate* context_factory_private_;
|
ui::ContextFactoryPrivate* context_factory_private_;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
||||||
index cc1d049a..8490e65 100644
|
index 3cab7f9..98a151f 100644
|
||||||
--- public/renderer/content_renderer_client.cc
|
--- public/renderer/content_renderer_client.cc
|
||||||
+++ public/renderer/content_renderer_client.cc
|
+++ public/renderer/content_renderer_client.cc
|
||||||
@@ -99,7 +99,6 @@ bool ContentRendererClient::AllowPopup() {
|
@@ -97,7 +97,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ index cc1d049a..8490e65 100644
|
|||||||
bool ContentRendererClient::HandleNavigation(
|
bool ContentRendererClient::HandleNavigation(
|
||||||
RenderFrame* render_frame,
|
RenderFrame* render_frame,
|
||||||
bool is_content_initiated,
|
bool is_content_initiated,
|
||||||
@@ -112,6 +111,7 @@ bool ContentRendererClient::HandleNavigation(
|
@@ -110,6 +109,7 @@ bool ContentRendererClient::HandleNavigation(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,10 +19,10 @@ index cc1d049a..8490e65 100644
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
||||||
index 9895206..1f4626d 100644
|
index 0764782..6a12636 100644
|
||||||
--- public/renderer/content_renderer_client.h
|
--- public/renderer/content_renderer_client.h
|
||||||
+++ public/renderer/content_renderer_client.h
|
+++ public/renderer/content_renderer_client.h
|
||||||
@@ -198,7 +198,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
@@ -197,7 +197,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||||
// Returns true if a popup window should be allowed.
|
// Returns true if a popup window should be allowed.
|
||||||
virtual bool AllowPopup();
|
virtual bool AllowPopup();
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ index 9895206..1f4626d 100644
|
|||||||
// TODO(sgurun) This callback is deprecated and will be removed as soon
|
// TODO(sgurun) This callback is deprecated and will be removed as soon
|
||||||
// as android webview completes implementation of a resource throttle based
|
// as android webview completes implementation of a resource throttle based
|
||||||
// shouldoverrideurl implementation. See crbug.com/325351
|
// shouldoverrideurl implementation. See crbug.com/325351
|
||||||
@@ -214,6 +213,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
@@ -213,6 +212,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||||
blink::WebNavigationPolicy default_policy,
|
blink::WebNavigationPolicy default_policy,
|
||||||
bool is_redirect);
|
bool is_redirect);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
diff --git build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
||||||
index 6cd8b9f..dfbbdc6 100644
|
index d2ce8b9..e4fc7c6 100644
|
||||||
--- build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
--- build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
||||||
+++ build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
+++ build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
||||||
@@ -2,6 +2,8 @@
|
@@ -2,6 +2,8 @@
|
||||||
@ -31,7 +31,7 @@ index 6cd8b9f..dfbbdc6 100644
|
|||||||
cflags = [ "/wd4201" ]
|
cflags = [ "/wd4201" ]
|
||||||
}
|
}
|
||||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||||
index c099a26..6fae782 100644
|
index 4750471..a341ac0 100644
|
||||||
--- chrome/common/crash_keys.cc
|
--- chrome/common/crash_keys.cc
|
||||||
+++ chrome/common/crash_keys.cc
|
+++ chrome/common/crash_keys.cc
|
||||||
@@ -4,6 +4,8 @@
|
@@ -4,6 +4,8 @@
|
||||||
@ -43,7 +43,7 @@ index c099a26..6fae782 100644
|
|||||||
#include "base/base_switches.h"
|
#include "base/base_switches.h"
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/format_macros.h"
|
#include "base/format_macros.h"
|
||||||
@@ -101,7 +103,7 @@ const char kViewCount[] = "view-count";
|
@@ -96,7 +98,7 @@ const char kViewCount[] = "view-count";
|
||||||
|
|
||||||
const char kZeroEncodeDetails[] = "zero-encode-details";
|
const char kZeroEncodeDetails[] = "zero-encode-details";
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ index c099a26..6fae782 100644
|
|||||||
// The following keys may be chunked by the underlying crash logging system,
|
// The following keys may be chunked by the underlying crash logging system,
|
||||||
// but ultimately constitute a single key-value pair.
|
// but ultimately constitute a single key-value pair.
|
||||||
//
|
//
|
||||||
@@ -259,10 +261,16 @@ size_t RegisterChromeCrashKeys() {
|
@@ -252,10 +254,16 @@ size_t RegisterChromeCrashKeys() {
|
||||||
|
|
||||||
// This dynamic set of keys is used for sets of key value pairs when gathering
|
// This dynamic set of keys is used for sets of key value pairs when gathering
|
||||||
// a collection of data, like command line switches or extension IDs.
|
// a collection of data, like command line switches or extension IDs.
|
||||||
@ -71,7 +71,7 @@ index c099a26..6fae782 100644
|
|||||||
|
|
||||||
// Register the extension IDs.
|
// Register the extension IDs.
|
||||||
{
|
{
|
||||||
@@ -296,7 +304,7 @@ size_t RegisterChromeCrashKeys() {
|
@@ -289,7 +297,7 @@ size_t RegisterChromeCrashKeys() {
|
||||||
return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
|
return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ index c099a26..6fae782 100644
|
|||||||
static const char* const kIgnoreSwitches[] = {
|
static const char* const kIgnoreSwitches[] = {
|
||||||
switches::kEnableLogging,
|
switches::kEnableLogging,
|
||||||
switches::kFlagSwitchesBegin,
|
switches::kFlagSwitchesBegin,
|
||||||
@@ -352,7 +360,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
@@ -345,7 +353,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
|
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
|
||||||
@ -90,10 +90,10 @@ index c099a26..6fae782 100644
|
|||||||
|
|
||||||
void SetActiveExtensions(const std::set<std::string>& extensions) {
|
void SetActiveExtensions(const std::set<std::string>& extensions) {
|
||||||
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
|
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
|
||||||
index 2b6106c..cfe4548 100644
|
index e7c9bc3..c97f667 100644
|
||||||
--- chrome/common/crash_keys.h
|
--- chrome/common/crash_keys.h
|
||||||
+++ chrome/common/crash_keys.h
|
+++ chrome/common/crash_keys.h
|
||||||
@@ -23,10 +23,18 @@ class CommandLine;
|
@@ -22,10 +22,18 @@ class CommandLine;
|
||||||
|
|
||||||
namespace crash_keys {
|
namespace crash_keys {
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ index 2b6106c..cfe4548 100644
|
|||||||
// on the given |command_line|.
|
// on the given |command_line|.
|
||||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||||
index c2861e0..7d6de6b 100644
|
index 53a29c8..9d0ee4c 100644
|
||||||
--- chrome_elf/BUILD.gn
|
--- chrome_elf/BUILD.gn
|
||||||
+++ chrome_elf/BUILD.gn
|
+++ chrome_elf/BUILD.gn
|
||||||
@@ -7,6 +7,7 @@
|
@@ -7,6 +7,7 @@
|
||||||
@ -124,7 +124,7 @@ index c2861e0..7d6de6b 100644
|
|||||||
import("//chrome/process_version_rc_template.gni")
|
import("//chrome/process_version_rc_template.gni")
|
||||||
import("//testing/test.gni")
|
import("//testing/test.gni")
|
||||||
|
|
||||||
@@ -139,16 +140,40 @@ static_library("blacklist") {
|
@@ -136,16 +137,40 @@ static_library("blacklist") {
|
||||||
|
|
||||||
static_library("crash") {
|
static_library("crash") {
|
||||||
sources = [
|
sources = [
|
||||||
@ -203,7 +203,7 @@ index c658fa9..8c4a145 100644
|
|||||||
g_crash_helper_enabled = true;
|
g_crash_helper_enabled = true;
|
||||||
return true;
|
return true;
|
||||||
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
||||||
index 6e5058e..f2309ad 100644
|
index 3c31d76..26a2602 100644
|
||||||
--- components/crash/content/app/breakpad_linux.cc
|
--- components/crash/content/app/breakpad_linux.cc
|
||||||
+++ components/crash/content/app/breakpad_linux.cc
|
+++ components/crash/content/app/breakpad_linux.cc
|
||||||
@@ -29,6 +29,7 @@
|
@@ -29,6 +29,7 @@
|
||||||
@ -222,7 +222,7 @@ index 6e5058e..f2309ad 100644
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool g_is_crash_reporter_enabled = false;
|
bool g_is_crash_reporter_enabled = false;
|
||||||
@@ -686,7 +688,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
@@ -685,7 +687,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||||
info.process_type_length = 7;
|
info.process_type_length = 7;
|
||||||
info.distro = base::g_linux_distro;
|
info.distro = base::g_linux_distro;
|
||||||
info.distro_length = my_strlen(base::g_linux_distro);
|
info.distro_length = my_strlen(base::g_linux_distro);
|
||||||
@ -231,7 +231,7 @@ index 6e5058e..f2309ad 100644
|
|||||||
info.process_start_time = g_process_start_time;
|
info.process_start_time = g_process_start_time;
|
||||||
info.oom_size = base::g_oom_size;
|
info.oom_size = base::g_oom_size;
|
||||||
info.pid = g_pid;
|
info.pid = g_pid;
|
||||||
@@ -1299,7 +1301,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
@@ -1341,7 +1343,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||||
header_content_encoding,
|
header_content_encoding,
|
||||||
header_content_type,
|
header_content_type,
|
||||||
post_file,
|
post_file,
|
||||||
@ -239,8 +239,8 @@ index 6e5058e..f2309ad 100644
|
|||||||
+ g_crash_server_url,
|
+ g_crash_server_url,
|
||||||
"--timeout=10", // Set a timeout so we don't hang forever.
|
"--timeout=10", // Set a timeout so we don't hang forever.
|
||||||
"--tries=1", // Don't retry if the upload fails.
|
"--tries=1", // Don't retry if the upload fails.
|
||||||
"-O", // output reply to fd 3
|
"-O", // Output reply to the file descriptor path.
|
||||||
@@ -1612,10 +1614,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
@@ -1680,10 +1682,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||||
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||||
|
|
||||||
writer.AddBoundary();
|
writer.AddBoundary();
|
||||||
@ -262,7 +262,7 @@ index 6e5058e..f2309ad 100644
|
|||||||
if (info.pid > 0) {
|
if (info.pid > 0) {
|
||||||
char pid_value_buf[kUint64StringSize];
|
char pid_value_buf[kUint64StringSize];
|
||||||
uint64_t pid_value_len = my_uint64_len(info.pid);
|
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||||
@@ -1906,6 +1917,17 @@ void InitCrashReporter(const std::string& process_type) {
|
@@ -1977,6 +1988,17 @@ void InitCrashReporter(const std::string& process_type) {
|
||||||
PostEnableBreakpadInitialization();
|
PostEnableBreakpadInitialization();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,9 +279,9 @@ index 6e5058e..f2309ad 100644
|
|||||||
+
|
+
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
|
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
|
||||||
const base::CommandLine* command_line =
|
SanitizationInfo sanitization_info;
|
||||||
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
|
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
|
||||||
index bbeb208..74440a0 100644
|
index 3ef4e8a..d0a4b12 100644
|
||||||
--- components/crash/content/app/breakpad_linux.h
|
--- components/crash/content/app/breakpad_linux.h
|
||||||
+++ components/crash/content/app/breakpad_linux.h
|
+++ components/crash/content/app/breakpad_linux.h
|
||||||
@@ -16,6 +16,9 @@ namespace breakpad {
|
@@ -16,6 +16,9 @@ namespace breakpad {
|
||||||
@ -292,10 +292,10 @@ index bbeb208..74440a0 100644
|
|||||||
+void SetCrashServerURL(const std::string& url);
|
+void SetCrashServerURL(const std::string& url);
|
||||||
+
|
+
|
||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
|
struct SanitizationInfo {
|
||||||
const char kWebViewSingleProcessType[] = "webview";
|
bool should_sanitize_dumps = false;
|
||||||
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
|
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
|
||||||
index 3dfbd99..cb9344b 100644
|
index fd88348..cbb9533 100644
|
||||||
--- components/crash/content/app/crash_reporter_client.cc
|
--- components/crash/content/app/crash_reporter_client.cc
|
||||||
+++ components/crash/content/app/crash_reporter_client.cc
|
+++ components/crash/content/app/crash_reporter_client.cc
|
||||||
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||||
@ -364,7 +364,7 @@ index 3dfbd99..cb9344b 100644
|
|||||||
-
|
-
|
||||||
} // namespace crash_reporter
|
} // namespace crash_reporter
|
||||||
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
|
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
|
||||||
index 25ae505..f563761 100644
|
index 513727c..aef4590 100644
|
||||||
--- components/crash/content/app/crash_reporter_client.h
|
--- components/crash/content/app/crash_reporter_client.h
|
||||||
+++ components/crash/content/app/crash_reporter_client.h
|
+++ components/crash/content/app/crash_reporter_client.h
|
||||||
@@ -8,6 +8,7 @@
|
@@ -8,6 +8,7 @@
|
||||||
@ -455,7 +455,7 @@ index 7df66ea..4ee709a 100644
|
|||||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
||||||
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
|
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
|
||||||
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
|
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
|
||||||
@@ -40,9 +43,10 @@
|
@@ -40,9 +43,10 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
|
|
||||||
if (initial_client) {
|
if (initial_client) {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
@ -469,7 +469,7 @@ index 7df66ea..4ee709a 100644
|
|||||||
|
|
||||||
// Is there a way to recover if this fails?
|
// Is there a way to recover if this fails?
|
||||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||||
@@ -54,16 +58,27 @@
|
@@ -54,16 +58,27 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
// crash server won't have symbols for any other build types.
|
// crash server won't have symbols for any other build types.
|
||||||
std::string url = "https://clients2.google.com/cr/report";
|
std::string url = "https://clients2.google.com/cr/report";
|
||||||
#else
|
#else
|
||||||
@ -502,7 +502,7 @@ index 7df66ea..4ee709a 100644
|
|||||||
|
|
||||||
#if defined(GOOGLE_CHROME_BUILD)
|
#if defined(GOOGLE_CHROME_BUILD)
|
||||||
NSString* channel = base::mac::ObjCCast<NSString>(
|
NSString* channel = base::mac::ObjCCast<NSString>(
|
||||||
@@ -73,12 +88,16 @@
|
@@ -73,12 +88,16 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -524,7 +524,7 @@ index 7df66ea..4ee709a 100644
|
|||||||
|
|
||||||
std::vector<std::string> arguments;
|
std::vector<std::string> arguments;
|
||||||
if (!browser_process) {
|
if (!browser_process) {
|
||||||
@@ -90,6 +109,12 @@
|
@@ -90,6 +109,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
"--reset-own-crash-exception-port-to-system-default");
|
"--reset-own-crash-exception-port-to-system-default");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -538,7 +538,7 @@ index 7df66ea..4ee709a 100644
|
|||||||
bool result = crashpad_client.StartHandler(handler_path,
|
bool result = crashpad_client.StartHandler(handler_path,
|
||||||
database_path,
|
database_path,
|
||||||
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
||||||
index 1e9c06c..92ad937 100644
|
index 3ad5f8d..77a0fe6 100644
|
||||||
--- components/crash/content/app/crashpad_win.cc
|
--- components/crash/content/app/crashpad_win.cc
|
||||||
+++ components/crash/content/app/crashpad_win.cc
|
+++ components/crash/content/app/crashpad_win.cc
|
||||||
@@ -41,15 +41,15 @@ void GetPlatformCrashpadAnnotations(
|
@@ -41,15 +41,15 @@ void GetPlatformCrashpadAnnotations(
|
||||||
@ -570,7 +570,7 @@ index 1e9c06c..92ad937 100644
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Allow the crash server to be overridden for testing. If the variable
|
// Allow the crash server to be overridden for testing. If the variable
|
||||||
@@ -103,21 +103,25 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
@@ -101,21 +101,25 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||||
crashpad::TriState::kEnabled, kIndirectMemoryLimit);
|
crashpad::TriState::kEnabled, kIndirectMemoryLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -602,10 +602,10 @@ index 1e9c06c..92ad937 100644
|
|||||||
exe_file, database_path, metrics_path, url, process_annotations,
|
exe_file, database_path, metrics_path, url, process_annotations,
|
||||||
arguments, false, true)) {
|
arguments, false, true)) {
|
||||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||||
index c404067..4938dfd6 100644
|
index c693078..e58465b 100644
|
||||||
--- content/browser/frame_host/debug_urls.cc
|
--- content/browser/frame_host/debug_urls.cc
|
||||||
+++ content/browser/frame_host/debug_urls.cc
|
+++ content/browser/frame_host/debug_urls.cc
|
||||||
@@ -190,7 +190,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
@@ -139,7 +139,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||||
cc::switches::kEnableGpuBenchmarking) &&
|
cc::switches::kEnableGpuBenchmarking) &&
|
||||||
(PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED));
|
(PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED));
|
||||||
|
|
||||||
|
@ -146,10 +146,10 @@ index b64f74f..0c3c22e 100644
|
|||||||
struct Data;
|
struct Data;
|
||||||
|
|
||||||
diff --git crashpad/handler/crash_report_upload_thread.h crashpad/handler/crash_report_upload_thread.h
|
diff --git crashpad/handler/crash_report_upload_thread.h crashpad/handler/crash_report_upload_thread.h
|
||||||
index a9601d1..9517730 100644
|
index 14debac..c25c653 100644
|
||||||
--- crashpad/handler/crash_report_upload_thread.h
|
--- crashpad/handler/crash_report_upload_thread.h
|
||||||
+++ crashpad/handler/crash_report_upload_thread.h
|
+++ crashpad/handler/crash_report_upload_thread.h
|
||||||
@@ -76,7 +76,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
@@ -78,7 +78,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||||
//! This method may be called from any thread.
|
//! This method may be called from any thread.
|
||||||
void ReportPending();
|
void ReportPending();
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ index a9601d1..9517730 100644
|
|||||||
//! \brief The result code from UploadReport().
|
//! \brief The result code from UploadReport().
|
||||||
enum class UploadResult {
|
enum class UploadResult {
|
||||||
//! \brief The crash report was uploaded successfully.
|
//! \brief The crash report was uploaded successfully.
|
||||||
@@ -99,7 +99,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
@@ -101,7 +101,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||||
|
|
||||||
//! \brief Obtains all pending reports from the database, and calls
|
//! \brief Obtains all pending reports from the database, and calls
|
||||||
//! ProcessPendingReport() to process each one.
|
//! ProcessPendingReport() to process each one.
|
||||||
@ -167,7 +167,7 @@ index a9601d1..9517730 100644
|
|||||||
|
|
||||||
//! \brief Processes a single pending report from the database.
|
//! \brief Processes a single pending report from the database.
|
||||||
//!
|
//!
|
||||||
@@ -113,7 +113,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
@@ -115,7 +115,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||||
//! remain in the “pending” state. If the upload fails and no more retries are
|
//! remain in the “pending” state. If the upload fails and no more retries are
|
||||||
//! desired, or report upload is disabled, it will be marked as “completed” in
|
//! desired, or report upload is disabled, it will be marked as “completed” in
|
||||||
//! the database without ever having been uploaded.
|
//! the database without ever having been uploaded.
|
||||||
@ -177,10 +177,10 @@ index a9601d1..9517730 100644
|
|||||||
//! \brief Attempts to upload a crash report.
|
//! \brief Attempts to upload a crash report.
|
||||||
//!
|
//!
|
||||||
diff --git crashpad/handler/handler_main.cc crashpad/handler/handler_main.cc
|
diff --git crashpad/handler/handler_main.cc crashpad/handler/handler_main.cc
|
||||||
index 3ada8c3..ffaae42 100644
|
index 5006cf6..26b3b6a 100644
|
||||||
--- crashpad/handler/handler_main.cc
|
--- crashpad/handler/handler_main.cc
|
||||||
+++ crashpad/handler/handler_main.cc
|
+++ crashpad/handler/handler_main.cc
|
||||||
@@ -29,8 +29,10 @@
|
@@ -33,8 +33,10 @@
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/metrics/persistent_histogram_allocator.h"
|
#include "base/metrics/persistent_histogram_allocator.h"
|
||||||
#include "base/scoped_generic.h"
|
#include "base/scoped_generic.h"
|
||||||
@ -191,8 +191,8 @@ index 3ada8c3..ffaae42 100644
|
|||||||
#include "client/crash_report_database.h"
|
#include "client/crash_report_database.h"
|
||||||
#include "client/crashpad_client.h"
|
#include "client/crashpad_client.h"
|
||||||
#include "client/prune_crash_reports.h"
|
#include "client/prune_crash_reports.h"
|
||||||
@@ -62,6 +64,10 @@
|
@@ -69,6 +71,10 @@
|
||||||
#include "util/win/initial_client_data.h"
|
#include "util/win/session_end_watcher.h"
|
||||||
#endif // OS_MACOSX
|
#endif // OS_MACOSX
|
||||||
|
|
||||||
+#if BUILDFLAG(ENABLE_CEF)
|
+#if BUILDFLAG(ENABLE_CEF)
|
||||||
@ -202,7 +202,7 @@ index 3ada8c3..ffaae42 100644
|
|||||||
namespace crashpad {
|
namespace crashpad {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@@ -175,6 +181,9 @@ int HandlerMain(int argc, char* argv[]) {
|
@@ -403,6 +409,9 @@ int HandlerMain(int argc, char* argv[]) {
|
||||||
kOptionPipeName,
|
kOptionPipeName,
|
||||||
#endif // OS_MACOSX
|
#endif // OS_MACOSX
|
||||||
kOptionURL,
|
kOptionURL,
|
||||||
@ -212,10 +212,10 @@ index 3ada8c3..ffaae42 100644
|
|||||||
|
|
||||||
// Standard options.
|
// Standard options.
|
||||||
kOptionHelp = -2,
|
kOptionHelp = -2,
|
||||||
@@ -195,11 +204,17 @@ int HandlerMain(int argc, char* argv[]) {
|
@@ -424,12 +433,18 @@ int HandlerMain(int argc, char* argv[]) {
|
||||||
InitialClientData initial_client_data;
|
|
||||||
#endif // OS_MACOSX
|
#endif // OS_MACOSX
|
||||||
bool rate_limit;
|
bool rate_limit;
|
||||||
|
bool upload_gzip;
|
||||||
+ int max_uploads;
|
+ int max_uploads;
|
||||||
+ int max_database_size;
|
+ int max_database_size;
|
||||||
+ int max_database_age;
|
+ int max_database_age;
|
||||||
@ -224,13 +224,14 @@ index 3ada8c3..ffaae42 100644
|
|||||||
options.handshake_fd = -1;
|
options.handshake_fd = -1;
|
||||||
#endif
|
#endif
|
||||||
options.rate_limit = true;
|
options.rate_limit = true;
|
||||||
|
options.upload_gzip = true;
|
||||||
+ options.max_uploads = 0;
|
+ options.max_uploads = 0;
|
||||||
+ options.max_database_size = 0;
|
+ options.max_database_size = 0;
|
||||||
+ options.max_database_age = 0;
|
+ options.max_database_age = 0;
|
||||||
|
|
||||||
const option long_options[] = {
|
const option long_options[] = {
|
||||||
{"annotation", required_argument, nullptr, kOptionAnnotation},
|
{"annotation", required_argument, nullptr, kOptionAnnotation},
|
||||||
@@ -229,6 +244,9 @@ int HandlerMain(int argc, char* argv[]) {
|
@@ -460,6 +475,9 @@ int HandlerMain(int argc, char* argv[]) {
|
||||||
{"url", required_argument, nullptr, kOptionURL},
|
{"url", required_argument, nullptr, kOptionURL},
|
||||||
{"help", no_argument, nullptr, kOptionHelp},
|
{"help", no_argument, nullptr, kOptionHelp},
|
||||||
{"version", no_argument, nullptr, kOptionVersion},
|
{"version", no_argument, nullptr, kOptionVersion},
|
||||||
@ -240,7 +241,7 @@ index 3ada8c3..ffaae42 100644
|
|||||||
{nullptr, 0, nullptr, 0},
|
{nullptr, 0, nullptr, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -300,6 +318,27 @@ int HandlerMain(int argc, char* argv[]) {
|
@@ -535,6 +553,27 @@ int HandlerMain(int argc, char* argv[]) {
|
||||||
options.url = optarg;
|
options.url = optarg;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -267,17 +268,18 @@ index 3ada8c3..ffaae42 100644
|
|||||||
+ }
|
+ }
|
||||||
case kOptionHelp: {
|
case kOptionHelp: {
|
||||||
Usage(me);
|
Usage(me);
|
||||||
return EXIT_SUCCESS;
|
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
|
||||||
@@ -432,12 +471,18 @@ int HandlerMain(int argc, char* argv[]) {
|
@@ -672,12 +711,19 @@ int HandlerMain(int argc, char* argv[]) {
|
||||||
// TODO(scottmg): options.rate_limit should be removed when we have a
|
// TODO(scottmg): options.rate_limit should be removed when we have a
|
||||||
// configurable database setting to control upload limiting.
|
// configurable database setting to control upload limiting.
|
||||||
// See https://crashpad.chromium.org/bug/23.
|
// See https://crashpad.chromium.org/bug/23.
|
||||||
+#if BUILDFLAG(ENABLE_CEF)
|
+#if BUILDFLAG(ENABLE_CEF)
|
||||||
+ CefCrashReportUploadThread upload_thread(
|
+ CefCrashReportUploadThread upload_thread(
|
||||||
+ database.get(), options.url, options.rate_limit, options.max_uploads);
|
+ database.get(), options.url, options.rate_limit, options.upload_gzip,
|
||||||
|
+ options.max_uploads);
|
||||||
+#else
|
+#else
|
||||||
CrashReportUploadThread upload_thread(
|
CrashReportUploadThread upload_thread(
|
||||||
database.get(), options.url, options.rate_limit);
|
database.get(), options.url, options.rate_limit, options.upload_gzip);
|
||||||
+#endif
|
+#endif
|
||||||
upload_thread.Start();
|
upload_thread.Start();
|
||||||
|
|
||||||
@ -289,10 +291,10 @@ index 3ada8c3..ffaae42 100644
|
|||||||
|
|
||||||
CrashReportExceptionHandler exception_handler(
|
CrashReportExceptionHandler exception_handler(
|
||||||
diff --git crashpad/util/net/http_transport_win.cc crashpad/util/net/http_transport_win.cc
|
diff --git crashpad/util/net/http_transport_win.cc crashpad/util/net/http_transport_win.cc
|
||||||
index 58ecc47..8c1c16d 100644
|
index 294048a..e87e47e 100644
|
||||||
--- crashpad/util/net/http_transport_win.cc
|
--- crashpad/util/net/http_transport_win.cc
|
||||||
+++ crashpad/util/net/http_transport_win.cc
|
+++ crashpad/util/net/http_transport_win.cc
|
||||||
@@ -143,7 +143,7 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
|
@@ -146,7 +146,7 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
|
||||||
ScopedHINTERNET request(WinHttpOpenRequest(
|
ScopedHINTERNET request(WinHttpOpenRequest(
|
||||||
connect.get(),
|
connect.get(),
|
||||||
base::UTF8ToUTF16(method()).c_str(),
|
base::UTF8ToUTF16(method()).c_str(),
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git .gn .gn
|
diff --git .gn .gn
|
||||||
index f3ea8df..09d0a1e 100644
|
index b0565e5..4fd1771 100644
|
||||||
--- .gn
|
--- .gn
|
||||||
+++ .gn
|
+++ .gn
|
||||||
@@ -225,6 +225,7 @@ exec_script_whitelist =
|
@@ -259,6 +259,7 @@ exec_script_whitelist =
|
||||||
# in the Chromium repo outside of //build.
|
# in the Chromium repo outside of //build.
|
||||||
"//android_webview/BUILD.gn",
|
"//android_webview/BUILD.gn",
|
||||||
"//build_overrides/build.gni",
|
"//build_overrides/build.gni",
|
||||||
@ -11,10 +11,10 @@ index f3ea8df..09d0a1e 100644
|
|||||||
|
|
||||||
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
||||||
diff --git BUILD.gn BUILD.gn
|
diff --git BUILD.gn BUILD.gn
|
||||||
index 0cd9629..97c284c 100644
|
index d783ebe..ae5e8d1 100644
|
||||||
--- BUILD.gn
|
--- BUILD.gn
|
||||||
+++ BUILD.gn
|
+++ BUILD.gn
|
||||||
@@ -286,6 +286,7 @@ group("both_gn_and_gyp") {
|
@@ -282,6 +282,7 @@ group("both_gn_and_gyp") {
|
||||||
# and whether there should be other targets that are iOS-only and missing.
|
# and whether there should be other targets that are iOS-only and missing.
|
||||||
deps += [
|
deps += [
|
||||||
"//cc:cc_unittests",
|
"//cc:cc_unittests",
|
||||||
@ -55,21 +55,25 @@ index 982fbe8..e757be46 100644
|
|||||||
+ "studio path")
|
+ "studio path")
|
||||||
}
|
}
|
||||||
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
||||||
index fbc201e..98ad106 100644
|
index 43a7e09..2af18e9 100644
|
||||||
--- build/toolchain/win/setup_toolchain.py
|
--- build/toolchain/win/setup_toolchain.py
|
||||||
+++ build/toolchain/win/setup_toolchain.py
|
+++ build/toolchain/win/setup_toolchain.py
|
||||||
@@ -126,11 +126,15 @@ def _LoadToolchainEnv(cpu, sdk_dir):
|
@@ -127,15 +127,17 @@ def _LoadToolchainEnv(cpu, sdk_dir):
|
||||||
script_path = os.path.normpath(os.path.join(
|
|
||||||
os.environ['GYP_MSVS_OVERRIDE_PATH'],
|
os.environ['GYP_MSVS_OVERRIDE_PATH'],
|
||||||
'VC/vcvarsall.bat'))
|
'VC/vcvarsall.bat'))
|
||||||
- if not os.path.exists(script_path):
|
if not os.path.exists(script_path):
|
||||||
- raise Exception('%s is missing - make sure VC++ tools are installed.' %
|
- other_path = os.path.normpath(os.path.join(
|
||||||
- script_path)
|
+ script_path = os.path.normpath(os.path.join(
|
||||||
|
os.environ['GYP_MSVS_OVERRIDE_PATH'],
|
||||||
|
'VC/Auxiliary/Build/vcvarsall.bat'))
|
||||||
|
- if not os.path.exists(other_path):
|
||||||
|
- raise Exception('%s is missing - make sure VC++ tools are installed.' %
|
||||||
|
- script_path)
|
||||||
|
- script_path = other_path
|
||||||
- args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64']
|
- args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64']
|
||||||
- variables = _LoadEnvFromBat(args)
|
- variables = _LoadEnvFromBat(args)
|
||||||
+ if os.path.exists(script_path):
|
+ if os.path.exists(script_path):
|
||||||
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64', \
|
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64']
|
||||||
+ '10.0.14393.0']
|
|
||||||
+ variables = _LoadEnvFromBat(args)
|
+ variables = _LoadEnvFromBat(args)
|
||||||
+ else:
|
+ else:
|
||||||
+ variables = []
|
+ variables = []
|
||||||
@ -80,7 +84,7 @@ index fbc201e..98ad106 100644
|
|||||||
|
|
||||||
|
|
||||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||||
index 3edf1ff..66e150a 100755
|
index c5db1b24..e4f5839 100755
|
||||||
--- build/vs_toolchain.py
|
--- build/vs_toolchain.py
|
||||||
+++ build/vs_toolchain.py
|
+++ build/vs_toolchain.py
|
||||||
@@ -74,11 +74,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
@@ -74,11 +74,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||||
@ -103,10 +107,10 @@ index 3edf1ff..66e150a 100755
|
|||||||
# directory in order to run binaries locally, but they are needed in order
|
# directory in order to run binaries locally, but they are needed in order
|
||||||
# to create isolates or the mini_installer. Copying them to the output
|
# to create isolates or the mini_installer. Copying them to the output
|
||||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||||
index 27c483c..24502e9 100644
|
index 811afda..8d21b5f 100644
|
||||||
--- chrome/chrome_paks.gni
|
--- chrome/chrome_paks.gni
|
||||||
+++ chrome/chrome_paks.gni
|
+++ chrome/chrome_paks.gni
|
||||||
@@ -245,7 +245,7 @@ template("chrome_paks") {
|
@@ -249,7 +249,7 @@ template("chrome_paks") {
|
||||||
additional_source_patterns = invoker.additional_locale_source_patterns
|
additional_source_patterns = invoker.additional_locale_source_patterns
|
||||||
}
|
}
|
||||||
input_locales = locales
|
input_locales = locales
|
||||||
@ -116,10 +120,10 @@ index 27c483c..24502e9 100644
|
|||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
output_locales = locales_as_mac_outputs
|
output_locales = locales_as_mac_outputs
|
||||||
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
||||||
index 84be262..687ffac 100644
|
index 5d2fe25..dd08482 100644
|
||||||
--- chrome/installer/mini_installer/BUILD.gn
|
--- chrome/installer/mini_installer/BUILD.gn
|
||||||
+++ chrome/installer/mini_installer/BUILD.gn
|
+++ chrome/installer/mini_installer/BUILD.gn
|
||||||
@@ -125,7 +125,7 @@ template("generate_mini_installer") {
|
@@ -128,7 +128,7 @@ template("generate_mini_installer") {
|
||||||
inputs = [
|
inputs = [
|
||||||
"$chrome_dll_file",
|
"$chrome_dll_file",
|
||||||
"$root_out_dir/chrome.exe",
|
"$root_out_dir/chrome.exe",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git resource_ids resource_ids
|
diff --git resource_ids resource_ids
|
||||||
index d454de7..42e591a 100644
|
index 4e3fd2d..447c1f5 100644
|
||||||
--- resource_ids
|
--- resource_ids
|
||||||
+++ resource_ids
|
+++ resource_ids
|
||||||
@@ -355,5 +355,12 @@
|
@@ -361,5 +361,12 @@
|
||||||
# Thinking about appending to the end?
|
# Thinking about appending to the end?
|
||||||
# Please read the header and find the right section above instead.
|
# Please read the header and find the right section above instead.
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git input_method_win.cc input_method_win.cc
|
diff --git input_method_win.cc input_method_win.cc
|
||||||
index 49efa46..c9eb806 100644
|
index e2bb528..3e851e5 100644
|
||||||
--- input_method_win.cc
|
--- input_method_win.cc
|
||||||
+++ input_method_win.cc
|
+++ input_method_win.cc
|
||||||
@@ -664,8 +664,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
@@ -682,8 +682,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
||||||
// receiving keyboard input as long as it is an active window. This works well
|
// receiving keyboard input as long as it is an active window. This works well
|
||||||
// even when the |attached_window_handle| becomes active but has not received
|
// even when the |attached_window_handle| becomes active but has not received
|
||||||
// WM_FOCUS yet.
|
// WM_FOCUS yet.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
diff --git message_loop.cc message_loop.cc
|
diff --git message_loop.cc message_loop.cc
|
||||||
index 2212941..c2895af 100644
|
index 3d55920..721aca1 100644
|
||||||
--- message_loop.cc
|
--- message_loop.cc
|
||||||
+++ message_loop.cc
|
+++ message_loop.cc
|
||||||
@@ -96,12 +96,6 @@ MessageLoop::~MessageLoop() {
|
@@ -96,12 +96,6 @@ MessageLoop::~MessageLoop() {
|
||||||
@ -23,10 +23,10 @@ index 2212941..c2895af 100644
|
|||||||
+ os_modal_loop_(false),
|
+ os_modal_loop_(false),
|
||||||
+#endif // OS_WIN
|
+#endif // OS_WIN
|
||||||
pump_factory_(pump_factory),
|
pump_factory_(pump_factory),
|
||||||
run_loop_(NULL),
|
run_loop_(nullptr),
|
||||||
incoming_task_queue_(new internal::IncomingTaskQueue(this)),
|
current_pending_task_(nullptr),
|
||||||
diff --git message_loop.h message_loop.h
|
diff --git message_loop.h message_loop.h
|
||||||
index 91a7b1d..de864d4 100644
|
index 8417ce4..ee253a9 100644
|
||||||
--- message_loop.h
|
--- message_loop.h
|
||||||
+++ message_loop.h
|
+++ message_loop.h
|
||||||
@@ -303,6 +303,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
@@ -303,6 +303,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||||
@ -46,7 +46,7 @@ index 91a7b1d..de864d4 100644
|
|||||||
// Can only be called from the thread that owns the MessageLoop.
|
// Can only be called from the thread that owns the MessageLoop.
|
||||||
bool is_running() const;
|
bool is_running() const;
|
||||||
|
|
||||||
@@ -440,6 +450,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
@@ -442,6 +452,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||||
// insider a (accidentally induced?) nested message pump.
|
// insider a (accidentally induced?) nested message pump.
|
||||||
bool nestable_tasks_allowed_;
|
bool nestable_tasks_allowed_;
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ index 91a7b1d..de864d4 100644
|
|||||||
// if type_ is TYPE_CUSTOM and pump_ is null.
|
// if type_ is TYPE_CUSTOM and pump_ is null.
|
||||||
MessagePumpFactoryCallback pump_factory_;
|
MessagePumpFactoryCallback pump_factory_;
|
||||||
diff --git message_pump_win.cc message_pump_win.cc
|
diff --git message_pump_win.cc message_pump_win.cc
|
||||||
index 30638df..a50d626 100644
|
index d52c785..a43b5b3 100644
|
||||||
--- message_pump_win.cc
|
--- message_pump_win.cc
|
||||||
+++ message_pump_win.cc
|
+++ message_pump_win.cc
|
||||||
@@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
@@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||||
|
29
patch/patches/navigation_handle.patch
Normal file
29
patch/patches/navigation_handle.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
|
||||||
|
index 2e525bb..646b81b 100644
|
||||||
|
--- content/browser/frame_host/navigation_handle_impl.cc
|
||||||
|
+++ content/browser/frame_host/navigation_handle_impl.cc
|
||||||
|
@@ -256,12 +256,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||||
|
}
|
||||||
|
|
||||||
|
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
|
||||||
|
- // TODO(mkwst): Change this to check against 'READY_TO_COMMIT' once
|
||||||
|
- // ReadyToCommitNavigation is available whether or not PlzNavigate is
|
||||||
|
- // enabled. https://crbug.com/621856
|
||||||
|
- CHECK_GE(state_, WILL_PROCESS_RESPONSE)
|
||||||
|
- << "This accessor should only be called after a response has been "
|
||||||
|
- "delivered for processing.";
|
||||||
|
return render_frame_host_;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
|
||||||
|
index ff676db..63f862d 100644
|
||||||
|
--- content/browser/frame_host/render_frame_host_impl.cc
|
||||||
|
+++ content/browser/frame_host/render_frame_host_impl.cc
|
||||||
|
@@ -1133,6 +1133,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||||
|
if (navigation_handle_) {
|
||||||
|
navigation_handle_->set_net_error_code(
|
||||||
|
static_cast<net::Error>(params.error_code));
|
||||||
|
+ navigation_handle_->set_render_frame_host(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
|
@ -1,5 +1,5 @@
|
|||||||
diff --git net/base/network_delegate.h net/base/network_delegate.h
|
diff --git net/base/network_delegate.h net/base/network_delegate.h
|
||||||
index 0fccae1..73e33ad 100644
|
index f602f3c..091f53e 100644
|
||||||
--- net/base/network_delegate.h
|
--- net/base/network_delegate.h
|
||||||
+++ net/base/network_delegate.h
|
+++ net/base/network_delegate.h
|
||||||
@@ -16,6 +16,7 @@
|
@@ -16,6 +16,7 @@
|
||||||
@ -10,7 +10,7 @@ index 0fccae1..73e33ad 100644
|
|||||||
#include "net/proxy/proxy_retry_info.h"
|
#include "net/proxy/proxy_retry_info.h"
|
||||||
|
|
||||||
class GURL;
|
class GURL;
|
||||||
@@ -116,6 +117,10 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
|
@@ -112,6 +113,10 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
const GURL& referrer_url) const;
|
const GURL& referrer_url) const;
|
||||||
|
|
||||||
@ -22,10 +22,10 @@ index 0fccae1..73e33ad 100644
|
|||||||
// This is the interface for subclasses of NetworkDelegate to implement. These
|
// This is the interface for subclasses of NetworkDelegate to implement. These
|
||||||
// member functions will be called by the respective public notification
|
// member functions will be called by the respective public notification
|
||||||
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
|
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
|
||||||
index cdf60f8..d6dd4bf 100644
|
index 464e920..9c729b3 100644
|
||||||
--- net/url_request/url_request_job.cc
|
--- net/url_request/url_request_job.cc
|
||||||
+++ net/url_request/url_request_job.cc
|
+++ net/url_request/url_request_job.cc
|
||||||
@@ -497,6 +497,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
@@ -500,6 +500,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||||
DCHECK(!source_stream_);
|
DCHECK(!source_stream_);
|
||||||
source_stream_ = SetUpSourceStream();
|
source_stream_ = SetUpSourceStream();
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff --git BUILD.gn BUILD.gn
|
diff --git BUILD.gn BUILD.gn
|
||||||
index 4a05c56..5e1c4e8 100644
|
index de7f21b..cb3dcb1 100644
|
||||||
--- BUILD.gn
|
--- BUILD.gn
|
||||||
+++ BUILD.gn
|
+++ BUILD.gn
|
||||||
@@ -194,6 +194,10 @@ static_library("pdfium") {
|
@@ -208,6 +208,10 @@ static_library("pdfium") {
|
||||||
} else {
|
} else {
|
||||||
libs += [ "freetype" ]
|
libs += [ "freetype" ]
|
||||||
}
|
}
|
||||||
@ -14,7 +14,7 @@ index 4a05c56..5e1c4e8 100644
|
|||||||
|
|
||||||
static_library("test_support") {
|
static_library("test_support") {
|
||||||
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
|
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
|
||||||
index ff4d46e..5d4c419 100644
|
index 1e7a651..9523c7e 100644
|
||||||
--- fpdfsdk/fpdfview.cpp
|
--- fpdfsdk/fpdfview.cpp
|
||||||
+++ fpdfsdk/fpdfview.cpp
|
+++ fpdfsdk/fpdfview.cpp
|
||||||
@@ -31,6 +31,7 @@
|
@@ -31,6 +31,7 @@
|
||||||
@ -25,7 +25,7 @@ index ff4d46e..5d4c419 100644
|
|||||||
#include "public/fpdf_ext.h"
|
#include "public/fpdf_ext.h"
|
||||||
#include "public/fpdf_progressive.h"
|
#include "public/fpdf_progressive.h"
|
||||||
#include "third_party/base/numerics/safe_conversions_impl.h"
|
#include "third_party/base/numerics/safe_conversions_impl.h"
|
||||||
@@ -383,6 +384,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
|
@@ -419,6 +420,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
|
||||||
|
|
||||||
CPDF_ModuleMgr::Destroy();
|
CPDF_ModuleMgr::Destroy();
|
||||||
CFX_GEModule::Destroy();
|
CFX_GEModule::Destroy();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user