Update to Chromium version 72.0.3615.0 (#609159)

- The |category| value for all TRACE calls from CEF client applications is now
  "cef.client" due to https://crrev.com/331266377d.
- The |with_menu_marker| parameter to CreateMenuButton has been removed due to
  https://crrev.com/7f7e382118.
This commit is contained in:
Marshall Greenblatt 2018-11-30 17:21:07 -05:00
parent 91a1286d52
commit 6df612a597
78 changed files with 770 additions and 959 deletions

View File

@ -679,11 +679,12 @@ static_library("libcef_static") {
"//components/printing/browser",
"//components/printing/common",
"//components/printing/renderer",
"//components/proxy_config",
"//components/safe_browsing/db:test_database_manager",
"//components/services/pdf_compositor:pdf_compositor_manifest",
"//components/services/pdf_compositor/public/cpp:factory",
"//components/services/pdf_compositor/public/interfaces",
"//components/proxy_config",
"//components/tracing",
"//components/update_client",
"//components/url_formatter",
"//components/user_prefs",
@ -713,7 +714,6 @@ static_library("libcef_static") {
"//media",
"//media/blink",
"//net",
"//net/dns:mojo_client",
"//net:net_with_v8",
"//pdf",
"//ppapi/buildflags",

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/72.0.3599.0',
'chromium_checkout': 'refs/tags/72.0.3615.0',
}

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=2ec56bd536038f39754627b528e9b371660c6aa7$
// $hash=f895b0b0b0f2ed088af80eb94e8198eaa0c04b20$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_
@ -85,14 +85,12 @@ typedef struct _cef_menu_button_t {
// have a visible frame at all times, center alignment, additional padding and a
// default minimum size of 70x33 DIP. If |with_frame| is false (0) the button
// will only have a visible frame on hover/press, left alignment, less padding
// and no default minimum size. If |with_menu_marker| is true (1) a menu marker
// will be added to the button.
// and no default minimum size.
///
CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
struct _cef_menu_button_delegate_t* delegate,
const cef_string_t* text,
int with_frame,
int with_menu_marker);
int with_frame);
#ifdef __cplusplus
}

View File

@ -58,15 +58,13 @@ class CefMenuButton : public CefLabelButton {
// have a visible frame at all times, center alignment, additional padding and
// a default minimum size of 70x33 DIP. If |with_frame| is false the button
// will only have a visible frame on hover/press, left alignment, less padding
// and no default minimum size. If |with_menu_marker| is true a menu marker
// will be added to the button.
// and no default minimum size.
///
/*--cef(optional_param=text)--*/
static CefRefPtr<CefMenuButton> CreateMenuButton(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker);
bool with_frame);
///
// Show a menu with contents |menu_model|. |screen_point| specifies the menu

View File

@ -105,10 +105,6 @@ void CefBrowserContext::Shutdown() {
}
}
base::FilePath CefBrowserContext::GetCachePath() const {
return GetPath();
}
content::ResourceContext* CefBrowserContext::GetResourceContext() {
return resource_context_.get();
}

View File

@ -137,7 +137,6 @@ class CefBrowserContext : public ChromeProfileStub {
virtual void Initialize();
// BrowserContext methods.
base::FilePath GetCachePath() const override;
content::ResourceContext* GetResourceContext() override;
net::URLRequestContextGetter* GetRequestContext() override;
net::URLRequestContextGetter* CreateMediaRequestContext() override;

View File

@ -1771,8 +1771,8 @@ void CefBrowserHostImpl::SendCommand(
// Execute on the UI thread because CefResponseManager is not thread safe.
if (CEF_CURRENTLY_ON_UIT()) {
TRACE_EVENT2("libcef", "CefBrowserHostImpl::SendCommand", "frame_id",
frame_id, "needsResponse", responseHandler.get() ? 1 : 0);
TRACE_EVENT2("cef", "CefBrowserHostImpl::SendCommand", "frame_id", frame_id,
"needsResponse", responseHandler.get() ? 1 : 0);
Cef_Request_Params params;
params.name = "execute-command";
params.frame_id = frame_id;
@ -1810,8 +1810,8 @@ void CefBrowserHostImpl::SendCode(
// Execute on the UI thread because CefResponseManager is not thread safe.
if (CEF_CURRENTLY_ON_UIT()) {
TRACE_EVENT2("libcef", "CefBrowserHostImpl::SendCommand", "frame_id",
frame_id, "needsResponse", responseHandler.get() ? 1 : 0);
TRACE_EVENT2("cef", "CefBrowserHostImpl::SendCommand", "frame_id", frame_id,
"needsResponse", responseHandler.get() ? 1 : 0);
Cef_Request_Params params;
params.name = "execute-code";
params.frame_id = frame_id;

View File

@ -283,7 +283,7 @@ ChromeBrowserProcessStub::safe_browsing_detection_service() {
return NULL;
}
subresource_filter::ContentRulesetService*
subresource_filter::RulesetService*
ChromeBrowserProcessStub::subresource_filter_ruleset_service() {
NOTREACHED();
return NULL;
@ -360,6 +360,12 @@ resource_coordinator::TabManager* ChromeBrowserProcessStub::GetTabManager() {
return NULL;
}
resource_coordinator::ResourceCoordinatorParts*
ChromeBrowserProcessStub::resource_coordinator_parts() {
NOTREACHED();
return NULL;
}
prefs::InProcessPrefServiceFactory*
ChromeBrowserProcessStub::pref_service_factory() const {
NOTREACHED();

View File

@ -85,8 +85,8 @@ class ChromeBrowserProcessStub : public BrowserProcess,
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
safe_browsing::ClientSideDetectionService* safe_browsing_detection_service()
override;
subresource_filter::ContentRulesetService*
subresource_filter_ruleset_service() override;
subresource_filter::RulesetService* subresource_filter_ruleset_service()
override;
optimization_guide::OptimizationGuideService* optimization_guide_service()
override;
@ -105,6 +105,8 @@ class ChromeBrowserProcessStub : public BrowserProcess,
shell_integration::DefaultWebClientState CachedDefaultWebClientState()
override;
resource_coordinator::TabManager* GetTabManager() override;
resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts()
override;
prefs::InProcessPrefServiceFactory* pref_service_factory() const override;
// BrowserContextIncognitoHelper implementation.

View File

@ -503,10 +503,11 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
*service_request = mojo::MakeRequest(&service);
service_manager::mojom::PIDReceiverPtr pid_receiver;
service_manager::Identity renderer_identity = host->GetChildIdentity();
ChromeService::GetInstance()->connector()->StartService(
ChromeService::GetInstance()->connector()->RegisterServiceInstance(
service_manager::Identity(chrome::mojom::kRendererServiceName,
renderer_identity.user_id(),
renderer_identity.instance()),
renderer_identity.instance_group(),
renderer_identity.instance_id(),
base::Token::CreateRandom()),
std::move(service), mojo::MakeRequest(&pid_receiver));
}
@ -1118,7 +1119,9 @@ bool CefContentBrowserClient::HandleExternalProtocol(
content::NavigationUIData* navigation_data,
bool is_main_frame,
ui::PageTransition page_transition,
bool has_user_gesture) {
bool has_user_gesture,
const std::string& method,
const net::HttpRequestHeaders& headers) {
CEF_POST_TASK(
CEF_UIT,
base::Bind(

View File

@ -155,7 +155,9 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::NavigationUIData* navigation_data,
bool is_main_frame,
ui::PageTransition page_transition,
bool has_user_gesture) override;
bool has_user_gesture,
const std::string& method,
const net::HttpRequestHeaders& headers) override;
// Perform browser process registration for the custom scheme.
void RegisterCustomScheme(const std::string& scheme);

View File

@ -359,15 +359,23 @@ void CefFileDialogManager::OnRunFileChooserDelegateCallback(
const std::vector<base::FilePath>& file_paths) {
CEF_REQUIRE_UIT();
// Convert FilePath list to SelectedFileInfo list.
base::FilePath base_dir;
std::vector<blink::mojom::FileChooserFileInfoPtr> selected_files;
for (size_t i = 0; i < file_paths.size(); ++i) {
auto info = blink::mojom::FileChooserFileInfo::NewNativeFile(
blink::mojom::NativeFileInfo::New(file_paths[i], base::string16()));
selected_files.push_back(std::move(info));
if (!file_paths.empty()) {
if (mode == blink::mojom::FileChooserParams::Mode::kUploadFolder) {
base_dir = file_paths[0];
} else {
// Convert FilePath list to SelectedFileInfo list.
for (size_t i = 0; i < file_paths.size(); ++i) {
auto info = blink::mojom::FileChooserFileInfo::NewNativeFile(
blink::mojom::NativeFileInfo::New(file_paths[i], base::string16()));
selected_files.push_back(std::move(info));
}
}
}
listener->FileSelected(std::move(selected_files), mode);
listener->FileSelected(std::move(selected_files), base_dir, mode);
Cleanup();
}

View File

@ -253,18 +253,23 @@ CefRefPtr<CefDictionaryValue> ToCefValue(const ui::AXNodeData& node) {
value->SetString("role", ToString(node.role));
value->SetList("state", ToCefValue(node.state));
if (node.offset_container_id != -1)
value->SetInt("offset_container_id", node.offset_container_id);
if (node.relative_bounds.offset_container_id != -1) {
value->SetInt("offset_container_id",
node.relative_bounds.offset_container_id);
}
value->SetDictionary("location", ToCefValue(node.location));
value->SetDictionary("location", ToCefValue(node.relative_bounds.bounds));
// Transform matrix is private, so we set the string that Clients can parse
// and use if needed.
if (node.transform && !node.transform->IsIdentity())
value->SetString("transform", node.transform->ToString());
if (node.relative_bounds.transform &&
!node.relative_bounds.transform->IsIdentity()) {
value->SetString("transform", node.relative_bounds.transform->ToString());
}
if (!node.child_ids.empty())
if (!node.child_ids.empty()) {
value->SetList("child_ids", ToCefValue(node.child_ids));
}
CefRefPtr<CefListValue> actions_strings;
size_t actions_idx = 0;

View File

@ -84,17 +84,15 @@ class CefCompositorFrameSinkClient
forward_->DidReceiveCompositorFrameAck(resources);
}
void DidPresentCompositorFrame(
uint32_t presentation_token,
const gfx::PresentationFeedback& feedback) override {
forward_->DidPresentCompositorFrame(presentation_token, feedback);
void OnBeginFrame(const viz::BeginFrameArgs& args,
const base::flat_map<uint32_t, gfx::PresentationFeedback>&
feedbacks) override {
if (render_widget_host_view_) {
render_widget_host_view_->OnPresentCompositorFrame(presentation_token);
for (const auto& pair : feedbacks) {
render_widget_host_view_->OnPresentCompositorFrame(pair.first);
}
}
}
void OnBeginFrame(const viz::BeginFrameArgs& args) override {
forward_->OnBeginFrame(args);
forward_->OnBeginFrame(args, feedbacks);
}
void OnBeginFramePausedChanged(bool paused) override {
@ -152,7 +150,11 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
return view_->GetDeviceScaleFactor();
}
void WasEvicted() override {}
void AllocateNewSurfaceIdOnEviction() override {}
std::vector<viz::SurfaceId> CollectSurfaceIdsForEviction() override {
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
}
private:
CefRenderWidgetHostViewOSR* const view_;
@ -343,7 +345,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
#if !defined(OS_MACOSX)
local_surface_id_allocator_.GenerateId();
local_surface_id_ = local_surface_id_allocator_.GetCurrentLocalSurfaceId();
local_surface_id_allocation_ =
local_surface_id_allocator_.GetCurrentLocalSurfaceIdAllocation();
delegated_frame_host_client_.reset(new CefDelegatedFrameHostClient(this));
// Matching the attributes from BrowserCompositorMac.
@ -487,8 +490,9 @@ void CefRenderWidgetHostViewOSR::Show() {
browser_compositor_->SetRenderWidgetHostIsHidden(false);
#else
delegated_frame_host_->AttachToCompositor(compositor_.get());
delegated_frame_host_->WasShown(GetLocalSurfaceId(),
GetRootLayer()->bounds().size(), false);
delegated_frame_host_->WasShown(
GetLocalSurfaceIdAllocation().local_surface_id(),
GetRootLayer()->bounds().size(), false);
#endif
// Note that |render_widget_host_| will retrieve size parameters from the
@ -656,7 +660,7 @@ void CefRenderWidgetHostViewOSR::SubmitCompositorFrame(
const viz::LocalSurfaceId& local_surface_id,
viz::CompositorFrame frame,
base::Optional<viz::HitTestRegionList> hit_test_region_list) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::OnSwapCompositorFrame");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::OnSwapCompositorFrame");
// Update the frame rate. At this point we should have a valid connection back
// to the Synthetic Frame Source, which is important so we can actually modify
@ -745,7 +749,9 @@ void CefRenderWidgetHostViewOSR::SubmitCompositorFrame(
}
void CefRenderWidgetHostViewOSR::ClearCompositorFrame() {
GetDelegatedFrameHost()->ClearDelegatedFrame();
// This method is only used for content rendering timeout when surface sync is
// off.
NOTREACHED();
}
void CefRenderWidgetHostViewOSR::ResetFallbackToFirstNavigationSurface() {
@ -800,7 +806,7 @@ void CefRenderWidgetHostViewOSR::InitAsGuest(
void CefRenderWidgetHostViewOSR::UpdateCursor(
const content::WebCursor& cursor) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::UpdateCursor");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::UpdateCursor");
if (!browser_impl_.get())
return;
@ -828,8 +834,18 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
ui::PlatformCursor platform_cursor;
if (web_cursor.IsCustom()) {
ui::Cursor ui_cursor(ui::CursorType::kCustom);
SkBitmap bitmap;
gfx::Point hotspot;
float scale_factor;
web_cursor.CreateScaledBitmapAndHotspotFromCustomData(&bitmap, &hotspot,
&scale_factor);
ui_cursor.set_custom_bitmap(bitmap);
ui_cursor.set_custom_hotspot(hotspot);
ui_cursor.set_device_scale_factor(scale_factor);
// |web_cursor| owns the resulting |platform_cursor|.
platform_cursor = web_cursor.GetPlatformCursor();
platform_cursor = web_cursor.GetPlatformCursor(ui_cursor);
} else {
platform_cursor = GetPlatformCursor(cursor_info.type);
}
@ -987,7 +1003,7 @@ void CefRenderWidgetHostViewOSR::ImeSetComposition(
const std::vector<CefCompositionUnderline>& underlines,
const CefRange& replacement_range,
const CefRange& selection_range) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::ImeSetComposition");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::ImeSetComposition");
if (!render_widget_host_)
return;
@ -1013,7 +1029,7 @@ void CefRenderWidgetHostViewOSR::ImeCommitText(
const CefString& text,
const CefRange& replacement_range,
int relative_cursor_pos) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::ImeCommitText");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::ImeCommitText");
if (!render_widget_host_)
return;
@ -1026,7 +1042,7 @@ void CefRenderWidgetHostViewOSR::ImeCommitText(
}
void CefRenderWidgetHostViewOSR::ImeFinishComposingText(bool keep_selection) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::ImeFinishComposingText");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::ImeFinishComposingText");
if (!render_widget_host_)
return;
@ -1037,7 +1053,7 @@ void CefRenderWidgetHostViewOSR::ImeFinishComposingText(bool keep_selection) {
}
void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::ImeCancelComposition");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::ImeCancelComposition");
if (!render_widget_host_)
return;
@ -1073,9 +1089,9 @@ void CefRenderWidgetHostViewOSR::SelectionChanged(const base::string16& text,
}
#if !defined(OS_MACOSX)
const viz::LocalSurfaceId& CefRenderWidgetHostViewOSR::GetLocalSurfaceId()
const {
return local_surface_id_;
const viz::LocalSurfaceIdAllocation&
CefRenderWidgetHostViewOSR::GetLocalSurfaceIdAllocation() const {
return local_surface_id_allocation_;
}
#endif
@ -1195,7 +1211,7 @@ void CefRenderWidgetHostViewOSR::SynchronizeVisualProperties() {
}
void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::OnScreenInfoChanged");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::OnScreenInfoChanged");
if (!render_widget_host_)
return;
@ -1228,8 +1244,7 @@ void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() {
void CefRenderWidgetHostViewOSR::Invalidate(
CefBrowserHost::PaintElementType type) {
TRACE_EVENT1("libcef", "CefRenderWidgetHostViewOSR::Invalidate", "type",
type);
TRACE_EVENT1("cef", "CefRenderWidgetHostViewOSR::Invalidate", "type", type);
if (!IsPopupWidget() && type == PET_POPUP) {
if (popup_host_view_)
popup_host_view_->Invalidate(type);
@ -1256,7 +1271,7 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
if (renderer_compositor_frame_sink_) {
GetCompositor()->IssueExternalBeginFrame(begin_frame_args);
renderer_compositor_frame_sink_->OnBeginFrame(begin_frame_args);
renderer_compositor_frame_sink_->OnBeginFrame(begin_frame_args, {});
}
if (!IsPopupWidget() && popup_host_view_) {
@ -1266,7 +1281,7 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
void CefRenderWidgetHostViewOSR::SendKeyEvent(
const content::NativeWebKeyboardEvent& event) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::SendKeyEvent");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::SendKeyEvent");
if (render_widget_host_ && render_widget_host_->GetView()) {
// Direct routing requires that events go directly to the View.
render_widget_host_->ForwardKeyboardEventWithLatencyInfo(
@ -1280,7 +1295,7 @@ void CefRenderWidgetHostViewOSR::SendKeyEvent(
void CefRenderWidgetHostViewOSR::SendMouseEvent(
const blink::WebMouseEvent& event) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::SendMouseEvent");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::SendMouseEvent");
if (!IsPopupWidget()) {
if (browser_impl_.get() &&
event.GetType() == blink::WebMouseEvent::kMouseDown) {
@ -1333,7 +1348,7 @@ void CefRenderWidgetHostViewOSR::SendMouseEvent(
void CefRenderWidgetHostViewOSR::SendMouseWheelEvent(
const blink::WebMouseWheelEvent& event) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::SendMouseWheelEvent");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::SendMouseWheelEvent");
blink::WebMouseWheelEvent mouse_wheel_event(event);
@ -1452,7 +1467,7 @@ void CefRenderWidgetHostViewOSR::OnPaint(const gfx::Rect& damage_rect,
int bitmap_width,
int bitmap_height,
void* bitmap_pixels) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::OnPaint");
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::OnPaint");
CefRefPtr<CefRenderHandler> handler =
browser_impl_->client()->GetRenderHandler();
@ -1598,18 +1613,20 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer(bool force) {
gfx::ConvertSizeToPixel(current_device_scale_factor_, size);
local_surface_id_allocator_.GenerateId();
local_surface_id_ = local_surface_id_allocator_.GetCurrentLocalSurfaceId();
local_surface_id_allocation_ =
local_surface_id_allocator_.GetCurrentLocalSurfaceIdAllocation();
if (GetCompositor()) {
GetCompositor()->SetScaleAndSize(current_device_scale_factor_,
size_in_pixels, local_surface_id_,
base::TimeTicks());
size_in_pixels,
local_surface_id_allocation_);
}
PlatformResizeCompositorWidget(size_in_pixels);
bool resized = true;
GetDelegatedFrameHost()->EmbedSurface(
local_surface_id_, size, cc::DeadlinePolicy::UseDefaultDeadline());
local_surface_id_allocation_.local_surface_id(), size,
cc::DeadlinePolicy::UseDefaultDeadline());
#endif // !defined(OS_MACOSX)
// Note that |render_widget_host_| will retrieve resize parameters from the
@ -1628,7 +1645,7 @@ void CefRenderWidgetHostViewOSR::OnBeginFrameTimerTick() {
void CefRenderWidgetHostViewOSR::SendBeginFrame(base::TimeTicks frame_time,
base::TimeDelta vsync_period) {
TRACE_EVENT1("libcef", "CefRenderWidgetHostViewOSR::SendBeginFrame",
TRACE_EVENT1("cef", "CefRenderWidgetHostViewOSR::SendBeginFrame",
"frame_time_us", frame_time.ToInternalValue());
base::TimeTicks display_time = frame_time + vsync_period;
@ -1647,8 +1664,9 @@ void CefRenderWidgetHostViewOSR::SendBeginFrame(base::TimeTicks frame_time,
DCHECK(begin_frame_args.IsValid());
begin_frame_number_++;
if (renderer_compositor_frame_sink_)
renderer_compositor_frame_sink_->OnBeginFrame(begin_frame_args);
if (renderer_compositor_frame_sink_) {
renderer_compositor_frame_sink_->OnBeginFrame(begin_frame_args, {});
}
}
void CefRenderWidgetHostViewOSR::CancelWidget() {

View File

@ -132,7 +132,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void SetActive(bool active) override;
void ShowDefinitionForSelection() override;
void SpeakSelection() override;
bool ShouldContinueToPauseForFrame() override;
#endif // defined(OS_MACOSX)
// RenderWidgetHostViewBase implementation.
@ -198,7 +197,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
size_t offset,
const gfx::Range& range) override;
const viz::LocalSurfaceId& GetLocalSurfaceId() const override;
const viz::LocalSurfaceIdAllocation& GetLocalSurfaceIdAllocation()
const override;
const viz::FrameSinkId& GetFrameSinkId() const override;
// ui::ExternalBeginFrameClient implementation:
@ -338,7 +338,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
std::unique_ptr<content::DelegatedFrameHostClient>
delegated_frame_host_client_;
std::unique_ptr<ui::Layer> root_layer_;
viz::LocalSurfaceId local_surface_id_;
viz::LocalSurfaceIdAllocation local_surface_id_allocation_;
viz::ParentLocalSurfaceIdAllocator local_surface_id_allocator_;
#endif

View File

@ -47,29 +47,14 @@ class MacHelper : public content::BrowserCompositorMacClient,
void DestroyCompositorForShutdown() override {}
bool SynchronizeVisualProperties(
const base::Optional<viz::LocalSurfaceId>&
child_allocated_local_surface_id,
const base::Optional<base::TimeTicks>&
child_local_surface_id_allocation_time) override {
auto* browser_compositor = view_->browser_compositor();
if (child_allocated_local_surface_id) {
browser_compositor->UpdateRendererLocalSurfaceIdFromChild(
*child_allocated_local_surface_id,
*child_local_surface_id_allocation_time);
} else {
browser_compositor->AllocateNewRendererLocalSurfaceId();
}
if (auto* host = browser_compositor->GetDelegatedFrameHost()) {
host->EmbedSurface(browser_compositor->GetRendererLocalSurfaceId(),
browser_compositor->GetRendererSize(),
cc::DeadlinePolicy::UseDefaultDeadline());
}
bool OnBrowserCompositorSurfaceIdChanged() override {
return view_->render_widget_host()->SynchronizeVisualProperties();
}
std::vector<viz::SurfaceId> CollectSurfaceIdsForEviction() override {
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
}
// AcceleratedWidgetMacNSView methods:
void AcceleratedWidgetCALayerParamsUpdated() override {}
@ -87,10 +72,6 @@ void CefRenderWidgetHostViewOSR::ShowDefinitionForSelection() {}
void CefRenderWidgetHostViewOSR::SpeakSelection() {}
bool CefRenderWidgetHostViewOSR::ShouldContinueToPauseForFrame() {
return browser_compositor_->ShouldContinueToPauseForFrame();
}
viz::ScopedSurfaceIdAllocator
CefRenderWidgetHostViewOSR::DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) {
@ -126,16 +107,15 @@ display::Display CefRenderWidgetHostViewOSR::GetDisplay() {
void CefRenderWidgetHostViewOSR::OnDidUpdateVisualPropertiesComplete(
const cc::RenderFrameMetadata& metadata) {
DCHECK_EQ(current_device_scale_factor_, metadata.device_scale_factor);
browser_compositor_->SynchronizeVisualProperties(
browser_compositor_->UpdateSurfaceFromChild(
metadata.device_scale_factor, metadata.viewport_size_in_pixels,
metadata.local_surface_id.value_or(viz::LocalSurfaceId()),
metadata.local_surface_id_allocation_time_from_child.value_or(
base::TimeTicks()));
metadata.local_surface_id_allocation.value_or(
viz::LocalSurfaceIdAllocation()));
}
const viz::LocalSurfaceId& CefRenderWidgetHostViewOSR::GetLocalSurfaceId()
const {
return browser_compositor_->GetRendererLocalSurfaceId();
const viz::LocalSurfaceIdAllocation&
CefRenderWidgetHostViewOSR::GetLocalSurfaceIdAllocation() const {
return browser_compositor_->GetRendererLocalSurfaceIdAllocation();
}
ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
@ -152,7 +132,7 @@ content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
}
bool CefRenderWidgetHostViewOSR::UpdateNSViewAndDisplay() {
return browser_compositor_->UpdateNSViewAndDisplay(
return browser_compositor_->UpdateSurfaceFromNSView(
GetRootLayer()->bounds().size(), GetDisplay());
}

View File

@ -13,18 +13,15 @@
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker) {
return CefMenuButtonImpl::Create(delegate, text, with_frame,
with_menu_marker);
bool with_frame) {
return CefMenuButtonImpl::Create(delegate, text, with_frame);
}
// static
CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker) {
bool with_frame) {
CEF_REQUIRE_UIT_RETURN(nullptr);
DCHECK(delegate);
if (!delegate)
@ -36,7 +33,6 @@ CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
if (with_frame) {
menu_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
}
menu_button->root_view()->set_show_menu_marker(with_menu_marker);
return menu_button;
}

View File

@ -27,8 +27,7 @@ class CefMenuButtonImpl : public CefLabelButtonImpl<views::MenuButton,
static CefRefPtr<CefMenuButtonImpl> Create(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker);
bool with_frame);
// CefMenuButton methods:
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,

View File

@ -14,10 +14,10 @@ namespace {
class ButtonPressedLock : public CefMenuButtonPressedLock {
public:
explicit ButtonPressedLock(views::MenuButton* menu_button)
: pressed_lock_(menu_button) {}
: pressed_lock_(menu_button->menu_button_event_handler()) {}
private:
views::MenuButton::PressedLock pressed_lock_;
views::MenuButtonEventHandler::PressedLock pressed_lock_;
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(ButtonPressedLock);
DISALLOW_COPY_AND_ASSIGN(ButtonPressedLock);

View File

@ -21,7 +21,7 @@ class MenuButtonEx : public views::MenuButton,
public views::ButtonListener,
public views::MenuButtonListener {
public:
MenuButtonEx() : views::MenuButton(base::string16(), this, true) {
MenuButtonEx() : views::MenuButton(base::string16(), this) {
// TODO(cef): MenuButton should not use ButtonListener. See
// http://crbug.com/585252 for details.
Button::listener_ = this;

View File

@ -16,6 +16,12 @@
#include "base/win/win_util.h"
#endif
namespace {
constexpr const char kCategory[] = "cef.client";
} // namespace
// The contents of this file are a compilation unit that is not called by other
// functions in the the library. Consiquently MSVS will exclude it during the
// linker stage if we don't call a stub function.
@ -29,137 +35,133 @@ void base_impl_stub() {}
#pragma optimize("", on)
#endif
CEF_EXPORT void cef_trace_event_instant(const char* category,
CEF_EXPORT void cef_trace_event_instant(const char* /* category */,
const char* name,
const char* arg1_name,
uint64 arg1_val,
const char* arg2_name,
uint64 arg2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_COPY_INSTANT0(category, name, TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_COPY_INSTANT0(kCategory, name, TRACE_EVENT_SCOPE_THREAD);
} else if (arg2_name == NULL) {
TRACE_EVENT_COPY_INSTANT1(category, name, TRACE_EVENT_SCOPE_THREAD,
TRACE_EVENT_COPY_INSTANT1(kCategory, name, TRACE_EVENT_SCOPE_THREAD,
arg1_name, arg1_val);
} else {
TRACE_EVENT_COPY_INSTANT2(category, name, TRACE_EVENT_SCOPE_THREAD,
TRACE_EVENT_COPY_INSTANT2(kCategory, name, TRACE_EVENT_SCOPE_THREAD,
arg1_name, arg1_val, arg2_name, arg2_val);
}
} else {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_INSTANT0(category, name, TRACE_EVENT_SCOPE_THREAD);
TRACE_EVENT_INSTANT0(kCategory, name, TRACE_EVENT_SCOPE_THREAD);
} else if (arg2_name == NULL) {
TRACE_EVENT_INSTANT1(category, name, TRACE_EVENT_SCOPE_THREAD, arg1_name,
TRACE_EVENT_INSTANT1(kCategory, name, TRACE_EVENT_SCOPE_THREAD, arg1_name,
arg1_val);
} else {
TRACE_EVENT_INSTANT2(category, name, TRACE_EVENT_SCOPE_THREAD, arg1_name,
TRACE_EVENT_INSTANT2(kCategory, name, TRACE_EVENT_SCOPE_THREAD, arg1_name,
arg1_val, arg2_name, arg2_val);
}
}
}
CEF_EXPORT void cef_trace_event_begin(const char* category,
CEF_EXPORT void cef_trace_event_begin(const char* /* category */,
const char* name,
const char* arg1_name,
uint64 arg1_val,
const char* arg2_name,
uint64 arg2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_COPY_BEGIN0(category, name);
TRACE_EVENT_COPY_BEGIN0(kCategory, name);
} else if (arg2_name == NULL) {
TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val);
TRACE_EVENT_COPY_BEGIN1(kCategory, name, arg1_name, arg1_val);
} else {
TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, arg2_name,
TRACE_EVENT_COPY_BEGIN2(kCategory, name, arg1_name, arg1_val, arg2_name,
arg2_val);
}
} else {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_BEGIN0(category, name);
TRACE_EVENT_BEGIN0(kCategory, name);
} else if (arg2_name == NULL) {
TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val);
TRACE_EVENT_BEGIN1(kCategory, name, arg1_name, arg1_val);
} else {
TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, arg2_name,
TRACE_EVENT_BEGIN2(kCategory, name, arg1_name, arg1_val, arg2_name,
arg2_val);
}
}
}
CEF_EXPORT void cef_trace_event_end(const char* category,
CEF_EXPORT void cef_trace_event_end(const char* /* category */,
const char* name,
const char* arg1_name,
uint64 arg1_val,
const char* arg2_name,
uint64 arg2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_COPY_END0(category, name);
TRACE_EVENT_COPY_END0(kCategory, name);
} else if (arg2_name == NULL) {
TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val);
TRACE_EVENT_COPY_END1(kCategory, name, arg1_name, arg1_val);
} else {
TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, arg2_name,
TRACE_EVENT_COPY_END2(kCategory, name, arg1_name, arg1_val, arg2_name,
arg2_val);
}
} else {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_END0(category, name);
TRACE_EVENT_END0(kCategory, name);
} else if (arg2_name == NULL) {
TRACE_EVENT_END1(category, name, arg1_name, arg1_val);
TRACE_EVENT_END1(kCategory, name, arg1_name, arg1_val);
} else {
TRACE_EVENT_END2(category, name, arg1_name, arg1_val, arg2_name,
TRACE_EVENT_END2(kCategory, name, arg1_name, arg1_val, arg2_name,
arg2_val);
}
}
}
CEF_EXPORT void cef_trace_counter(const char* category,
CEF_EXPORT void cef_trace_counter(const char* /* category */,
const char* name,
const char* value1_name,
uint64 value1_val,
const char* value2_name,
uint64 value2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (value1_name == NULL && value2_name == NULL) {
TRACE_COPY_COUNTER1(category, name, value1_val);
TRACE_COPY_COUNTER1(kCategory, name, value1_val);
} else {
TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, value2_name,
TRACE_COPY_COUNTER2(kCategory, name, value1_name, value1_val, value2_name,
value2_val);
}
} else {
if (value1_name == NULL && value2_name == NULL) {
TRACE_COUNTER1(category, name, value1_val);
TRACE_COUNTER1(kCategory, name, value1_val);
} else {
TRACE_COUNTER2(category, name, value1_name, value1_val, value2_name,
TRACE_COUNTER2(kCategory, name, value1_name, value1_val, value2_name,
value2_val);
}
}
}
CEF_EXPORT void cef_trace_counter_id(const char* category,
CEF_EXPORT void cef_trace_counter_id(const char* /* category */,
const char* name,
uint64 id,
const char* value1_name,
@ -167,29 +169,28 @@ CEF_EXPORT void cef_trace_counter_id(const char* category,
const char* value2_name,
uint64 value2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (value1_name == NULL && value2_name == NULL) {
TRACE_COPY_COUNTER_ID1(category, name, id, value1_val);
TRACE_COPY_COUNTER_ID1(kCategory, name, id, value1_val);
} else {
TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, value1_val,
TRACE_COPY_COUNTER_ID2(kCategory, name, id, value1_name, value1_val,
value2_name, value2_val);
}
} else {
if (value1_name == NULL && value2_name == NULL) {
TRACE_COUNTER_ID1(category, name, id, value1_val);
TRACE_COUNTER_ID1(kCategory, name, id, value1_val);
} else {
TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val,
TRACE_COUNTER_ID2(kCategory, name, id, value1_name, value1_val,
value2_name, value2_val);
}
}
}
CEF_EXPORT void cef_trace_event_async_begin(const char* category,
CEF_EXPORT void cef_trace_event_async_begin(const char* /* category */,
const char* name,
uint64 id,
const char* arg1_name,
@ -197,97 +198,94 @@ CEF_EXPORT void cef_trace_event_async_begin(const char* category,
const char* arg2_name,
uint64 arg2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id);
TRACE_EVENT_COPY_ASYNC_BEGIN0(kCategory, name, id);
} else if (arg2_name == NULL) {
TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val);
TRACE_EVENT_COPY_ASYNC_BEGIN1(kCategory, name, id, arg1_name, arg1_val);
} else {
TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val,
TRACE_EVENT_COPY_ASYNC_BEGIN2(kCategory, name, id, arg1_name, arg1_val,
arg2_name, arg2_val);
}
} else {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_ASYNC_BEGIN0(category, name, id);
TRACE_EVENT_ASYNC_BEGIN0(kCategory, name, id);
} else if (arg2_name == NULL) {
TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val);
TRACE_EVENT_ASYNC_BEGIN1(kCategory, name, id, arg1_name, arg1_val);
} else {
TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val,
TRACE_EVENT_ASYNC_BEGIN2(kCategory, name, id, arg1_name, arg1_val,
arg2_name, arg2_val);
}
}
}
CEF_EXPORT void cef_trace_event_async_step_into(const char* category,
CEF_EXPORT void cef_trace_event_async_step_into(const char* /* category */,
const char* name,
uint64 id,
uint64 step,
const char* arg1_name,
uint64 arg1_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL) {
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO,
category, name, id,
kCategory, name, id,
TRACE_EVENT_FLAG_COPY, "step", step);
} else {
INTERNAL_TRACE_EVENT_ADD_WITH_ID(
TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category, name, id,
TRACE_EVENT_PHASE_ASYNC_STEP_INTO, kCategory, name, id,
TRACE_EVENT_FLAG_COPY, "step", step, arg1_name, arg1_val);
}
} else {
if (arg1_name == NULL) {
TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step);
TRACE_EVENT_ASYNC_STEP_INTO0(kCategory, name, id, step);
} else {
TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, arg1_name,
TRACE_EVENT_ASYNC_STEP_INTO1(kCategory, name, id, step, arg1_name,
arg1_val);
}
}
}
CEF_EXPORT void cef_trace_event_async_step_past(const char* category,
CEF_EXPORT void cef_trace_event_async_step_past(const char* /* category */,
const char* name,
uint64 id,
uint64 step,
const char* arg1_name,
uint64 arg1_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL) {
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST,
category, name, id,
kCategory, name, id,
TRACE_EVENT_FLAG_COPY, "step", step);
} else {
INTERNAL_TRACE_EVENT_ADD_WITH_ID(
TRACE_EVENT_PHASE_ASYNC_STEP_PAST, category, name, id,
TRACE_EVENT_PHASE_ASYNC_STEP_PAST, kCategory, name, id,
TRACE_EVENT_FLAG_COPY, "step", step, arg1_name, arg1_val);
}
} else {
if (arg1_name == NULL) {
TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step);
TRACE_EVENT_ASYNC_STEP_PAST0(kCategory, name, id, step);
} else {
TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, arg1_name,
TRACE_EVENT_ASYNC_STEP_PAST1(kCategory, name, id, step, arg1_name,
arg1_val);
}
}
}
CEF_EXPORT void cef_trace_event_async_end(const char* category,
CEF_EXPORT void cef_trace_event_async_end(const char* /* category */,
const char* name,
uint64 id,
const char* arg1_name,
@ -295,28 +293,27 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
const char* arg2_name,
uint64 arg2_val,
int copy) {
DCHECK(category);
DCHECK(name);
if (!category || !name)
if (!name)
return;
if (copy) {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_COPY_ASYNC_END0(category, name, id);
TRACE_EVENT_COPY_ASYNC_END0(kCategory, name, id);
} else if (arg2_name == NULL) {
TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, arg1_val);
TRACE_EVENT_COPY_ASYNC_END1(kCategory, name, id, arg1_name, arg1_val);
} else {
TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, arg1_val,
TRACE_EVENT_COPY_ASYNC_END2(kCategory, name, id, arg1_name, arg1_val,
arg2_name, arg2_val);
}
} else {
if (arg1_name == NULL && arg2_name == NULL) {
TRACE_EVENT_ASYNC_END0(category, name, id);
TRACE_EVENT_ASYNC_END0(kCategory, name, id);
} else if (arg2_name == NULL) {
TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val);
TRACE_EVENT_ASYNC_END1(kCategory, name, id, arg1_name, arg1_val);
} else {
TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, arg2_name,
arg2_val);
TRACE_EVENT_ASYNC_END2(kCategory, name, id, arg1_name, arg1_val,
arg2_name, arg2_val);
}
}
}

View File

@ -283,7 +283,8 @@ class CefUIThread : public base::Thread {
// Release MessagePump resources registered with the AtExitManager.
base::MessageLoop* ml = const_cast<base::MessageLoop*>(message_loop());
base::MessageLoopCurrent::UnbindFromCurrentThreadInternal(ml);
base::MessageLoopCurrent::UnbindFromCurrentThreadInternal(
ml->GetMessageLoopBase());
ml->ReleasePump();
// Run exit callbacks on the UI thread to avoid sequence check failures.

View File

@ -17,7 +17,7 @@ int CefResponseManager::GetNextRequestId() {
int CefResponseManager::RegisterHandler(CefRefPtr<Handler> handler) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
int request_id = GetNextRequestId();
TRACE_EVENT_ASYNC_BEGIN1("libcef", "CefResponseManager::Handler", request_id,
TRACE_EVENT_ASYNC_BEGIN1("cef", "CefResponseManager::Handler", request_id,
"request_id", request_id);
handlers_.insert(std::make_pair(request_id, handler));
return request_id;
@ -28,14 +28,14 @@ bool CefResponseManager::RunHandler(const Cef_Response_Params& params) {
DCHECK_GT(params.request_id, 0);
HandlerMap::iterator it = handlers_.find(params.request_id);
if (it != handlers_.end()) {
TRACE_EVENT0("libcef", "CefResponseManager::RunHandler");
TRACE_EVENT0("cef", "CefResponseManager::RunHandler");
it->second->OnResponse(params);
handlers_.erase(it);
TRACE_EVENT_ASYNC_END1("libcef", "CefResponseManager::Handler",
TRACE_EVENT_ASYNC_END1("cef", "CefResponseManager::Handler",
params.request_id, "success", 1);
return true;
}
TRACE_EVENT_ASYNC_END1("libcef", "CefResponseManager::Handler",
TRACE_EVENT_ASYNC_END1("cef", "CefResponseManager::Handler",
params.request_id, "success", 0);
return false;
}

View File

@ -152,7 +152,7 @@ v8::MaybeLocal<v8::Value> ExecuteV8ScriptAndReturnValue(
v8::Local<v8::Context> context,
v8::Isolate* isolate,
v8::TryCatch& tryCatch,
blink::AccessControlStatus accessControlStatus) {
blink::SanitizeScriptErrors sanitizeScriptErrors) {
// Based on ScriptController::executeScriptAndReturnValue
DCHECK(isolate);
@ -193,7 +193,7 @@ v8::MaybeLocal<v8::Value> ExecuteV8ScriptAndReturnValue(
// - nonce: empty for internal script, and
// - parser_state: always "not parser inserted" for internal scripts.
if (!blink::V8ScriptRunner::CompileScript(
blink::ScriptState::From(context), ssc, accessControlStatus,
blink::ScriptState::From(context), ssc, sanitizeScriptErrors,
compile_options, no_cache_reason, blink::ReferrerScriptInfo())
.ToLocal(&script)) {
DCHECK(tryCatch.HasCaught());

View File

@ -14,7 +14,7 @@
#include "include/internal/cef_types.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
#include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h"
#include "v8/include/v8.h"
namespace blink {
@ -62,7 +62,7 @@ BLINK_EXPORT v8::MaybeLocal<v8::Value> ExecuteV8ScriptAndReturnValue(
v8::Local<v8::Context> context,
v8::Isolate* isolate,
v8::TryCatch& tryCatch,
blink::AccessControlStatus accessControlStatus);
blink::SanitizeScriptErrors sanitizeScriptErrors);
BLINK_EXPORT bool IsScriptForbidden();

View File

@ -538,7 +538,7 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
std::string response;
bool expect_response_ack = false;
TRACE_EVENT2("libcef", "CefBrowserImpl::OnRequest", "request_id",
TRACE_EVENT2("cef", "CefBrowserImpl::OnRequest", "request_id",
params.request_id, "expect_response",
params.expect_response ? 1 : 0);

View File

@ -87,7 +87,7 @@
#include "services/service_manager/public/cpp/service_context.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/scheduler/renderer_process_type.h"
#include "third_party/blink/public/platform/scheduler/web_renderer_process_type.h"
#include "third_party/blink/public/platform/url_conversion.h"
#include "third_party/blink/public/platform/web_prerendering_support.h"
#include "third_party/blink/public/platform/web_runtime_features.h"
@ -283,7 +283,7 @@ void CefContentRendererClient::WebKitInitialized() {
gurl, blink::WebString::FromUTF8(entry.target_protocol),
blink::WebString::FromUTF8(entry.target_domain),
entry.allow_target_subdomains,
network::mojom::CORSOriginAccessMatchPriority::kDefaultPriority);
network::mojom::CorsOriginAccessMatchPriority::kDefaultPriority);
}
cross_origin_whitelist_entries_.clear();
}
@ -364,8 +364,8 @@ void CefContentRendererClient::RenderThreadStarted() {
thread->SetRendererProcessType(
IsStandaloneExtensionProcess()
? blink::scheduler::RendererProcessType::kExtensionRenderer
: blink::scheduler::RendererProcessType::kRenderer);
? blink::scheduler::WebRendererProcessType::kExtensionRenderer
: blink::scheduler::WebRendererProcessType::kRenderer);
{
startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host;
@ -617,8 +617,8 @@ void CefContentRendererClient::GetInterface(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) {
service_binding_.GetConnector()->BindInterface(
service_manager::Identity(chrome::mojom::kServiceName), interface_name,
std::move(interface_pipe));
service_manager::ServiceFilter::ByName(chrome::mojom::kServiceName),
interface_name, std::move(interface_pipe));
}
void CefContentRendererClient::WillDestroyCurrentMessageLoop() {

View File

@ -51,10 +51,11 @@ struct Cef_CrossOriginWhiteListEntry_Params;
class ChromePDFPrintClient;
class SpellCheck;
class CefContentRendererClient : public content::ContentRendererClient,
public service_manager::Service,
public service_manager::LocalInterfaceProvider,
public base::MessageLoop::DestructionObserver {
class CefContentRendererClient
: public content::ContentRendererClient,
public service_manager::Service,
public service_manager::LocalInterfaceProvider,
public base::MessageLoopCurrent::DestructionObserver {
public:
CefContentRendererClient();
~CefContentRendererClient() override;
@ -149,7 +150,7 @@ class CefContentRendererClient : public content::ContentRendererClient,
void GetInterface(const std::string& name,
mojo::ScopedMessagePipeHandle request_handle) override;
// MessageLoop::DestructionObserver implementation.
// MessageLoopCurrent::DestructionObserver implementation.
void WillDestroyCurrentMessageLoop() override;
private:

View File

@ -69,12 +69,12 @@ void CefRenderThreadObserver::OnModifyCrossOriginWhitelistEntry(
gurl, blink::WebString::FromUTF8(params.target_protocol),
blink::WebString::FromUTF8(params.target_domain),
params.allow_target_subdomains,
network::mojom::CORSOriginAccessMatchPriority::kDefaultPriority);
network::mojom::CorsOriginAccessMatchPriority::kDefaultPriority);
} else {
blink::WebSecurityPolicy::ClearOriginAccessAllowListForOrigin(gurl);
blink::WebSecurityPolicy::ClearOriginAccessListForOrigin(gurl);
}
}
void CefRenderThreadObserver::OnClearCrossOriginWhitelist() {
blink::WebSecurityPolicy::ClearOriginAccessAllowList();
blink::WebSecurityPolicy::ClearOriginAccessList();
}

View File

@ -1091,7 +1091,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
v8::MaybeLocal<v8::Value> func_rv = blink_glue::ExecuteV8ScriptAndReturnValue(
source, source_url, start_line, context, isolate, try_catch,
blink::AccessControlStatus::kOpaqueResource);
blink::SanitizeScriptErrors::kSanitize);
if (try_catch.HasCaught()) {
exception = new CefV8ExceptionImpl(context, try_catch.Message());

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=95e2368fd2fd9f2f7e3675d611e6a214bad0d92e$
// $hash=265a513e31d882236aaf65b1fc4d505248156382$
//
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
@ -31,8 +31,7 @@
CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
cef_menu_button_delegate_t* delegate,
const cef_string_t* text,
int with_frame,
int with_menu_marker) {
int with_frame) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: delegate; type: refptr_diff
@ -44,7 +43,7 @@ CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
// Execute
CefRefPtr<CefMenuButton> _retval = CefMenuButton::CreateMenuButton(
CefMenuButtonDelegateCToCpp::Wrap(delegate), CefString(text),
with_frame ? true : false, with_menu_marker ? true : false);
with_frame ? true : false);
// Return type: refptr_same
return CefMenuButtonCppToC::Wrap(_retval);

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7d123f6d34a215783417dfe6451483897049d07c$
// $hash=2e7c94d614edec64fc877641eb4f592d8df7adb6$
//
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
@ -32,8 +32,7 @@ NO_SANITIZE("cfi-icall")
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker) {
bool with_frame) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: delegate; type: refptr_diff
@ -45,7 +44,7 @@ CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
// Execute
cef_menu_button_t* _retval =
cef_menu_button_create(CefMenuButtonDelegateCppToC::Wrap(delegate),
text.GetStruct(), with_frame, with_menu_marker);
text.GetStruct(), with_frame);
// Return type: refptr_same
return CefMenuButtonCToCpp::Wrap(_retval);

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7e003428cdefe395562950062a60ab06b7b21c49$
// $hash=6b033757107a97e1c1953cb75652962b214f46e8$
//
#include "include/views/cef_browser_view.h"
@ -87,8 +87,7 @@ NO_SANITIZE("cfi-icall")
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
CefRefPtr<CefMenuButtonDelegate> delegate,
const CefString& text,
bool with_frame,
bool with_menu_marker) {
bool with_frame) {
NOTIMPLEMENTED();
return NULL;
}

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=322e6c3e92ce399d47f8ee00070325f523763c64$
// $hash=22c0a0f35ff9fe8d8b7f5a38a48164b47e188d25$
//
#include <dlfcn.h>
@ -324,7 +324,6 @@ typedef struct _cef_label_button_t* (*cef_label_button_create_ptr)(
typedef struct _cef_menu_button_t* (*cef_menu_button_create_ptr)(
struct _cef_menu_button_delegate_t*,
const cef_string_t*,
int,
int);
typedef struct _cef_panel_t* (*cef_panel_create_ptr)(
struct _cef_panel_delegate_t*);
@ -1099,8 +1098,8 @@ int cef_create_url(const struct _cef_urlparts_t* parts, cef_string_t* url) {
}
NO_SANITIZE("cfi-icall")
cef_string_userfree_t
cef_format_url_for_security_display(const cef_string_t* origin_url) {
cef_string_userfree_t cef_format_url_for_security_display(
const cef_string_t* origin_url) {
return g_libcef_pointers.cef_format_url_for_security_display(origin_url);
}
@ -1591,54 +1590,46 @@ struct _cef_translator_test_t* cef_translator_test_create() {
}
NO_SANITIZE("cfi-icall")
struct
_cef_translator_test_ref_ptr_library_t* cef_translator_test_ref_ptr_library_create(
int value) {
struct _cef_translator_test_ref_ptr_library_t*
cef_translator_test_ref_ptr_library_create(int value) {
return g_libcef_pointers.cef_translator_test_ref_ptr_library_create(value);
}
NO_SANITIZE("cfi-icall")
struct
_cef_translator_test_ref_ptr_library_child_t* cef_translator_test_ref_ptr_library_child_create(
int value,
int other_value) {
struct _cef_translator_test_ref_ptr_library_child_t*
cef_translator_test_ref_ptr_library_child_create(int value, int other_value) {
return g_libcef_pointers.cef_translator_test_ref_ptr_library_child_create(
value, other_value);
}
NO_SANITIZE("cfi-icall")
struct
_cef_translator_test_ref_ptr_library_child_child_t* cef_translator_test_ref_ptr_library_child_child_create(
int value,
int other_value,
int other_other_value) {
struct _cef_translator_test_ref_ptr_library_child_child_t*
cef_translator_test_ref_ptr_library_child_child_create(int value,
int other_value,
int other_other_value) {
return g_libcef_pointers
.cef_translator_test_ref_ptr_library_child_child_create(
value, other_value, other_other_value);
}
NO_SANITIZE("cfi-icall")
struct
_cef_translator_test_scoped_library_t* cef_translator_test_scoped_library_create(
int value) {
struct _cef_translator_test_scoped_library_t*
cef_translator_test_scoped_library_create(int value) {
return g_libcef_pointers.cef_translator_test_scoped_library_create(value);
}
NO_SANITIZE("cfi-icall")
struct
_cef_translator_test_scoped_library_child_t* cef_translator_test_scoped_library_child_create(
int value,
int other_value) {
struct _cef_translator_test_scoped_library_child_t*
cef_translator_test_scoped_library_child_create(int value, int other_value) {
return g_libcef_pointers.cef_translator_test_scoped_library_child_create(
value, other_value);
}
NO_SANITIZE("cfi-icall")
struct
_cef_translator_test_scoped_library_child_child_t* cef_translator_test_scoped_library_child_child_create(
int value,
int other_value,
int other_other_value) {
struct _cef_translator_test_scoped_library_child_child_t*
cef_translator_test_scoped_library_child_child_create(int value,
int other_value,
int other_other_value) {
return g_libcef_pointers
.cef_translator_test_scoped_library_child_child_create(value, other_value,
other_other_value);
@ -1701,10 +1692,8 @@ NO_SANITIZE("cfi-icall")
struct _cef_menu_button_t* cef_menu_button_create(
struct _cef_menu_button_delegate_t* delegate,
const cef_string_t* text,
int with_frame,
int with_menu_marker) {
return g_libcef_pointers.cef_menu_button_create(delegate, text, with_frame,
with_menu_marker);
int with_frame) {
return g_libcef_pointers.cef_menu_button_create(delegate, text, with_frame);
}
NO_SANITIZE("cfi-icall")

View File

@ -53,6 +53,11 @@ patches = [
# https://bitbucket.org/chromiumembedded/cef/issues/2362
'name': 'message_loop',
},
{
# Add builtin trace event categories for CEF.
# Required due to https://crrev.com/331266377d.
'name': 'trace_event',
},
{
# Enable popups in offscreen rendering on OS X.
#
@ -186,7 +191,6 @@ patches = [
},
{
# Modify views::View to extend SupportsUserData.
# Modify views::MenuButton behavior.
# https://bitbucket.org/chromiumembedded/cef/issues/1749
#
# Don't add TestDesktopScreenX11 dependency on Linux.
@ -401,16 +405,12 @@ patches = [
{
# Fix redraw of OSR PDF viewer.
# https://bitbucket.org/chromiumembedded/cef/issues/2507
# Partially reverts changes from https://crrev.com/17771fad93
'name': 'browser_child_frame_2507',
},
{
# macOS: Fix crash when showing a select popup with CefDoMessageLoopWork.
# https://bitbucket.org/chromiumembedded/cef/issues/2495
'name': 'message_pump_mac_2495',
},
{
# Windows: Fix jumbo build error due to redefinition of GetClassName.
# https://bugs.chromium.org/p/chromium/issues/detail?id=811277#c10
'name': 'views_accessibility_811277',
}
]

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_child_frame.cc content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 09b8c3e9f215..0b2bef74fe86 100644
index 97c7697726d4..aa1bbc28cf54 100644
--- content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -654,6 +654,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
@@ -633,6 +633,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
"RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
support_->SubmitCompositorFrame(local_surface_id, std::move(frame),
std::move(hit_test_region_list));
@ -10,11 +10,31 @@ index 09b8c3e9f215..0b2bef74fe86 100644
}
void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
@@ -944,7 +945,6 @@ void RenderWidgetHostViewChildFrame::OnFirstSurfaceActivation(
last_activated_surface_info_ = surface_info;
has_frame_ = true;
FirstSurfaceActivation(surface_info);
- ProcessFrameSwappedCallbacks();
@@ -641,6 +642,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
support_->DidNotProduceFrame(ack);
}
void RenderWidgetHostViewChildFrame::OnFrameTokenChanged(uint32_t frame_token) {
+void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() {
+ std::vector<base::OnceClosure> process_callbacks;
+ // Swap the vectors to avoid re-entrancy issues due to calls to
+ // RegisterFrameSwappedCallback() while running the OnceClosures.
+ process_callbacks.swap(frame_swapped_callbacks_);
+ for (base::OnceClosure& callback : process_callbacks)
+ std::move(callback).Run();
+}
+
void RenderWidgetHostViewChildFrame::TransformPointToRootSurface(
gfx::PointF* point) {
// This function is called by RenderWidgetHostInputEventRouter only for
@@ -826,6 +836,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
void RenderWidgetHostViewChildFrame::SpeakSelection() {}
#endif // defined(OS_MACOSX)
+void RenderWidgetHostViewChildFrame::RegisterFrameSwappedCallback(
+ base::OnceClosure callback) {
+ frame_swapped_callbacks_.emplace_back(std::move(callback));
+}
+
void RenderWidgetHostViewChildFrame::CopyFromSurface(
const gfx::Rect& src_subrect,
const gfx::Size& output_size,

View File

@ -1,18 +1,18 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 731c8c429bc2..77bea57ba5d6 100644
index e271d4bc6c31..6e3c5c2b8f73 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -62,6 +62,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
// These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost();
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
+ ui::Compositor* GetCompositor();
// Ensure that the currect compositor frame be cleared (even if it is
// potentially visible).
// Force a new surface id to be allocated. Returns true if the
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 59128ca41174..2ca8b5c3d5ea 100644
index 0240d7338201..840693c7cd4a 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
@ -25,6 +25,6 @@ index 59128ca41174..2ca8b5c3d5ea 100644
+ return nullptr;
+}
+
void BrowserCompositorMac::ClearCompositorFrame() {
// Make sure that we no longer hold a compositor lock by un-suspending the
// compositor. This ensures that we are able to swap in a new blank frame to
bool BrowserCompositorMac::ForceNewSurfaceId() {
dfh_local_surface_id_allocator_.GenerateId();
delegated_frame_host_->EmbedSurface(

View File

@ -1,5 +1,5 @@
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
index 8d0d53cbc413..f08659aa85ce 100644
index e706efbc6219..3b6f60660650 100644
--- content/browser/browser_plugin/browser_plugin_guest.cc
+++ content/browser/browser_plugin/browser_plugin_guest.cc
@@ -347,8 +347,11 @@ void BrowserPluginGuest::InitInternal(
@ -15,7 +15,7 @@ index 8d0d53cbc413..f08659aa85ce 100644
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
// be attached.
@@ -856,10 +859,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -861,10 +864,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
web_contents_view->CreateViewForWidget(
@ -266,10 +266,10 @@ index bf2226b53dd7..782a320ab788 100644
// a BrowserPlugin even when we are using cross process frames for guests. It
// should be removed after resolving https://crbug.com/642826).
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index b74700bb5810..af5def149ff8 100644
index ad0dae9b1494..80251026a27b 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -206,6 +206,8 @@ void MimeHandlerViewGuest::CreateWebContents(
@@ -207,6 +207,8 @@ void MimeHandlerViewGuest::CreateWebContents(
WebContents::CreateParams params(browser_context(),
guest_site_instance.get());
params.guest_delegate = this;
@ -278,7 +278,7 @@ index b74700bb5810..af5def149ff8 100644
// TODO(erikchen): Fix ownership semantics for guest views.
// https://crbug.com/832879.
std::move(callback).Run(
@@ -250,6 +252,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
@@ -251,6 +253,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true;
}

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 649cf1469a44..c440c5588875 100644
index f6b909554223..f454ed9b8a84 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
@ -10,7 +10,7 @@ index 649cf1469a44..c440c5588875 100644
import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni")
import("//components/feed/features.gni")
@@ -1715,6 +1716,7 @@ jumbo_split_static_library("browser") {
@@ -1716,6 +1717,7 @@ jumbo_split_static_library("browser") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc",
@ -18,7 +18,7 @@ index 649cf1469a44..c440c5588875 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1992,6 +1994,10 @@ jumbo_split_static_library("browser") {
@@ -1994,6 +1996,10 @@ jumbo_split_static_library("browser") {
]
}
@ -29,7 +29,7 @@ index 649cf1469a44..c440c5588875 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -3602,7 +3608,7 @@ jumbo_split_static_library("browser") {
@@ -3599,7 +3605,7 @@ jumbo_split_static_library("browser") {
]
}

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index 9b52c6682024..f188476b45ee 100644
index cac72c6a2fd1..2ed83a4af1b3 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -39,6 +39,10 @@ class SystemNetworkContextManager;
@ -13,7 +13,7 @@ index 9b52c6682024..f188476b45ee 100644
namespace network {
class NetworkQualityTracker;
class SharedURLLoaderFactory;
@@ -182,6 +186,9 @@ class BrowserProcess {
@@ -183,6 +187,9 @@ class BrowserProcess {
// backed by the IOThread's URLRequestContext.
virtual SystemNetworkContextManager* system_network_context_manager() = 0;
@ -24,10 +24,10 @@ index 9b52c6682024..f188476b45ee 100644
// network quality change events.
virtual network::NetworkQualityTracker* network_quality_tracker() = 0;
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index a97daaa4d752..8d6e4490ee4f 100644
index 529239220bcc..fc9cdcd330c2 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() {
@@ -660,6 +660,10 @@ BrowserProcessImpl::system_network_context_manager() {
return SystemNetworkContextManager::GetInstance();
}
@ -39,10 +39,10 @@ index a97daaa4d752..8d6e4490ee4f 100644
BrowserProcessImpl::shared_url_loader_factory() {
return system_network_context_manager()->GetSharedURLLoaderFactory();
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index ab192b468f53..d0864716dcfe 100644
index 8cd716593b19..28f8a70167af 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -143,6 +143,7 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -139,6 +139,7 @@ class BrowserProcessImpl : public BrowserProcess,
// TODO(qinmin): Remove this method as callers can retrieve the global
// instance from SystemNetworkContextManager directly.
SystemNetworkContextManager* system_network_context_manager() override;

View File

@ -71,10 +71,10 @@ index e8e76ce5b954..1dd338dd0142 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 95adee5097f0..7afb65e78998 100644
index cc62bbe4cf18..127cf4c982d6 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -390,7 +390,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -380,7 +380,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());

View File

@ -125,10 +125,10 @@ index 989d5d02cedb..e05810db6824 100644
// If we broke out of the loop, we have found an enabled plugin.
bool enabled = i < matching_plugins.size();
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index 204dd55eb24f..c9054d2743d1 100644
index 6fb885ec1bd9..7c5630c52aee 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -801,6 +801,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -804,6 +804,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@ -136,7 +136,7 @@ index 204dd55eb24f..c9054d2743d1 100644
observer->IsPluginTemporarilyAllowed(identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
}
@@ -988,7 +989,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -991,7 +992,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_auth_host);
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -146,7 +146,7 @@ index 204dd55eb24f..c9054d2743d1 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -997,7 +999,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1000,7 +1002,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -156,7 +156,7 @@ index 204dd55eb24f..c9054d2743d1 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1007,7 +1010,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1010,7 +1013,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@ -166,7 +166,7 @@ index 204dd55eb24f..c9054d2743d1 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1015,7 +1019,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1018,7 +1022,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));
@ -177,7 +177,7 @@ index 204dd55eb24f..c9054d2743d1 100644
}
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 7052b1d68246..ba05a591ebf5 100644
index ddec5604dc24..d91befbf6e2c 100644
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -350,8 +350,11 @@ void ChromePluginPlaceholder::OnBlockedContent(

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index aaa5d7f72006..f50a48abe485 100644
index c5166e854238..e0493a44eb26 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -4,6 +4,7 @@

View File

@ -13,7 +13,7 @@ index 310971aadad2..1c9f77745f09 100644
#include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck
// TODO(crbug.com/663554): Needed for WIDEVINE_CDM_VERSION_STRING. Support
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
index 00d201e178c0..c37de789d5b2 100644
index 4826777cffd2..a5835928dbad 100644
--- third_party/widevine/cdm/BUILD.gn
+++ third_party/widevine/cdm/BUILD.gn
@@ -5,6 +5,7 @@

View File

@ -64,10 +64,10 @@ index 6704ced8c31e..0a7a5e953db4 100644
}
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index b694ee64c5d7..ff3087a8d944 100644
index b8e933d665cf..ef41dae49b39 100644
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
@@ -424,12 +424,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
@@ -427,12 +427,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
}
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
@ -81,10 +81,10 @@ index b694ee64c5d7..ff3087a8d944 100644
"WillFailRequest state should come before WillProcessResponse");
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 b387a4a3052b..570543e4cc81 100644
index 5c76c6531e68..ec4e1705bc59 100644
--- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc
@@ -1869,6 +1869,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
@@ -2000,6 +2000,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
if (GetNavigationHandle()) {
GetNavigationHandle()->set_net_error_code(
static_cast<net::Error>(params.error_code));
@ -92,7 +92,7 @@ index b387a4a3052b..570543e4cc81 100644
}
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
@@ -4404,9 +4405,9 @@ void RenderFrameHostImpl::CommitNavigation(
@@ -4604,9 +4605,9 @@ void RenderFrameHostImpl::CommitNavigation(
DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService) ||
base::FeatureList::IsEnabled(
blink::features::kServiceWorkerServicification));
@ -261,10 +261,10 @@ index 3009401dac6b..b4c5a9e2db50 100644
};
diff --git content/common/frame_messages.h content/common/frame_messages.h
index b88b7b488ec8..5f98601d9ce5 100644
index 8984848ff8fc..948ce07234ea 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -1355,9 +1355,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
@@ -1348,9 +1348,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
@ -301,7 +301,7 @@ index 3b610b1f554e..7c439e060779 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 3166cbe259da..e4bb34de7350 100644
index f235fae71b2f..577cf518f648 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -76,6 +76,9 @@ class CONTENT_EXPORT ContentRendererClient {
@ -314,7 +314,7 @@ index 3166cbe259da..e4bb34de7350 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -341,6 +344,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -337,6 +340,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@ -326,10 +326,10 @@ index 3166cbe259da..e4bb34de7350 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
index 072bf70498cd..0e8ae08fb29a 100644
index 8136604d267a..be7fde2f1a38 100644
--- content/public/renderer/render_frame_observer.h
+++ content/public/renderer/render_frame_observer.h
@@ -158,6 +158,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -161,6 +161,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidReceiveTransferSizeUpdate(int resource_id,
int received_data_length) {}
@ -340,10 +340,10 @@ index 072bf70498cd..0e8ae08fb29a 100644
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index e4c309ef5ecc..b1f008020b8e 100644
index c934ddb0cce0..389a01a09319 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3681,7 +3681,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3642,7 +3642,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@ -353,7 +353,7 @@ index e4c309ef5ecc..b1f008020b8e 100644
params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found)
return nullptr;
@@ -4051,6 +4052,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
@@ -4021,6 +4022,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_));
@ -363,10 +363,10 @@ index e4c309ef5ecc..b1f008020b8e 100644
void RenderFrameImpl::WillCommitProvisionalLoad() {
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 9cd0d754b886..fe3a367927d1 100644
index 22beddb89477..a4cdcfaae75a 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -821,6 +821,8 @@ void RenderThreadImpl::Init() {
@@ -819,6 +819,8 @@ void RenderThreadImpl::Init() {
StartServiceManagerConnection();
@ -376,10 +376,10 @@ index 9cd0d754b886..fe3a367927d1 100644
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 8324f0c43c19..93758d1e05f7 100644
index 0a22404b89d5..e005e01eccc7 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -1183,6 +1183,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed(
@@ -1170,6 +1170,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed(
base::MemoryPressureListener::SetNotificationsSuppressed(suppressed);
}
@ -395,10 +395,10 @@ index 8324f0c43c19..93758d1e05f7 100644
if (!web_database_host_) {
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 4ec814fd92c5..e1d21f399a30 100644
index d12e1fc7ebbf..6ab6160785c6 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -234,6 +234,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -232,6 +232,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void RequestPurgeMemory() override;
void SetMemoryPressureNotificationsSuppressed(bool suppressed) override;

View File

@ -45,7 +45,7 @@ index bcf172e645a2..f879aa745adf 100644
// on the given |command_line|.
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
index d0949dc9693e..afe19e4f3ec4 100644
index 7f780b54b9fa..a54fda966d36 100644
--- chrome_elf/BUILD.gn
+++ chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@
@ -56,7 +56,7 @@ index d0949dc9693e..afe19e4f3ec4 100644
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
@@ -124,9 +125,6 @@ source_set("constants") {
@@ -126,9 +127,6 @@ source_set("constants") {
static_library("crash") {
sources = [
@ -66,7 +66,7 @@ index d0949dc9693e..afe19e4f3ec4 100644
"crash/crash_helper.cc",
"crash/crash_helper.h",
]
@@ -134,6 +132,7 @@ static_library("crash") {
@@ -136,6 +134,7 @@ static_library("crash") {
":hook_util",
"//base", # This needs to go. DEP of app, crash_keys, client.
"//base:base_static", # pe_image
@ -74,7 +74,7 @@ index d0949dc9693e..afe19e4f3ec4 100644
"//chrome/install_static:install_static_util",
"//components/crash/content/app",
"//components/crash/core/common", # crash_keys
@@ -141,6 +140,17 @@ static_library("crash") {
@@ -143,6 +142,17 @@ static_library("crash") {
"//content/public/common:result_codes",
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
]
@ -597,7 +597,7 @@ index 4902d87bd171..a573e9557666 100644
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
index 85db4c8396c0..717df9763c95 100644
index d396b2fc0309..e1451174d705 100644
--- content/browser/frame_host/debug_urls.cc
+++ content/browser/frame_host/debug_urls.cc
@@ -134,7 +134,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {

View File

@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644
struct Data;
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
index a365ef8ec009..586b5f250de4 100644
index 4bc8b7d54053..589ed4027224 100644
--- third_party/crashpad/crashpad/handler/BUILD.gn
+++ third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,6 +12,7 @@

View File

@ -27,10 +27,10 @@ index 9e81f0a33ede..b796e79ae7ef 100644
auto* browser_context = web_contents->GetBrowserContext();
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
index 297f8315c41b..617bb2918f71 100644
index fd7d05e26fa5..2ddb3a8ec86f 100644
--- content/browser/frame_host/render_frame_host_manager.cc
+++ content/browser/frame_host/render_frame_host_manager.cc
@@ -924,10 +924,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
@@ -923,10 +923,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
// TODO(alexmos): This check should've been enforced earlier in the
// navigation, in chrome::Navigate(). Verify this, and then convert this to
// a CHECK and remove the fallback.
@ -46,7 +46,7 @@ index 297f8315c41b..617bb2918f71 100644
return true;
}
@@ -1066,7 +1067,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
@@ -1065,7 +1066,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
// Double-check that the new SiteInstance is associated with the right
// BrowserContext.
@ -57,10 +57,10 @@ index 297f8315c41b..617bb2918f71 100644
// If |new_instance| is a new SiteInstance for a subframe that requires a
// dedicated process, set its process reuse policy so that such subframes are
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 14fa58960ba4..615ef2d89d3e 100644
index 030b808a20ff..d43f2c640fca 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -438,6 +438,13 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -447,6 +447,13 @@ class CONTENT_EXPORT ContentBrowserClient {
// Returns true if error page should be isolated in its own process.
virtual bool ShouldIsolateErrorPage(bool in_main_frame);

View File

@ -27,7 +27,7 @@ index 941d70bd2a7e..ef14a7dd7d4f 100644
virtual void OnReflectorChanged();
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index 41ca733fce93..bc89a78742b5 100644
index 1795f6ed4724..21fe8d39fa8a 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -208,6 +208,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@ -351,10 +351,10 @@ index 582388dd576c..103c9374e535 100644
base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface>
weak_ptr_factory_;
diff --git gpu/GLES2/gl2chromium_autogen.h gpu/GLES2/gl2chromium_autogen.h
index f3e9549fdaf4..3de2d2800400 100644
index 0fafe61704a0..a9bb72f3494b 100644
--- gpu/GLES2/gl2chromium_autogen.h
+++ gpu/GLES2/gl2chromium_autogen.h
@@ -407,6 +407,10 @@
@@ -405,6 +405,10 @@
GLES2_GET_FUN(CreateClientGpuFenceCHROMIUM)
#define glWaitGpuFenceCHROMIUM GLES2_GET_FUN(WaitGpuFenceCHROMIUM)
#define glDestroyGpuFenceCHROMIUM GLES2_GET_FUN(DestroyGpuFenceCHROMIUM)
@ -366,10 +366,10 @@ index f3e9549fdaf4..3de2d2800400 100644
GLES2_GET_FUN(InvalidateReadbackBufferShadowDataCHROMIUM)
#define glFramebufferTextureMultiviewLayeredANGLE \
diff --git gpu/command_buffer/build_gles2_cmd_buffer.py gpu/command_buffer/build_gles2_cmd_buffer.py
index 1dc8c4e0cf5d..c9f52264655e 100755
index 4c09b8ca8ca5..52b31fb938b9 100755
--- gpu/command_buffer/build_gles2_cmd_buffer.py
+++ gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -4085,6 +4085,35 @@ _FUNCTION_INFO = {
@@ -4084,6 +4084,35 @@ _FUNCTION_INFO = {
'extension': 'CHROMIUM_gpu_fence',
'extension_flag': 'chromium_gpu_fence',
},
@ -406,10 +406,10 @@ index 1dc8c4e0cf5d..c9f52264655e 100755
'decoder_func': 'DoUnpremultiplyAndDitherCopyCHROMIUM',
'cmd_args': 'GLuint source_id, GLuint dest_id, GLint x, GLint y, '
diff --git gpu/command_buffer/client/gles2_c_lib_autogen.h gpu/command_buffer/client/gles2_c_lib_autogen.h
index 6d49af7c1fd1..03ac64352f2f 100644
index 5207e5f77ece..b4365999a79e 100644
--- gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -1824,6 +1824,20 @@ void GL_APIENTRY GLES2WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -1818,6 +1818,20 @@ void GL_APIENTRY GLES2WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) {
void GL_APIENTRY GLES2DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
gles2::GetGLContext()->DestroyGpuFenceCHROMIUM(gpu_fence_id);
}
@ -430,7 +430,7 @@ index 6d49af7c1fd1..03ac64352f2f 100644
void GL_APIENTRY
GLES2InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) {
gles2::GetGLContext()->InvalidateReadbackBufferShadowDataCHROMIUM(buffer_id);
@@ -3214,6 +3228,22 @@ extern const NameToFunc g_gles2_function_table[] = {
@@ -3216,6 +3230,22 @@ extern const NameToFunc g_gles2_function_table[] = {
"glDestroyGpuFenceCHROMIUM",
reinterpret_cast<GLES2FunctionPointer>(glDestroyGpuFenceCHROMIUM),
},
@ -454,10 +454,10 @@ index 6d49af7c1fd1..03ac64352f2f 100644
"glInvalidateReadbackBufferShadowDataCHROMIUM",
reinterpret_cast<GLES2FunctionPointer>(
diff --git gpu/command_buffer/client/gles2_cmd_helper_autogen.h gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index cec084199397..bf4e3609776b 100644
index f2da35b038e1..3989691bda6d 100644
--- gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -3377,6 +3377,42 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -3364,6 +3364,42 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
}
}
@ -501,10 +501,10 @@ index cec084199397..bf4e3609776b 100644
GLint shm_id,
GLuint shm_offset,
diff --git gpu/command_buffer/client/gles2_implementation.cc gpu/command_buffer/client/gles2_implementation.cc
index 84ce01c761cb..1e0cd08954e1 100644
index 29e280bc7f86..dc85ccde26a7 100644
--- gpu/command_buffer/client/gles2_implementation.cc
+++ gpu/command_buffer/client/gles2_implementation.cc
@@ -7285,6 +7285,22 @@ void GLES2Implementation::Viewport(GLint x,
@@ -7286,6 +7286,22 @@ void GLES2Implementation::Viewport(GLint x,
CheckGLError();
}
@ -512,13 +512,13 @@ index 84ce01c761cb..1e0cd08954e1 100644
+ GLsizei width,
+ GLsizei height) {
+ typedef cmds::CreateSharedTexture::Result Result;
+ Result* result = GetResultAs<Result*>();
+ auto result = GetResultAs<Result>();
+ if (!result) {
+ return 0;
+ }
+ *result = 0;
+ helper_->CreateSharedTexture(texture_id, width, height, GetResultShmId(),
+ GetResultShmOffset());
+ result.offset());
+
+ WaitForCmd();
+ return *result;
@ -528,10 +528,10 @@ index 84ce01c761cb..1e0cd08954e1 100644
GLuint id,
uint32_t sync_data_shm_id,
diff --git gpu/command_buffer/client/gles2_implementation_autogen.h gpu/command_buffer/client/gles2_implementation_autogen.h
index 4480c022f894..ddb058ba7f8f 100644
index b520b91d1398..d9c1a7ec7cf3 100644
--- gpu/command_buffer/client/gles2_implementation_autogen.h
+++ gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -1279,6 +1279,16 @@ void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@@ -1276,6 +1276,16 @@ void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@ -549,10 +549,10 @@ index 4480c022f894..ddb058ba7f8f 100644
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
diff --git gpu/command_buffer/client/gles2_implementation_impl_autogen.h gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index 50c53a67d1c8..9f3d1f2b9c17 100644
index fbfd72ccf8eb..d0c8df598a08 100644
--- gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -3667,6 +3667,30 @@ void GLES2Implementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -3662,6 +3662,30 @@ void GLES2Implementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
CheckGLError();
}
@ -584,10 +584,10 @@ index 50c53a67d1c8..9f3d1f2b9c17 100644
GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_interface_autogen.h gpu/command_buffer/client/gles2_interface_autogen.h
index f91b0f80945a..597a398e28d2 100644
index 181c4a60d294..4ce350b3633a 100644
--- gpu/command_buffer/client/gles2_interface_autogen.h
+++ gpu/command_buffer/client/gles2_interface_autogen.h
@@ -953,6 +953,12 @@ virtual GLuint CreateGpuFenceCHROMIUM() = 0;
@@ -950,6 +950,12 @@ virtual GLuint CreateGpuFenceCHROMIUM() = 0;
virtual GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) = 0;
virtual void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0;
virtual void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0;
@ -601,10 +601,10 @@ index f91b0f80945a..597a398e28d2 100644
virtual void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_interface_stub_autogen.h gpu/command_buffer/client/gles2_interface_stub_autogen.h
index 4b4b03b5df6c..90b3b7b3726d 100644
index 3d4833bb8ff0..43074fe25fd8 100644
--- gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -922,6 +922,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
@@ -920,6 +920,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@ -618,10 +618,10 @@ index 4b4b03b5df6c..90b3b7b3726d 100644
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
index 24775520f452..c57ffb576efc 100644
index f5ebca07a38f..94a0a254f5ba 100644
--- gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
+++ gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -1240,6 +1240,14 @@ GLuint GLES2InterfaceStub::CreateClientGpuFenceCHROMIUM(
@@ -1235,6 +1235,14 @@ GLuint GLES2InterfaceStub::CreateClientGpuFenceCHROMIUM(
}
void GLES2InterfaceStub::WaitGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {}
void GLES2InterfaceStub::DestroyGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {}
@ -637,10 +637,10 @@ index 24775520f452..c57ffb576efc 100644
GLuint /* buffer_id */) {}
void GLES2InterfaceStub::FramebufferTextureMultiviewLayeredANGLE(
diff --git gpu/command_buffer/client/gles2_trace_implementation_autogen.h gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index 77b2f0371639..fcab9d085024 100644
index caa12933ef3d..60e009ce03b9 100644
--- gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -922,6 +922,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
@@ -920,6 +920,12 @@ GLuint CreateGpuFenceCHROMIUM() override;
GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
@ -654,10 +654,10 @@ index 77b2f0371639..fcab9d085024 100644
void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
GLenum attachment,
diff --git gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
index e345903ac86e..c9c2cfd6a357 100644
index 6ddd340314ad..3840254d80d7 100644
--- gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
+++ gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -2645,6 +2645,28 @@ void GLES2TraceImplementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
@@ -2637,6 +2637,28 @@ void GLES2TraceImplementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) {
gl_->DestroyGpuFenceCHROMIUM(gpu_fence_id);
}
@ -687,10 +687,10 @@ index e345903ac86e..c9c2cfd6a357 100644
GLuint buffer_id) {
TRACE_EVENT_BINARY_EFFICIENT0(
diff --git gpu/command_buffer/common/gles2_cmd_format_autogen.h gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 2d157ecf0d47..b53a6530ea99 100644
index 56929b36203c..d0b1d4b87335 100644
--- gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -16620,6 +16620,193 @@ static_assert(offsetof(DestroyGpuFenceCHROMIUM, header) == 0,
@@ -16566,6 +16566,193 @@ static_assert(offsetof(DestroyGpuFenceCHROMIUM, header) == 0,
static_assert(offsetof(DestroyGpuFenceCHROMIUM, gpu_fence_id) == 4,
"offset of DestroyGpuFenceCHROMIUM gpu_fence_id should be 4");
@ -885,10 +885,10 @@ index 2d157ecf0d47..b53a6530ea99 100644
typedef SetReadbackBufferShadowAllocationINTERNAL ValueType;
static const CommandId kCmdId = kSetReadbackBufferShadowAllocationINTERNAL;
diff --git gpu/command_buffer/common/gles2_cmd_format_test_autogen.h gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index eb73a3a732a8..538ffd3e3b32 100644
index 10b420f628d4..e4be58f568f8 100644
--- gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -5518,6 +5518,52 @@ TEST_F(GLES2FormatTest, DestroyGpuFenceCHROMIUM) {
@@ -5482,6 +5482,52 @@ TEST_F(GLES2FormatTest, DestroyGpuFenceCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
@ -942,28 +942,27 @@ index eb73a3a732a8..538ffd3e3b32 100644
cmds::SetReadbackBufferShadowAllocationINTERNAL& cmd =
*GetBufferAs<cmds::SetReadbackBufferShadowAllocationINTERNAL>();
diff --git gpu/command_buffer/common/gles2_cmd_ids_autogen.h gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index 6530d2b4761a..f5a1e497ebbf 100644
index 753b9c309604..6958e6c5cd00 100644
--- gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -349,7 +349,12 @@
OP(DestroyGpuFenceCHROMIUM) /* 590 */ \
OP(SetReadbackBufferShadowAllocationINTERNAL) /* 591 */ \
OP(FramebufferTextureMultiviewLayeredANGLE) /* 592 */ \
- OP(MaxShaderCompilerThreadsKHR) /* 593 */
+ OP(MaxShaderCompilerThreadsKHR) /* 593 */ \
+ OP(CreateSharedTexture) /* 594 */ \
+ OP(LockSharedTexture) /* 595 */ \
+ OP(UnlockSharedTexture) /* 596 */ \
+ OP(DeleteSharedTexture) /* 597 */
+
@@ -351,7 +351,11 @@
OP(MaxShaderCompilerThreadsKHR) /* 592 */ \
OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 593 */ \
OP(BeginSharedImageAccessDirectCHROMIUM) /* 594 */ \
- OP(EndSharedImageAccessDirectCHROMIUM) /* 595 */
+ OP(EndSharedImageAccessDirectCHROMIUM) /* 595 */ \
+ OP(CreateSharedTexture) /* 596 */ \
+ OP(LockSharedTexture) /* 597 */ \
+ OP(UnlockSharedTexture) /* 598 */ \
+ OP(DeleteSharedTexture) /* 599 */
enum CommandId {
kOneBeforeStartPoint =
diff --git gpu/command_buffer/gles2_cmd_buffer_functions.txt gpu/command_buffer/gles2_cmd_buffer_functions.txt
index 1100fe092163..0797e3dfb7d0 100644
index 7a14db0357ad..89258f5ec0dd 100644
--- gpu/command_buffer/gles2_cmd_buffer_functions.txt
+++ gpu/command_buffer/gles2_cmd_buffer_functions.txt
@@ -398,6 +398,12 @@ GL_APICALL GLuint GL_APIENTRY glCreateClientGpuFenceCHROMIUM (ClientGpuFen
@@ -396,6 +396,12 @@ GL_APICALL GLuint GL_APIENTRY glCreateClientGpuFenceCHROMIUM (ClientGpuFen
GL_APICALL void GL_APIENTRY glWaitGpuFenceCHROMIUM (GLuint gpu_fence_id);
GL_APICALL void GL_APIENTRY glDestroyGpuFenceCHROMIUM (GLuint gpu_fence_id);
@ -977,10 +976,10 @@ index 1100fe092163..0797e3dfb7d0 100644
GL_APICALL void GL_APIENTRY glInvalidateReadbackBufferShadowDataCHROMIUM (GLidBuffer buffer_id);
// (used for CHROMIUM_nonblocking_readback implementation)
diff --git gpu/command_buffer/service/BUILD.gn gpu/command_buffer/service/BUILD.gn
index 67136e0045b7..84cfd708b062 100644
index 73f1cd7a60af..2bde69b3842b 100644
--- gpu/command_buffer/service/BUILD.gn
+++ gpu/command_buffer/service/BUILD.gn
@@ -105,6 +105,8 @@ target(link_target_type, "gles2_sources") {
@@ -106,6 +106,8 @@ target(link_target_type, "gles2_sources") {
visibility = [ "//gpu/*" ]
sources = [
@ -990,7 +989,7 @@ index 67136e0045b7..84cfd708b062 100644
"buffer_manager.cc",
"buffer_manager.h",
diff --git gpu/command_buffer/service/gles2_cmd_decoder.cc gpu/command_buffer/service/gles2_cmd_decoder.cc
index 6395b50373bc..c430882924bc 100644
index 5cbea967b35a..25f7f3d992fa 100644
--- gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -34,6 +34,7 @@
@ -1001,7 +1000,7 @@ index 6395b50373bc..c430882924bc 100644
#include "gpu/command_buffer/common/debug_marker_manager.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
@@ -883,6 +884,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
@@ -888,6 +889,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
return group_->mailbox_manager();
}
@ -1015,7 +1014,7 @@ index 6395b50373bc..c430882924bc 100644
ImageManager* image_manager() { return group_->image_manager(); }
VertexArrayManager* vertex_array_manager() {
@@ -2526,6 +2534,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
@@ -2533,6 +2541,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
std::unique_ptr<VertexArrayManager> vertex_array_manager_;
@ -1024,7 +1023,7 @@ index 6395b50373bc..c430882924bc 100644
base::flat_set<scoped_refptr<Buffer>> writes_submitted_but_not_completed_;
// The format of the back buffer_
@@ -5424,6 +5434,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM(
@@ -5437,6 +5447,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM(
return error::kNoError;
}
@ -1085,7 +1084,7 @@ index 6395b50373bc..c430882924bc 100644
for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end();
++it) {
diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
index 087f58771c7d..01187acdf298 100644
index b363a2f5849d..5e5404dfb1af 100644
--- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
+++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -9,6 +9,7 @@
@ -1096,7 +1095,7 @@ index 087f58771c7d..01187acdf298 100644
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/decoder_client.h"
#include "gpu/command_buffer/service/feature_info.h"
@@ -2461,6 +2462,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult(
@@ -2478,6 +2479,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult(
return error::kNoError;
}
@ -1165,7 +1164,7 @@ index 087f58771c7d..01187acdf298 100644
GLES2DecoderPassthroughImpl::TextureTarget
GLES2DecoderPassthroughImpl::GLenumToTextureTarget(GLenum target) {
diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
index a987f08a62ae..76b11e83a5e3 100644
index 4a3fa61c59b6..3ad6f924c30a 100644
--- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
+++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
@@ -45,6 +45,7 @@ class SharedImageRepresentationGLTexturePassthrough;
@ -1176,7 +1175,7 @@ index a987f08a62ae..76b11e83a5e3 100644
class GPUTracer;
class PassthroughAbstractTextureImpl;
@@ -372,6 +373,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
@@ -374,6 +375,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
void SetOptionalExtensionsRequestedForTesting(bool request_extensions);
@ -1185,7 +1184,7 @@ index a987f08a62ae..76b11e83a5e3 100644
void* GetScratchMemory(size_t size);
template <typename T>
@@ -573,6 +576,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
@@ -575,6 +578,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
std::unique_ptr<GpuFenceManager> gpu_fence_manager_;
@ -1195,10 +1194,10 @@ index a987f08a62ae..76b11e83a5e3 100644
size_t active_texture_unit_;
diff --git ui/compositor/compositor.cc ui/compositor/compositor.cc
index 8662b553658e..44e192faa1d2 100644
index 3e8c3daf2ccf..9a8121451525 100644
--- ui/compositor/compositor.cc
+++ ui/compositor/compositor.cc
@@ -539,6 +539,16 @@ void Compositor::OnNeedsExternalBeginFrames(bool needs_begin_frames) {
@@ -535,6 +535,16 @@ void Compositor::OnNeedsExternalBeginFrames(bool needs_begin_frames) {
needs_external_begin_frames_ = needs_begin_frames;
}
@ -1216,7 +1215,7 @@ index 8662b553658e..44e192faa1d2 100644
observer_list_.AddObserver(observer);
}
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 92021bba285a..448b49db14af 100644
index 728cbd34b849..88c48e21be8c 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -26,6 +26,7 @@
@ -1227,7 +1226,7 @@ index 92021bba285a..448b49db14af 100644
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/compositor/compositor_animation_observer.h"
@@ -160,6 +161,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate {
@@ -159,6 +160,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate {
const viz::BeginFrameArgs& args) = 0;
virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0;
@ -1236,7 +1235,7 @@ index 92021bba285a..448b49db14af 100644
};
// This class abstracts the creation of the 3D context for the compositor. It is
@@ -195,6 +198,17 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -194,6 +197,17 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
};
@ -1254,7 +1253,7 @@ index 92021bba285a..448b49db14af 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -239,6 +253,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -235,6 +249,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -1264,7 +1263,7 @@ index 92021bba285a..448b49db14af 100644
// 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
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -351,6 +368,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -347,6 +364,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
return task_runner_;
}
@ -1275,7 +1274,7 @@ index 92021bba285a..448b49db14af 100644
// Compositor does not own observers. It is the responsibility of the
// observer to remove itself when it is done observing.
void AddObserver(CompositorObserver* observer);
@@ -452,6 +473,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -448,6 +469,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;
@ -1284,7 +1283,7 @@ index 92021bba285a..448b49db14af 100644
// The root of the Layer tree drawn by this compositor.
Layer* root_layer_ = nullptr;
@@ -488,6 +511,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -484,6 +507,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ExternalBeginFrameClient* external_begin_frame_client_ = nullptr;
bool needs_external_begin_frames_ = false;

View File

@ -1,8 +1,8 @@
diff --git .gn .gn
index 3a439c9b36aa..5e31650373ba 100644
index 8fb99cedf0c1..719848a1b320 100644
--- .gn
+++ .gn
@@ -677,6 +677,8 @@ exec_script_whitelist =
@@ -678,6 +678,8 @@ exec_script_whitelist =
# in the Chromium repo outside of //build.
"//build_overrides/build.gni",
@ -12,7 +12,7 @@ index 3a439c9b36aa..5e31650373ba 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 6c85e57fd02e..a1ea70f330e7 100644
index 46bcfd07499e..39b0c2c449f1 100644
--- BUILD.gn
+++ BUILD.gn
@@ -185,6 +185,7 @@ group("gn_all") {
@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644
+ "studio path")
}
diff --git build/toolchain/win/BUILD.gn build/toolchain/win/BUILD.gn
index 4eac9f422603..ffc17ad20b5c 100644
index 43fecc65da80..3f1ecf73ce0c 100644
--- build/toolchain/win/BUILD.gn
+++ build/toolchain/win/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
@ -138,10 +138,10 @@ index 1ba5533c3efb..abfd55a2c703 100644
diff --git build/vs_toolchain.py build/vs_toolchain.py
index 6a2723e2dced..d7a8dc989528 100755
index 03684978da6f..6fdad5882117 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -65,11 +65,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@@ -71,11 +71,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
elif sys.platform == 'win32' and not depot_tools_win_toolchain:
@ -161,10 +161,10 @@ index 6a2723e2dced..d7a8dc989528 100755
# 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
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index bebd511e2e4e..1e3501985492 100644
index 8f2e40286155..42bb53db9aa8 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -261,7 +261,7 @@ template("chrome_paks") {
@@ -263,7 +263,7 @@ template("chrome_paks") {
}
input_locales = locales
@ -174,10 +174,10 @@ index bebd511e2e4e..1e3501985492 100644
if (is_mac) {
output_locales = locales_as_mac_outputs
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 7001812ea42c..175784e1fc69 100644
index 931761ff27de..a181fbeadc86 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -134,7 +134,7 @@ template("generate_mini_installer") {
@@ -133,7 +133,7 @@ template("generate_mini_installer") {
inputs = [
"$chrome_dll_file",
"$root_out_dir/chrome.exe",

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
index 5280058f6ae1..06fafa85303d 100644
index 95e9bf70c41e..e5e6a8bd5df6 100644
--- tools/gritsettings/resource_ids
+++ tools/gritsettings/resource_ids
@@ -426,4 +426,11 @@
@@ -429,4 +429,11 @@
# Please read the header and find the right section above instead.
# Resource ids starting at 31000 are reserved for projects built on Chromium.

View File

@ -1,5 +1,5 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 29161fe04089..094109b7fbfd 100644
index 946fb592c2f0..564ec2e634d6 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -163,7 +163,7 @@ declare_args() {

View File

@ -68,10 +68,10 @@ index d44c7feaabec..5f1992335a38 100644
void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn
index 49d5b2a4cf51..889a9d95aa4a 100644
index 188dfd74d03a..b500f87fa5c7 100644
--- chrome/test/BUILD.gn
+++ chrome/test/BUILD.gn
@@ -3850,7 +3850,7 @@ test("unit_tests") {
@@ -3885,7 +3885,7 @@ test("unit_tests") {
"../browser/ui/input_method/input_method_engine_unittest.cc",
]
}
@ -80,7 +80,7 @@ index 49d5b2a4cf51..889a9d95aa4a 100644
sources +=
[ "../browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc" ]
deps += [ "//build/config/linux/gtk" ]
@@ -3871,7 +3871,7 @@ test("unit_tests") {
@@ -3906,7 +3906,7 @@ test("unit_tests") {
if (use_gio) {
configs += [ "//build/linux:gio_config" ]
}
@ -89,7 +89,7 @@ index 49d5b2a4cf51..889a9d95aa4a 100644
deps += [ "//chrome/browser/ui/libgtkui" ]
}
@@ -4855,7 +4855,7 @@ if (!is_android) {
@@ -4892,7 +4892,7 @@ if (!is_android) {
# suites, it seems like one or another starts timing out too.
"../browser/ui/views/keyboard_access_browsertest.cc",
]
@ -99,10 +99,10 @@ index 49d5b2a4cf51..889a9d95aa4a 100644
"../browser/ui/libgtkui/select_file_dialog_interactive_uitest.cc",
]
diff --git remoting/host/BUILD.gn remoting/host/BUILD.gn
index ab8ccd9ad447..2a5d8e9d54a6 100644
index c49188e58c90..162851b97cef 100644
--- remoting/host/BUILD.gn
+++ remoting/host/BUILD.gn
@@ -340,7 +340,7 @@ static_library("host") {
@@ -342,7 +342,7 @@ static_library("host") {
"//build/config/linux:xrandr",
]
deps += [ "//remoting/host/linux:x11" ]
@ -111,7 +111,7 @@ index ab8ccd9ad447..2a5d8e9d54a6 100644
deps += [ "//build/config/linux/gtk" ]
}
} else {
@@ -721,7 +721,7 @@ if (enable_me2me_host) {
@@ -723,7 +723,7 @@ if (enable_me2me_host) {
deps += [ "//components/policy:generated" ]
}

View File

@ -2,7 +2,7 @@ diff --git content/browser/scheduler/responsiveness/native_event_observer_mac.mm
index 7cb3238e97ed..ae800739b686 100644
--- content/browser/scheduler/responsiveness/native_event_observer_mac.mm
+++ content/browser/scheduler/responsiveness/native_event_observer_mac.mm
@@ -12,13 +12,15 @@
@@ -12,13 +12,15 @@ namespace content {
namespace responsiveness {
void NativeEventObserver::RegisterObserver() {

View File

@ -2,7 +2,7 @@ diff --git content/browser/renderer_host/input/fling_scheduler_mac.mm content/br
index f10c5d161dd1..92a751dd984e 100644
--- content/browser/renderer_host/input/fling_scheduler_mac.mm
+++ content/browser/renderer_host/input/fling_scheduler_mac.mm
@@ -26,6 +26,10 @@
@@ -26,6 +26,10 @@ ui::Compositor* FlingSchedulerMac::GetCompositor() {
return nullptr;
}

View File

@ -1,21 +1,57 @@
diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc
index d53d5928a3fe..bcfb656ea23f 100644
--- base/message_loop/message_loop.cc
+++ base/message_loop/message_loop.cc
@@ -294,6 +294,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) {
#endif
}
+MessageLoopForUI::MessageLoopForUI(std::unique_ptr<MessagePump> pump)
+ : MessageLoop(TYPE_UI, BindOnce(&ReturnPump, std::move(pump))) {}
+
// static
MessageLoopCurrentForUI MessageLoopForUI::current() {
return MessageLoopCurrentForUI::Get();
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
index 04d45ae30fa8..d4dfc58c8df9 100644
--- base/message_loop/message_loop.h
+++ base/message_loop/message_loop.h
@@ -294,6 +294,9 @@ class BASE_EXPORT MessageLoop {
SEQUENCE_MANAGER,
};
+ // Called from Thread::CleanUp() to release resources.
+ void ReleasePump() { pump_ = nullptr; }
+
//----------------------------------------------------------------------------
protected:
using MessagePumpFactoryCallback =
@@ -402,6 +405,7 @@ class BASE_EXPORT MessageLoop {
class BASE_EXPORT MessageLoopForUI : public MessageLoop {
public:
explicit MessageLoopForUI(Type type = TYPE_UI);
+ explicit MessageLoopForUI(std::unique_ptr<MessagePump> pump);
// TODO(gab): Mass migrate callers to MessageLoopCurrentForUI::Get()/IsSet().
static MessageLoopCurrentForUI current();
diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc
index c87c4321d137..dbed6fc8f721 100644
index dca465455e36..bc2dc7c33110 100644
--- base/message_loop/message_loop_current.cc
+++ base/message_loop/message_loop_current.cc
@@ -53,6 +53,8 @@ void MessageLoopCurrent::AddDestructionObserver(
@@ -49,6 +49,8 @@ void MessageLoopCurrent::AddDestructionObserver(
void MessageLoopCurrent::RemoveDestructionObserver(
DestructionObserver* destruction_observer) {
+ if (!current_)
+ return;
DCHECK_CALLED_ON_VALID_THREAD(current_->bound_thread_checker_);
current_->destruction_observers_.RemoveObserver(destruction_observer);
DCHECK(current_->IsBoundToCurrentThread());
current_->RemoveDestructionObserver(destruction_observer);
}
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
index 74af124dea5b..e81e86662a98 100644
index 56c147d1e739..4afd37ba5b10 100644
--- base/message_loop/message_loop_current.h
+++ base/message_loop/message_loop_current.h
@@ -137,6 +137,16 @@ class BASE_EXPORT MessageLoopCurrent {
@@ -134,6 +134,16 @@ class BASE_EXPORT MessageLoopCurrent {
// posted tasks.
void SetAddQueueTimeToTasks(bool enable);
@ -32,10 +68,26 @@ index 74af124dea5b..e81e86662a98 100644
// Enables or disables the recursive task processing. This happens in the case
// of recursive message loops. Some unwanted message loops may occur when
// using common controls or printer functions. By default, recursive task
@@ -221,6 +231,13 @@ class BASE_EXPORT MessageLoopCurrent {
MessageLoop* ToMessageLoopDeprecated() const { return current_; }
@@ -187,7 +197,6 @@ class BASE_EXPORT MessageLoopCurrent {
// level.
bool IsIdleForTesting();
MessageLoop* current_;
- protected:
// Binds |current| to the current thread. It will from then on be the
// MessageLoop driven by MessageLoopCurrent on this thread. This is only meant
// to be invoked by the MessageLoop itself.
@@ -198,6 +207,7 @@ class BASE_EXPORT MessageLoopCurrent {
// meant to be invoked by the MessageLoop itself.
static void UnbindFromCurrentThreadInternal(MessageLoopBase* current);
+ protected:
explicit MessageLoopCurrent(MessageLoopBase* current) : current_(current) {}
friend class MessageLoopImpl;
@@ -215,6 +225,13 @@ class BASE_EXPORT MessageLoopCurrent {
MessageLoopBase* ToMessageLoopBaseDeprecated() const { return current_; }
MessageLoopBase* current_;
+
+#if defined(OS_WIN)
+ private:
@ -46,42 +98,6 @@ index 74af124dea5b..e81e86662a98 100644
};
#if !defined(OS_NACL)
diff --git base/message_loop/message_loop_impl.cc base/message_loop/message_loop_impl.cc
index daf7ca47442a..cad42f7d30a3 100644
--- base/message_loop/message_loop_impl.cc
+++ base/message_loop/message_loop_impl.cc
@@ -724,6 +724,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) {
#endif
}
+MessageLoopForUI::MessageLoopForUI(std::unique_ptr<MessagePump> pump)
+ : MessageLoop(TYPE_UI, BindOnce(&ReturnPump, std::move(pump))) {}
+
// static
MessageLoopCurrentForUI MessageLoopForUI::current() {
return MessageLoopCurrentForUI::Get();
diff --git base/message_loop/message_loop_impl.h base/message_loop/message_loop_impl.h
index 0b8c50532307..0f29ee2bb19a 100644
--- base/message_loop/message_loop_impl.h
+++ base/message_loop/message_loop_impl.h
@@ -200,6 +200,9 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// Runs the specified PendingTask.
void RunTask(PendingTask* pending_task);
+ // Called from Thread::CleanUp() to release resources.
+ void ReleasePump() { pump_ = nullptr; }
+
//----------------------------------------------------------------------------
protected:
std::unique_ptr<MessagePump> pump_;
@@ -372,6 +375,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
class BASE_EXPORT MessageLoopForUI : public MessageLoop {
public:
explicit MessageLoopForUI(Type type = TYPE_UI);
+ explicit MessageLoopForUI(std::unique_ptr<MessagePump> pump);
// TODO(gab): Mass migrate callers to MessageLoopCurrentForUI::Get()/IsSet().
static MessageLoopCurrentForUI current();
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index 1d6748e0e88a..1598fb65484e 100644
--- base/message_loop/message_pump_win.cc

View File

@ -1,8 +1,8 @@
diff --git net/url_request/url_request.h net/url_request/url_request.h
index e6efafc6a973..920608f96b38 100644
index 6e9a7fb7cbf3..39b7ae2de1a9 100644
--- net/url_request/url_request.h
+++ net/url_request/url_request.h
@@ -730,10 +730,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
@@ -742,10 +742,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
base::WeakPtr<URLRequest> GetWeakPtr();

View File

@ -1,5 +1,5 @@
diff --git BUILD.gn BUILD.gn
index 53a633baf..8228a486e 100644
index e9a87e03c..f4cd02c2d 100644
--- BUILD.gn
+++ BUILD.gn
@@ -201,6 +201,10 @@ jumbo_static_library("pdfium") {
@ -14,7 +14,7 @@ index 53a633baf..8228a486e 100644
# Targets below this are only visible within this file (and to the
diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp
index f924a36e2..e8a046799 100644
index 769ff2ae8..0566a2b6a 100644
--- fpdfsdk/fpdf_view.cpp
+++ fpdfsdk/fpdf_view.cpp
@@ -38,6 +38,7 @@
@ -25,7 +25,7 @@ index f924a36e2..e8a046799 100644
#include "fxjs/ijs_runtime.h"
#include "public/fpdf_formfill.h"
#include "third_party/base/ptr_util.h"
@@ -195,6 +196,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
@@ -183,6 +184,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@ -23,7 +23,7 @@ index e648532ff596..570861ca3306 100644
record_whole_document(false),
save_previous_document_resources(SavePreviousDocumentResources::NEVER),
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
index 7661f2cd7e58..751eb84d0f4d 100644
index 40c92b166696..e59e73012b69 100644
--- content/public/common/web_preferences.h
+++ content/public/common/web_preferences.h
@@ -203,6 +203,7 @@ struct CONTENT_EXPORT WebPreferences {
@ -35,13 +35,13 @@ index 7661f2cd7e58..751eb84d0f4d 100644
bool record_whole_document;
SavePreviousDocumentResources save_previous_document_resources;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index c5f15cede024..b24402d534b0 100644
index 53ae7cb8d17f..80381f15849c 100644
--- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc
@@ -1015,6 +1015,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
switches::kEnableExperimentalWebPlatformFeatures)) {
WebRuntimeFeatures::EnableHrefTranslate(prefs.translate_service_available);
}
@@ -1005,6 +1005,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
#endif
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);
+
+ web_view->SetBaseBackgroundColor(prefs.base_background_color);
}

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 81c2bc90ddff..89e129d426d0 100644
index 123a058f4c0b..7c7e16407953 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -369,6 +369,7 @@ jumbo_split_static_library("ui") {
@@ -368,6 +368,7 @@ jumbo_split_static_library("ui") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc/paint",
@ -10,7 +10,7 @@ index 81c2bc90ddff..89e129d426d0 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2265,7 +2266,7 @@ jumbo_split_static_library("ui") {
@@ -2253,7 +2254,7 @@ jumbo_split_static_library("ui") {
"views/frame/native_browser_frame_factory_ozone.cc",
]
} else {
@ -262,7 +262,7 @@ index 7dd892feb181..daa097e62ba2 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
index 69b9a0e39f17..902f0b9e9fcb 100644
index 3a91761b39f8..699ef2146c97 100644
--- components/printing/renderer/print_render_frame_helper.cc
+++ components/printing/renderer/print_render_frame_helper.cc
@@ -343,7 +343,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
@ -297,7 +297,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
// Helper function to scale and round an integer value with a double valued
// scaling.
@@ -1090,10 +1086,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1111,10 +1107,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
return;
if (g_is_preview_enabled) {
@ -308,7 +308,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
} else {
auto weak_this = weak_ptr_factory_.GetWeakPtr();
web_frame->DispatchBeforePrintEvent();
@@ -1121,10 +1115,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
@@ -1142,10 +1136,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message)
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
@ -320,7 +320,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog,
OnClosePrintPreviewDialog)
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -1207,7 +1201,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
@@ -1228,7 +1222,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@ -328,7 +328,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
void PrintRenderFrameHelper::OnPrintPreview(
const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
@@ -1464,7 +1457,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
@@ -1485,7 +1478,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
printable_height / static_cast<double>(uniform_page_size.height);
return static_cast<int>(100.0f * std::min(scale_width, scale_height));
}
@ -336,7 +336,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
void PrintRenderFrameHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1479,7 +1471,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
@@ -1500,7 +1492,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
is_printing_enabled_ = enabled;
}
@ -344,7 +344,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
if (ipc_nesting_level_ > 1)
return;
@@ -1490,7 +1481,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1511,7 +1502,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.IsNull()) {
@ -354,7 +354,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1499,6 +1492,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1520,6 +1513,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
@ -362,7 +362,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
void PrintRenderFrameHelper::OnClosePrintPreviewDialog() {
print_preview_context_.source_frame()->DispatchAfterPrintEvent();
}
@@ -1586,11 +1580,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1607,11 +1601,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
print_node_in_progress_ = true;
@ -375,7 +375,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
} else {
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
// its |context_menu_node_|.
@@ -1666,13 +1658,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1687,13 +1679,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@ -389,7 +389,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
switch (result) {
case OK:
break;
@@ -1687,7 +1677,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
@@ -1708,7 +1698,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@ -397,7 +397,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
case FAIL_PREVIEW:
if (!is_print_ready_metafile_sent_) {
if (notify_browser_of_print_failure_) {
@@ -1705,7 +1694,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
@@ -1726,7 +1715,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
cookie, ids));
print_preview_context_.Failed(false);
break;
@ -405,7 +405,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1880,7 +1868,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1901,7 +1889,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@ -413,7 +413,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
bool PrintRenderFrameHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1973,7 +1960,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
@@ -1994,7 +1981,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
return false;
}
@ -421,7 +421,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
void PrintRenderFrameHelper::GetPrintSettingsFromUser(
blink::WebLocalFrame* frame,
@@ -2125,7 +2111,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
@@ -2146,7 +2132,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
return true;
}
@ -429,7 +429,7 @@ index 69b9a0e39f17..902f0b9e9fcb 100644
void PrintRenderFrameHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -2251,7 +2236,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
@@ -2272,7 +2257,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids));
return true;
}

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 65c16ecd9485..9af4ada63f2e 100644
index 2f878e46f1b3..ff7181298c2f 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -717,10 +717,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
@@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor());
@ -19,7 +19,7 @@ index 65c16ecd9485..9af4ada63f2e 100644
}
void RenderWidgetHostViewAura::WindowTitleChanged() {
@@ -1986,6 +1988,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -1992,6 +1994,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
if (frame_sink_id_.is_valid())
window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@ -14,7 +14,7 @@ index 80198d013f0a..583edc8df4ed 100644
}
diff --git content/browser/background_fetch/background_fetch_service_impl.cc content/browser/background_fetch/background_fetch_service_impl.cc
index f19f58f3fc5a..8b4cdbf75c3f 100644
index 96deec645d8f..82eea5b2c6e2 100644
--- content/browser/background_fetch/background_fetch_service_impl.cc
+++ content/browser/background_fetch/background_fetch_service_impl.cc
@@ -46,8 +46,7 @@ void BackgroundFetchServiceImpl::CreateForWorker(
@ -83,10 +83,10 @@ index f061eca7c86b..0fc07c9c4eb8 100644
partition->GetBluetoothAllowedDevicesMap();
return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin());
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
index 9797767f88ea..3da2c6d57154 100644
index ab4166e3daab..a4867880d9d3 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -203,11 +203,18 @@ StoragePartition* GetStoragePartitionFromConfig(
@@ -206,11 +206,18 @@ StoragePartition* GetStoragePartitionFromConfig(
StoragePartitionImplMap* partition_map =
GetStoragePartitionMap(browser_context);
@ -108,7 +108,7 @@ index 9797767f88ea..3da2c6d57154 100644
}
void SaveSessionStateOnIOThread(
@@ -715,6 +722,11 @@ BrowserContext::BrowserContext()
@@ -709,6 +716,11 @@ BrowserContext::BrowserContext()
new SharedCorsOriginAccessListImpl()));
}
@ -118,13 +118,13 @@ index 9797767f88ea..3da2c6d57154 100644
+}
+
BrowserContext::~BrowserContext() {
CHECK(GetUserData(kMojoWasInitialized))
CHECK(GetUserData(kServiceInstanceGroup))
<< "Attempting to destroy a BrowserContext that never called "
diff --git content/browser/devtools/protocol/network_handler.cc content/browser/devtools/protocol/network_handler.cc
index d6d45b0cf1e4..5054b812c980 100644
index 492f013e7c20..e84b6cd4c4aa 100644
--- content/browser/devtools/protocol/network_handler.cc
+++ content/browser/devtools/protocol/network_handler.cc
@@ -806,8 +806,7 @@ class BackgroundSyncRestorer {
@@ -805,8 +805,7 @@ class BackgroundSyncRestorer {
scoped_refptr<ServiceWorkerDevToolsAgentHost> service_worker_host =
static_cast<ServiceWorkerDevToolsAgentHost*>(host.get());
scoped_refptr<BackgroundSyncContext> sync_context =
@ -171,12 +171,12 @@ index ec9ab86d0ca6..0fe5219f1e84 100644
base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_;
diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc
index 360d3f4cfa3f..e9b46ce4d493 100644
index 601e888167c4..5bbd3e6804b6 100644
--- content/browser/download/download_manager_impl.cc
+++ content/browser/download/download_manager_impl.cc
@@ -88,9 +88,9 @@
namespace content {
namespace {
@@ -99,9 +99,9 @@ void DeleteDownloadedFileOnUIThread(const base::FilePath& file_path) {
}
#endif
-StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
- int render_process_id,
@ -187,7 +187,7 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
DCHECK_CURRENTLY_ON(BrowserThread::UI);
SiteInstance* site_instance = nullptr;
@@ -100,8 +100,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
@@ -111,8 +111,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context,
if (render_frame_host_)
site_instance = render_frame_host_->GetSiteInstance();
}
@ -196,8 +196,8 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
+ return BrowserContext::GetStoragePartition(context, site_instance);
}
bool CanRequestURLFromRenderer(int render_process_id, GURL url) {
@@ -269,7 +268,7 @@ base::FilePath GetTemporaryDownloadDirectory() {
void OnDownloadStarted(
@@ -268,7 +267,7 @@ base::FilePath GetTemporaryDownloadDirectory() {
#endif
scoped_refptr<download::DownloadURLLoaderFactoryGetter>
@ -206,7 +206,7 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
RenderFrameHost* rfh,
bool is_download) {
network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info;
@@ -286,7 +285,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition,
@@ -285,7 +284,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition,
}
}
return base::MakeRefCounted<NetworkDownloadURLLoaderFactoryGetter>(
@ -215,7 +215,7 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
std::move(proxy_factory_ptr_info), std::move(proxy_factory_request));
}
@@ -1181,7 +1180,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete(
@@ -1200,7 +1199,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete(
tab_referrer_url = entry->GetReferrer().url;
}
}
@ -224,7 +224,7 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
GetStoragePartition(browser_context_, render_process_id, render_frame_id);
in_progress_manager_->InterceptDownloadFromNavigation(
std::move(resource_request), render_process_id, render_frame_id, site_url,
@@ -1231,10 +1230,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
@@ -1250,10 +1249,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
base::MakeRefCounted<WebUIDownloadURLLoaderFactoryGetter>(
rfh, params->url());
} else if (rfh && params->url().SchemeIsFileSystem()) {
@ -237,7 +237,7 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
std::string storage_domain;
auto* site_instance = rfh->GetSiteInstance();
if (site_instance) {
@@ -1249,10 +1246,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
@@ -1268,10 +1265,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete(
params->url(), rfh, /*is_navigation=*/false,
storage_partition->GetFileSystemContext(), storage_domain);
} else {
@ -251,10 +251,10 @@ index 360d3f4cfa3f..e9b46ce4d493 100644
CreateDownloadURLLoaderFactoryGetter(storage_partition, rfh, true);
}
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 0a79585856ef..b4171c34ba0f 100644
index 97f10dca2810..01f9329493ca 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -1220,7 +1220,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
@@ -1196,7 +1196,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
// path does as well for navigations.
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
-1 /* render_process_id */, -1 /* render_frame_id */, resource_context_,
@ -263,9 +263,9 @@ index 0a79585856ef..b4171c34ba0f 100644
false /* allow_wildcard */, &stale, &plugin, nullptr);
if (stale) {
@@ -1585,7 +1585,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
request_info.get(), frame_tree_node_id, allow_download_);
new_request->transition_type = request_info->common_params.transition;
@@ -1583,7 +1583,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
CreateResourceRequest(request_info.get(), frame_tree_node_id,
IsNavigationDownloadAllowed(download_policy_));
- auto* partition = static_cast<StoragePartitionImpl*>(storage_partition);
+ auto* partition = storage_partition;
@ -289,10 +289,10 @@ index c2ee504cd0c7..422dc641d0a0 100644
partition->GetPaymentAppContext();
diff --git content/browser/payments/payment_app_provider_impl.cc content/browser/payments/payment_app_provider_impl.cc
index b7d061534de6..34b301f53e28 100644
index d821dc59609c..58ff1bc59fed 100644
--- content/browser/payments/payment_app_provider_impl.cc
+++ content/browser/payments/payment_app_provider_impl.cc
@@ -369,10 +369,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context,
@@ -365,10 +365,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context,
ServiceWorkerStartCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -307,7 +307,7 @@ index b7d061534de6..34b301f53e28 100644
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO},
@@ -446,8 +447,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
@@ -442,8 +443,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
GetAllPaymentAppsCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -319,7 +319,7 @@ index b7d061534de6..34b301f53e28 100644
partition->GetPaymentAppContext();
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 982f3318f459..7f0f4119f8c7 100644
index 9586e9b9d28e..a82a49c51824 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -749,11 +749,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
@ -338,7 +338,7 @@ index 982f3318f459..7f0f4119f8c7 100644
// Is this the default storage partition? If it isn't, then just give it its
// own non-shared process.
@@ -1493,7 +1492,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() {
@@ -1499,7 +1498,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() {
// static
RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
BrowserContext* browser_context,
@ -347,7 +347,7 @@ index 982f3318f459..7f0f4119f8c7 100644
SiteInstance* site_instance,
bool is_for_guests_only) {
if (g_render_process_host_factory_) {
@@ -1502,8 +1501,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
@@ -1508,8 +1507,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost(
}
if (!storage_partition_impl) {
@ -358,7 +358,7 @@ index 982f3318f459..7f0f4119f8c7 100644
}
// If we've made a StoragePartition for guests (e.g., for the <webview> tag),
// stash the Site URL on it. This way, when we start a service worker inside
@@ -1528,7 +1527,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority =
@@ -1534,7 +1533,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority =
RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context,
@ -367,7 +367,7 @@ index 982f3318f459..7f0f4119f8c7 100644
bool is_for_guests_only)
: fast_shutdown_started_(false),
deleting_soon_(false),
@@ -1579,10 +1578,12 @@ RenderProcessHostImpl::RenderProcessHostImpl(
@@ -1585,10 +1584,12 @@ RenderProcessHostImpl::RenderProcessHostImpl(
permission_service_context_(new PermissionServiceContext(this)),
indexed_db_factory_(new IndexedDBDispatcherHost(
id_,
@ -382,7 +382,7 @@ index 982f3318f459..7f0f4119f8c7 100644
id_)),
channel_connected_(false),
sent_render_process_ready_(false),
@@ -1618,7 +1619,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
@@ -1621,7 +1622,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
}
push_messaging_manager_.reset(new PushMessagingManager(
@ -392,7 +392,7 @@ index 982f3318f459..7f0f4119f8c7 100644
AddObserver(indexed_db_factory_.get());
AddObserver(service_worker_dispatcher_host_.get());
@@ -1945,6 +1947,15 @@ void RenderProcessHostImpl::ResetChannelProxy() {
@@ -1950,6 +1952,15 @@ void RenderProcessHostImpl::ResetChannelProxy() {
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -408,7 +408,7 @@ index 982f3318f459..7f0f4119f8c7 100644
MediaInternals* media_internals = MediaInternals::GetInstance();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
// from guests.
@@ -1983,10 +1994,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1988,10 +1999,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
ChromeBlobStorageContext::GetFor(browser_context);
resource_message_filter_ = new ResourceMessageFilter(
@ -421,7 +421,7 @@ index 982f3318f459..7f0f4119f8c7 100644
storage_partition_impl_->GetPrefetchURLLoaderService(),
BrowserContext::GetSharedCorsOriginAccessList(browser_context),
std::move(get_contexts_callback),
@@ -1996,8 +2007,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -2001,8 +2012,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
@ -431,7 +431,7 @@ index 982f3318f459..7f0f4119f8c7 100644
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
AddFilter(peer_connection_tracker_host_.get());
@@ -2014,10 +2024,6 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -2019,10 +2029,6 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new TraceMessageFilter(GetID()));
AddFilter(new ResolveProxyMsgHelper(GetID()));
@ -442,7 +442,7 @@ index 982f3318f459..7f0f4119f8c7 100644
}
void RenderProcessHostImpl::BindCacheStorage(
@@ -2029,7 +2035,8 @@ void RenderProcessHostImpl::BindCacheStorage(
@@ -2034,7 +2040,8 @@ void RenderProcessHostImpl::BindCacheStorage(
cache_storage_dispatcher_host_ =
base::MakeRefCounted<CacheStorageDispatcherHost>();
cache_storage_dispatcher_host_->Init(
@ -452,7 +452,7 @@ index 982f3318f459..7f0f4119f8c7 100644
}
// Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO
// thread entirely.
@@ -2209,7 +2216,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
@@ -2214,7 +2221,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(base::BindRepeating(
&CodeCacheHostImpl::Create, GetID(),
@ -462,7 +462,7 @@ index 982f3318f459..7f0f4119f8c7 100644
base::RetainedRef(
storage_partition_impl_->GetGeneratedCodeCacheContext())));
@@ -2220,7 +2228,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
@@ -2225,7 +2233,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
registry->AddInterface(base::BindRepeating(
&AppCacheDispatcherHost::Create,
@ -472,7 +472,7 @@ index 982f3318f459..7f0f4119f8c7 100644
GetID()));
AddUIThreadInterface(
@@ -2265,6 +2274,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
@@ -2277,6 +2286,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
plugin_registry_.reset(
new PluginRegistryImpl(GetBrowserContext()->GetResourceContext()));
}
@ -483,10 +483,10 @@ index 982f3318f459..7f0f4119f8c7 100644
&PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get())));
#endif
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index b07197ec6ca4..bcaa9b6b7e06 100644
index 08b221ddb08d..240393ddf21d 100644
--- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h
@@ -96,7 +96,6 @@ class ServiceWorkerDispatcherHost;
@@ -98,7 +98,6 @@ class ServiceWorkerDispatcherHost;
class SiteInstance;
class SiteInstanceImpl;
class StoragePartition;
@ -494,7 +494,7 @@ index b07197ec6ca4..bcaa9b6b7e06 100644
struct ChildProcessTerminationInfo;
typedef base::Thread* (*RendererMainThreadFactoryFunction)(
@@ -138,7 +137,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -140,7 +139,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// null.
static RenderProcessHost* CreateRenderProcessHost(
BrowserContext* browser_context,
@ -503,7 +503,7 @@ index b07197ec6ca4..bcaa9b6b7e06 100644
SiteInstance* site_instance,
bool is_for_guests_only);
@@ -488,7 +487,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -490,7 +489,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Use CreateRenderProcessHost() instead of calling this constructor
// directly.
RenderProcessHostImpl(BrowserContext* browser_context,
@ -513,8 +513,8 @@ index b07197ec6ca4..bcaa9b6b7e06 100644
// Initializes a new IPC::ChannelProxy in |channel_|, which will be connected
@@ -745,10 +744,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
// called.
int instance_id_ = 1;
// The globally-unique identifier for this RPH.
const int id_;
- BrowserContext* const browser_context_;
+ BrowserContext* browser_context_;
@ -597,7 +597,7 @@ index c29c9585d775..3bb2296211fa 100644
std::move(subresource_loader_factories), service_worker_context_,
appcache_handle_core,
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
index 936ac4517ba0..0f410e77d8ee 100644
index b485cde5d194..71bb49f1b15f 100644
--- content/browser/storage_partition_impl.h
+++ content/browser/storage_partition_impl.h
@@ -96,7 +96,7 @@ class CONTENT_EXPORT StoragePartitionImpl
@ -632,9 +632,9 @@ index 936ac4517ba0..0f410e77d8ee 100644
// blink::mojom::StoragePartitionService interface.
void OpenLocalStorage(const url::Origin& origin,
@@ -158,18 +158,19 @@ class CONTENT_EXPORT StoragePartitionImpl
const std::vector<url::Origin>& origins,
OnCanSendReportingReportsCallback callback) override;
@@ -161,18 +161,19 @@ class CONTENT_EXPORT StoragePartitionImpl
const GURL& origin,
OnCanSendDomainReliabilityUploadCallback callback) override;
- scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter() {
- return url_loader_factory_getter_;
@ -656,7 +656,7 @@ index 936ac4517ba0..0f410e77d8ee 100644
auto& bindings_for_testing() { return bindings_; }
@@ -180,10 +181,11 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -183,10 +184,11 @@ class CONTENT_EXPORT StoragePartitionImpl
// one must use the "chrome-guest://blahblah" site URL to ensure that the
// service worker stays in this StoragePartition. This is an empty GURL if
// this StoragePartition is not for guests.
@ -699,10 +699,10 @@ index 075ae3e7431e..57fb5fd2c4a8 100644
void InitializeOnIOThread();
diff --git content/browser/webui/web_ui_url_loader_factory.cc content/browser/webui/web_ui_url_loader_factory.cc
index 63fe0125ca1c..698378600723 100644
index 37bab920b5d0..f03662d55b0a 100644
--- content/browser/webui/web_ui_url_loader_factory.cc
+++ content/browser/webui/web_ui_url_loader_factory.cc
@@ -19,7 +19,6 @@
@@ -20,7 +20,6 @@
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/resource_context_impl.h"
@ -710,7 +710,7 @@ index 63fe0125ca1c..698378600723 100644
#include "content/browser/webui/network_error_url_loader.h"
#include "content/browser/webui/url_data_manager_backend.h"
#include "content/browser/webui/url_data_source_impl.h"
@@ -27,6 +26,7 @@
@@ -28,6 +27,7 @@
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
@ -718,7 +718,7 @@ index 63fe0125ca1c..698378600723 100644
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/url_constants.h"
@@ -314,9 +314,8 @@ class WebUIURLLoaderFactory : public network::mojom::URLLoaderFactory,
@@ -320,9 +320,8 @@ class WebUIURLLoaderFactory : public network::mojom::URLLoaderFactory,
const std::string& scheme() const { return scheme_; }
private:
@ -731,10 +731,10 @@ index 63fe0125ca1c..698378600723 100644
RenderFrameHost* render_frame_host_;
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
index c83943e3a2b7..0510eb57151d 100644
index 777d4d608fbe..229cea3e47b3 100644
--- content/public/browser/browser_context.h
+++ content/public/browser/browser_context.h
@@ -238,6 +238,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
@@ -240,6 +240,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
BrowserContext();
@ -743,7 +743,7 @@ index c83943e3a2b7..0510eb57151d 100644
~BrowserContext() override;
// Shuts down the storage partitions associated to this browser context.
@@ -332,6 +334,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
@@ -331,6 +333,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
const base::FilePath& partition_path,
bool in_memory) = 0;

View File

@ -0,0 +1,13 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index 4cb1748d4584..03ad161e9db0 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -46,6 +46,8 @@
X("cc") \
X("cc.debug") \
X("cdp.perf") \
+ X("cef") \
+ X("cef.client") \
X("chromeos") \
X("cma") \
X("compositor") \

View File

@ -1,5 +1,5 @@
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
index a19e6e937f87..817b7eada253 100644
index fb958b187f0b..131f2fe7490e 100644
--- ui/base/models/menu_model.h
+++ ui/base/models/menu_model.h
@@ -15,6 +15,7 @@
@ -10,7 +10,7 @@ index a19e6e937f87..817b7eada253 100644
struct VectorIcon;
}
@@ -121,6 +122,27 @@ class UI_BASE_EXPORT MenuModel {
@@ -124,6 +125,27 @@ class UI_BASE_EXPORT MenuModel {
// |event_flags| is a bit mask of ui::EventFlags.
virtual void ActivatedAt(int index, int event_flags);
@ -102,7 +102,7 @@ index 50eaca5b18eb..038d866fd8d1 100644
};
diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h
index d3a3aa6c2859..b3203f9e38c2 100644
index 572573c3c114..427fbad4413a 100644
--- ui/views/animation/ink_drop_host_view.h
+++ ui/views/animation/ink_drop_host_view.h
@@ -115,6 +115,8 @@ class VIEWS_EXPORT InkDropHostView : public View {
@ -115,10 +115,10 @@ index d3a3aa6c2859..b3203f9e38c2 100644
// Size used for the default SquareInkDropRipple.
static constexpr int kDefaultInkDropSize = 24;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index f9b069b1d9b9..1d79949c62ae 100644
index 8fd404aa2395..e82b1a9708b7 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -191,6 +191,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const {
@@ -192,6 +192,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const {
Label label(GetText(), {label_->font_list()});
label.SetLineHeight(label_->line_height());
label.SetShadows(label_->shadows());
@ -126,8 +126,8 @@ index f9b069b1d9b9..1d79949c62ae 100644
if (style_ == STYLE_BUTTON) {
// Some text appears wider when rendered normally than when rendered bold.
@@ -417,6 +418,12 @@ std::unique_ptr<views::InkDropHighlight> LabelButton::CreateInkDropHighlight()
gfx::RectF(image()->GetMirroredBounds()).CenterPoint());
@@ -424,6 +425,12 @@ void LabelButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
Button::GetAccessibleNodeData(node_data);
}
+void LabelButton::SetFontList(const gfx::FontList& font_list) {
@ -140,12 +140,12 @@ index f9b069b1d9b9..1d79949c62ae 100644
const gfx::Size previous_image_size(image_->GetPreferredSize());
UpdateImage();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
index 1ff051ab8634..6182b45e3df5 100644
index 1a1ab365ad7c..7b4bb7fc87b1 100644
--- ui/views/controls/button/label_button.h
+++ ui/views/controls/button/label_button.h
@@ -99,6 +99,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override;
@@ -100,6 +100,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override;
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
+ // Sets the font list used by this button.
+ void SetFontList(const gfx::FontList& font_list);
@ -153,63 +153,6 @@ index 1ff051ab8634..6182b45e3df5 100644
protected:
ImageView* image() const { return image_; }
Label* label() const;
diff --git ui/views/controls/button/menu_button.cc ui/views/controls/button/menu_button.cc
index 27aed587e9a6..ae8304a04919 100644
--- ui/views/controls/button/menu_button.cc
+++ ui/views/controls/button/menu_button.cc
@@ -179,7 +179,7 @@ bool MenuButton::IsTriggerableEventType(const ui::Event& event) {
gfx::Size MenuButton::CalculatePreferredSize() const {
gfx::Size prefsize = LabelButton::CalculatePreferredSize();
if (show_menu_marker_) {
- prefsize.Enlarge(menu_marker_->width() + kMenuMarkerPaddingLeft +
+ prefsize.Enlarge(menu_marker_->width() + GetMarkerPaddingLeft() +
kMenuMarkerPaddingRight,
0);
}
@@ -311,7 +311,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
gfx::Size s = size();
if (show_menu_marker_) {
- s.set_width(s.width() - menu_marker_->width() - kMenuMarkerPaddingLeft -
+ s.set_width(s.width() - menu_marker_->width() - GetMarkerPaddingLeft() -
kMenuMarkerPaddingRight);
}
@@ -409,4 +409,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
return monitor_bounds.right() - 1;
}
+int MenuButton::GetMarkerPaddingLeft() const {
+ if (!image()->GetImage().isNull() || !label()->text().empty())
+ return kMenuMarkerPaddingLeft;
+ return kMenuMarkerPaddingRight;
+}
+
} // namespace views
diff --git ui/views/controls/button/menu_button.h ui/views/controls/button/menu_button.h
index 8fb11e1cf9cb..bd2951bd948b 100644
--- ui/views/controls/button/menu_button.h
+++ ui/views/controls/button/menu_button.h
@@ -57,6 +57,9 @@ class VIEWS_EXPORT MenuButton : public LabelButton {
~MenuButton() override;
bool show_menu_marker() const { return show_menu_marker_; }
+ void set_show_menu_marker(bool show_menu_marker) {
+ show_menu_marker_ = show_menu_marker;
+ }
void set_menu_marker(const gfx::ImageSkia* menu_marker) {
menu_marker_ = menu_marker;
}
@@ -121,6 +124,9 @@ class VIEWS_EXPORT MenuButton : public LabelButton {
// use this to make sure a menu is never shown off screen.
int GetMaximumScreenXCoordinate();
+ // Only apply left padding if there's an image or label.
+ int GetMarkerPaddingLeft() const;
+
// We use a time object in order to keep track of when the menu was closed.
// The time is used for simulating menu behavior for the menu button; that
// is, if the menu is shown and the button is pressed, we need to close the
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index b5baab3cbb18..ee82e1b05b60 100644
--- ui/views/controls/label.cc
@ -295,10 +238,10 @@ index 9c78b30ab3a0..999eb4048f5c 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 9e56ca54813b..f4100b838507 100644
index b0f4756d729f..0c8a9f3f2f44 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -2451,8 +2451,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
@@ -2457,8 +2457,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@ -313,7 +256,7 @@ index 9e56ca54813b..f4100b838507 100644
MenuItemView* to_select = NULL;
if (item->GetSubmenu()->GetMenuItemCount() > 0)
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
@@ -2467,8 +2472,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2473,8 +2478,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@ -326,10 +269,10 @@ index 9e56ca54813b..f4100b838507 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
index 7544162bd986..450b0aee5f1e 100644
index 69a8ed510b6e..3917e7e17fc7 100644
--- ui/views/controls/menu/menu_delegate.h
+++ ui/views/controls/menu/menu_delegate.h
@@ -82,6 +82,22 @@ class VIEWS_EXPORT MenuDelegate {
@@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate {
// parts of |style| or leave it unmodified.
virtual void GetLabelStyle(int id, LabelStyle* style) const;
@ -352,7 +295,7 @@ index 7544162bd986..450b0aee5f1e 100644
// The tooltip shown for the menu item. This is invoked when the user
// hovers over the item, and no tooltip text has been set for that item.
virtual base::string16 GetTooltipText(int id,
@@ -214,6 +230,11 @@ class VIEWS_EXPORT MenuDelegate {
@@ -213,6 +229,11 @@ class VIEWS_EXPORT MenuDelegate {
bool* has_mnemonics,
MenuButton** button);
@ -365,24 +308,26 @@ index 7544162bd986..450b0aee5f1e 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 7b17d2662ecc..0c577b7c5908 100644
index c26f578b8c62..660095409e0b 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -926,7 +926,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
// only need the background when we want it to look different, as when we're
// selected.
ui::NativeTheme* native_theme = GetNativeTheme();
- if (render_selection) {
@@ -1011,6 +1011,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
+ return;
+ }
+
+ MenuDelegate *delegate = GetDelegate();
+ SkColor override_color;
+ if (delegate && delegate->GetBackgroundColor(GetCommand(),
+ render_selection,
+ &override_color)) {
+ canvas->DrawColor(override_color);
+ } else if (render_selection) {
gfx::Rect item_bounds(0, 0, width(), height());
} else if (render_selection) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == ACTIONABLE_SUBMENU) {
if (submenu_area_of_actionable_submenu_selected_) {
@@ -1046,6 +1051,13 @@ void MenuItemView::PaintMinorIconAndText(
@@ -1077,6 +1086,13 @@ void MenuItemView::PaintMinorIconAndText(
}
SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const {
@ -397,10 +342,10 @@ index 7b17d2662ecc..0c577b7c5908 100644
minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor
: ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor;
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index cbccee16e4c7..e14173e9e832 100644
index 08132c522c1a..a29813f08b69 100644
--- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc
@@ -233,6 +233,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) {
@@ -236,6 +236,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) {
NOTREACHED();
}
@ -504,10 +449,10 @@ index e52edfe5edd7..ab23f3df914e 100644
void WillHideMenu(MenuItemView* menu) override;
void OnMenuClosed(MenuItemView* menu) override;
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index 242725445a82..e766e9b93956 100644
index 0ad986a75c37..504a66d6a7fc 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -182,6 +182,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
@@ -181,6 +181,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_view_ = new MenuScrollView(content_view);
AddChildView(scroll_view_);
@ -520,7 +465,7 @@ index 242725445a82..e766e9b93956 100644
content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition());
diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc
index 3ec1dcbdf822..e2658cec8095 100644
index 0180b30d383a..c0724b6b80a7 100644
--- ui/views/test/ui_controls_factory_desktop_aurax11.cc
+++ ui/views/test/ui_controls_factory_desktop_aurax11.cc
@@ -140,10 +140,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
@ -535,7 +480,7 @@ index 3ec1dcbdf822..e2658cec8095 100644
// Move the cursor because EnterNotify/LeaveNotify are generated with the
// current mouse position as a result of XGrabPointer()
diff --git ui/views/view.h ui/views/view.h
index 161e015c0448..4b36bfd17082 100644
index 998c87a3d6f9..0a587a4b7221 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -19,6 +19,7 @@

View File

@ -1,49 +0,0 @@
diff --git ui/views/accessibility/ax_virtual_view.cc ui/views/accessibility/ax_virtual_view.cc
index f2ad0e75..0660d4d 100644
--- ui/views/accessibility/ax_virtual_view.cc
+++ ui/views/accessibility/ax_virtual_view.cc
@@ -19,13 +19,6 @@
namespace views {
-// GetClassName will be mapped to GetClassNameW if windows.h has been included
-// and the UNICODE macro has been defined. We need to undef it to use it in this
-// file.
-#ifdef GetClassName
-#undef GetClassName
-#endif
-
// static
const char AXVirtualView::kViewClassName[] = "AXVirtualView";
@@ -34,7 +27,7 @@
ax_platform_node_ = ui::AXPlatformNode::Create(this);
DCHECK(ax_platform_node_);
custom_data_.AddStringAttribute(ax::mojom::StringAttribute::kClassName,
- GetClassName());
+ GetViewClassName());
}
AXVirtualView::~AXVirtualView() {
@@ -148,7 +141,7 @@
: -1;
}
-const char* AXVirtualView::GetClassName() const {
+const char* AXVirtualView::GetViewClassName() const {
return kViewClassName;
}
diff --git ui/views/accessibility/ax_virtual_view.h ui/views/accessibility/ax_virtual_view.h
index c18eab3..c7e08d3 100644
--- ui/views/accessibility/ax_virtual_view.h
+++ ui/views/accessibility/ax_virtual_view.h
@@ -98,7 +98,7 @@
// Other methods.
//
- const char* GetClassName() const;
+ const char* GetViewClassName() const;
gfx::NativeViewAccessible GetNativeObject() const;
void NotifyAccessibilityEvent(ax::mojom::Event event_type);
// Allows clients to modify the AXNodeData for this virtual view.

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 986a78be69ae..b1958015b254 100644
index be2d44821a7f..652a87c82171 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -562,6 +562,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
@@ -581,6 +581,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const {
return screen_info.device_scale_factor;
}
@ -18,7 +18,7 @@ index 986a78be69ae..b1958015b254 100644
return renderer_frame_number_;
}
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 0dd9895e0fbf..9dcd68aa6a8d 100644
index 25ae62e0960e..070e00f9603d 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -84,6 +84,7 @@ class CursorManager;
@ -48,7 +48,7 @@ index 0dd9895e0fbf..9dcd68aa6a8d 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
@@ -493,6 +499,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -489,6 +495,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// helps to position the full screen widget on the correct monitor.
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
@ -61,7 +61,7 @@ index 0dd9895e0fbf..9dcd68aa6a8d 100644
// Sets the cursor for this view to the one associated with the specified
// cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -682,6 +694,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -690,6 +702,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
bool is_currently_scrolling_viewport_ = false;
@ -70,8 +70,8 @@ index 0dd9895e0fbf..9dcd68aa6a8d 100644
+ bool has_external_parent_;
+
private:
void SynchronizeVisualProperties();
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index f0e7d2d03ea6..ede1eb76a087 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
@ -135,7 +135,7 @@ index f772f64d656e..7d13f9f81b6c 100644
return host ? host->GetAcceleratedWidget() : NULL;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index a039a7abe57b..17a006e3025f 100644
index 1b289dae84f0..f899fc66eb86 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -89,6 +89,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@ -160,7 +160,7 @@ index a039a7abe57b..17a006e3025f 100644
remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
@@ -873,11 +878,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -872,11 +877,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@ -179,10 +179,10 @@ index a039a7abe57b..17a006e3025f 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index bd8593d675d1..dde9c19f91f2 100644
index 4a958100990d..38f08ec723aa 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -286,6 +286,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -285,6 +285,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
@ -194,10 +194,10 @@ index bd8593d675d1..dde9c19f91f2 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 0cbcfa05c236..abc7b4806fa9 100644
index 9fd46f654e81..73e92b6b68a3 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -145,6 +145,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -146,6 +146,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
use_native_frame_(false),
should_maximize_after_map_(false),
use_argb_visual_(false),
@ -205,7 +205,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
drag_drop_client_(NULL),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
@@ -157,6 +158,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -158,6 +159,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
has_window_focus_(false),
has_pointer_focus_(false),
modal_dialog_counter_(0),
@ -213,7 +213,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
close_widget_factory_(this),
weak_factory_(this) {}
@@ -192,6 +194,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
@@ -193,6 +195,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
}
gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
@ -222,7 +222,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
return bounds_in_pixels_;
}
@@ -502,7 +506,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
@@ -503,7 +507,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources.
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@ -232,7 +232,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
xwindow_ = x11::None;
desktop_native_widget_aura_->OnHostClosed();
@@ -644,6 +649,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
@@ -645,6 +650,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@ -241,7 +241,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
return ToDIPRect(bounds_in_pixels_);
}
@@ -1273,6 +1280,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
@@ -1272,6 +1279,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
@ -250,7 +250,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
return bounds_in_pixels_.origin();
}
@@ -1413,7 +1422,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1412,7 +1421,6 @@ void DesktopWindowTreeHostX11::InitX11Window(
XAtom window_type;
switch (params.type) {
case Widget::InitParams::TYPE_MENU:
@ -258,7 +258,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU");
break;
case Widget::InitParams::TYPE_TOOLTIP:
@@ -1469,9 +1477,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1468,9 +1476,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
attribute_mask |= CWBorderPixel;
swa.border_pixel = 0;
@ -275,7 +275,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(),
0, // border width
@@ -2084,6 +2098,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -2089,6 +2103,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@ -287,7 +287,7 @@ index 0cbcfa05c236..abc7b4806fa9 100644
case x11::FocusOut:
OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index d147f4728780..2d0a00c4d5d3 100644
index c547609abf03..5092e2a38b67 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@ -303,7 +303,7 @@ index d147f4728780..2d0a00c4d5d3 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(const Widget::InitParams& params) override;
@@ -326,6 +332,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -325,6 +331,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|.
gfx::Rect bounds_in_pixels_;
@ -313,7 +313,7 @@ index d147f4728780..2d0a00c4d5d3 100644
// Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -366,6 +375,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -365,6 +374,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window.
bool use_argb_visual_;
@ -324,7 +324,7 @@ index d147f4728780..2d0a00c4d5d3 100644
DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -455,6 +468,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -454,6 +467,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
uint32_t modal_dialog_counter_;
@ -427,7 +427,7 @@ index c7296fed234d..244d0034a1c4 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 0207ba29accd..e543300a6993 100644
index 45ef586d14ba..0564d6b72514 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -2888,10 +2888,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/vr/BUILD.gn chrome/browser/vr/BUILD.gn
index 8807045a1241..84c2d8e381ff 100644
index f975b2ac0d7a..cb4bff4ca164 100644
--- chrome/browser/vr/BUILD.gn
+++ chrome/browser/vr/BUILD.gn
@@ -406,6 +406,7 @@ source_set("vr_base") {
@@ -417,6 +417,7 @@ source_set("vr_base") {
]
deps = [

View File

@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index f37cfab00c89..cb5365843acc 100644
index 359a2049fa40..c00d6438a350 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -2004,21 +2004,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1964,21 +1964,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -45,7 +45,7 @@ index f37cfab00c89..cb5365843acc 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -2712,6 +2721,15 @@ void WebContentsImpl::CreateNewWindow(
@@ -2672,6 +2681,15 @@ void WebContentsImpl::CreateNewWindow(
create_params.renderer_initiated_creation =
main_frame_route_id != MSG_ROUTING_NONE;
@ -61,7 +61,7 @@ index f37cfab00c89..cb5365843acc 100644
std::unique_ptr<WebContents> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -2744,7 +2762,7 @@ void WebContentsImpl::CreateNewWindow(
@@ -2704,7 +2722,7 @@ void WebContentsImpl::CreateNewWindow(
// TODO(brettw): It seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
new_view->CreateViewForWidget(
@ -70,7 +70,7 @@ index f37cfab00c89..cb5365843acc 100644
}
// Save the created window associated with the route so we can show it
// later.
@@ -6193,7 +6211,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
@@ -6148,7 +6166,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(
RenderViewHost* render_view_host) {
RenderWidgetHostViewBase* rwh_view =
@ -95,10 +95,10 @@ index df508da0aef2..f6f4bf42b108 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 6a3dfc302af9..4c50d4d18a10 100644
index 91b19a2f74d2..80e8435d7146 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -74,9 +74,11 @@ class BrowserPluginGuestDelegate;
@@ -73,9 +73,11 @@ class BrowserPluginGuestDelegate;
class InterstitialPage;
class RenderFrameHost;
class RenderViewHost;
@ -110,7 +110,7 @@ index 6a3dfc302af9..4c50d4d18a10 100644
struct CustomContextMenuContext;
struct DropData;
struct MHTMLGenerationParams;
@@ -216,6 +218,10 @@ class WebContents : public PageNavigator,
@@ -215,6 +217,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents.
blink::WebSandboxFlags starting_sandbox_flags;

View File

@ -10,10 +10,10 @@ index 92e9cb865204..4628c56882b4 100644
+ GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins);
};
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index b9acf7744b61..ec1e92f26560 100644
index e3f1a22160b6..9c34940d429e 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -769,6 +769,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -763,6 +763,11 @@ class BLINK_PLATFORM_EXPORT Platform {
// runs during Chromium's build step).
virtual bool IsTakingV8ContextSnapshot() { return false; }
@ -44,7 +44,7 @@ index 3dac1a5a6f61..4fff23e66f2c 100644
.Top()
.GetSecurityContext()
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index b7c1d06b0f60..42f2e1de4d90 100644
index abaed983fe9c..6657d4144b63 100644
--- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1303,7 +1303,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
@ -85,7 +85,7 @@ index be579710b518..74c2e586ef0e 100644
void DevToolsSession::FlushProtocolNotifications() {
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index 4277312bcad3..ca460b9ec0ca 100644
index 29aad26cb485..f827eea52dbd 100644
--- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc
@@ -168,7 +168,8 @@ Page::Page(PageClients& page_clients)

View File

@ -1,5 +1,5 @@
diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc
index 5b053a4de084..0f16f6af5b62 100644
index 6480104f7b21..2abecbbadeb8 100644
--- third_party/blink/renderer/core/input/pointer_event_manager.cc
+++ third_party/blink/renderer/core/input/pointer_event_manager.cc
@@ -281,7 +281,7 @@ void PointerEventManager::HandlePointerInterruption(

View File

@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index 6f6e6c1f6415..d193e0551a7a 100644
index 3a49f93fe488..b8c84c72188a 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -356,6 +356,7 @@ class WebView : protected WebWidget {
@@ -325,6 +325,7 @@ class WebView {
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
@ -10,7 +10,7 @@ index 6f6e6c1f6415..d193e0551a7a 100644
// Hides any popup (suggestions, selects...) that might be showing.
virtual void HidePopups() = 0;
@@ -380,6 +381,8 @@ class WebView : protected WebWidget {
@@ -349,6 +350,8 @@ class WebView {
unsigned inactive_background_color,
unsigned inactive_foreground_color) = 0;
@ -20,7 +20,7 @@ index 6f6e6c1f6415..d193e0551a7a 100644
// Call these methods before and after running a nested, modal event loop
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 5e37307d15af..7ea556994091 100644
index 295828c1f467..24868ae69280 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -234,8 +234,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@ -48,10 +48,10 @@ index 5e37307d15af..7ea556994091 100644
suppress_next_keypress_event_(false),
ime_accept_events_(true),
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index 55ae4d62e281..439725428113 100644
index bcb1519760fe..da720ab3b922 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -105,7 +105,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -107,7 +107,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@ -61,8 +61,8 @@ index 55ae4d62e281..439725428113 100644
// WebWidget methods:
void SetLayerTreeView(WebLayerTreeView*) override;
@@ -242,7 +243,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
HitTestResult CoreHitTestResultAt(const WebPoint&);
@@ -247,7 +248,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
HitTestResult CoreHitTestResultAt(const gfx::Point&);
void InvalidateRect(const IntRect&);
- void SetBaseBackgroundColor(SkColor);
@ -70,7 +70,7 @@ index 55ae4d62e281..439725428113 100644
void SetBaseBackgroundColorOverride(SkColor);
void ClearBaseBackgroundColorOverride();
void SetBackgroundColorOverride(SkColor);
@@ -595,6 +596,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -596,6 +597,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_;
bool fake_page_scale_animation_use_anchor_;
@ -80,10 +80,10 @@ index 55ae4d62e281..439725428113 100644
TransformationMatrix device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index bd8d617a9485..9fe133ddf645 100644
index 76213af6df93..cab9fbb91ff1 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -809,7 +809,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
@@ -797,7 +797,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
index d7b5a63a0161..e4980392b1a6 100644
index 05a1108ec2cc..163d2c263155 100644
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
@@ -18,6 +18,7 @@

View File

@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 3e96804846ad..40d0e1bc7dcb 100644
index 6d72834d4d58..9f6bd9780682 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -4505,7 +4505,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -4514,7 +4514,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
</if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">

View File

@ -1,5 +1,5 @@
diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc
index 95cffa1b4eec..691ca2f622f8 100644
index 08727deede74..4bc8184943f9 100644
--- services/service_manager/sandbox/win/sandbox_win.cc
+++ services/service_manager/sandbox/win/sandbox_win.cc
@@ -912,8 +912,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(

View File

@ -76,7 +76,7 @@ CefRefPtr<CefMenuModel> ViewsMenuBar::CreateMenuModel(const CefString& label,
// Create the new MenuButton.
CefRefPtr<CefMenuButton> button =
CefMenuButton::CreateMenuButton(this, label, false, false);
CefMenuButton::CreateMenuButton(this, label, false);
button->SetID(new_menu_id);
views_style::ApplyTo(button.get());
button->SetInkDropEnabled(true);

View File

@ -760,7 +760,7 @@ void ViewsWindow::AddControls() {
// Create the menu button.
CefRefPtr<CefMenuButton> menu_button =
CefMenuButton::CreateMenuButton(this, CefString(), false, false);
CefMenuButton::CreateMenuButton(this, CefString(), false);
menu_button->SetID(ID_MENU_BUTTON);
menu_button->SetImage(
CEF_BUTTON_STATE_NORMAL,
@ -905,7 +905,7 @@ void ViewsWindow::UpdateExtensionControls() {
for (int id = ID_EXTENSION_BUTTON_FIRST;
it != extensions_.end() && id <= ID_EXTENSION_BUTTON_LAST; ++id, ++it) {
CefRefPtr<CefMenuButton> button =
CefMenuButton::CreateMenuButton(this, CefString(), false, false);
CefMenuButton::CreateMenuButton(this, CefString(), false);
button->SetID(id);
button->SetImage(CEF_BUTTON_STATE_NORMAL, (*it).image_);
views_style::ApplyTo(button.get());

View File

@ -68,7 +68,7 @@ enum TracingTestType {
TT_TRACE_EVENT_COPY_ASYNC_END2
};
const char kTraceTestCategory[] = "test_category";
const char kTraceTestCategory[] = "cef.client";
class TracingTestHandler : public CefEndTracingCallback,
public CefCompletionCallback {

View File

@ -129,26 +129,18 @@ void LabelButtonStyleFramelessImpl() {
LabelButtonStyle(false);
}
void MenuButtonStyle(bool with_frame, bool with_menu_marker) {
void MenuButtonStyle(bool with_frame) {
CefRefPtr<CefMenuButton> button = CefMenuButton::CreateMenuButton(
new EmptyMenuButtonDelegate(), kButtonText, with_frame, with_menu_marker);
new EmptyMenuButtonDelegate(), kButtonText, with_frame);
VerifyMenuButtonStyle(button);
}
void MenuButtonStyleFramedWithMarkerImpl() {
MenuButtonStyle(true, true);
void MenuButtonStyleFramedImpl() {
MenuButtonStyle(true);
}
void MenuButtonStyleFramedNoMarkerImpl() {
MenuButtonStyle(true, false);
}
void MenuButtonStyleFramelessWithMarkerImpl() {
MenuButtonStyle(false, true);
}
void MenuButtonStyleFramelessNoMarkerImpl() {
MenuButtonStyle(false, false);
void MenuButtonStyleFramelessImpl() {
MenuButtonStyle(false);
}
} // namespace
@ -156,10 +148,8 @@ void MenuButtonStyleFramelessNoMarkerImpl() {
// Test Button getters/setters.
BUTTON_TEST(LabelButtonStyleFramed);
BUTTON_TEST(LabelButtonStyleFrameless);
BUTTON_TEST(MenuButtonStyleFramedWithMarker);
BUTTON_TEST(MenuButtonStyleFramedNoMarker);
BUTTON_TEST(MenuButtonStyleFramelessWithMarker);
BUTTON_TEST(MenuButtonStyleFramelessNoMarker);
BUTTON_TEST(MenuButtonStyleFramed);
BUTTON_TEST(MenuButtonStyleFrameless);
namespace {
@ -491,12 +481,10 @@ class TestMenuButtonDelegate : public CefMenuButtonDelegate,
void RunMenuButtonClick(bool with_frame,
bool with_text,
bool with_menu_marker,
bool with_image,
CefRefPtr<CefWindow> window) {
CefRefPtr<CefMenuButton> button = CefMenuButton::CreateMenuButton(
new TestMenuButtonDelegate(), with_text ? kButtonText : "", with_frame,
with_menu_marker);
new TestMenuButtonDelegate(), with_text ? kButtonText : "", with_frame);
button->SetID(kButtonID);
EXPECT_TRUE(button->AsButton());
@ -533,176 +521,94 @@ void RunMenuButtonClick(bool with_frame,
void MenuButtonClick(CefRefPtr<CefWaitableEvent> event,
bool with_button_frame,
bool with_button_text,
bool with_button_menu_marker,
bool with_button_image,
bool with_window_frame) {
TestWindowDelegate::Config config;
config.on_window_created =
base::Bind(RunMenuButtonClick, with_button_frame, with_button_text,
with_button_menu_marker, with_button_image);
config.on_window_created = base::Bind(RunMenuButtonClick, with_button_frame,
with_button_text, with_button_image);
config.frameless = !with_window_frame;
config.close_window = false;
TestWindowDelegate::RunTest(event, config);
}
void MenuButtonClickFramedWithTextWithMarkerWithImageFramedWindowImpl(
void MenuButtonClickFramedWithTextWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, true, true, true);
MenuButtonClick(event, true, true, true, true);
}
void MenuButtonClickFramedWithTextNoMarkerWithImageFramedWindowImpl(
void MenuButtonClickFramedWithTextNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, false, true, true);
MenuButtonClick(event, true, true, false, true);
}
void MenuButtonClickFramedWithTextWithMarkerNoImageFramedWindowImpl(
void MenuButtonClickFramedWithTextWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, true, false, true);
MenuButtonClick(event, true, true, true, false);
}
void MenuButtonClickFramedWithTextNoMarkerNoImageFramedWindowImpl(
void MenuButtonClickFramedWithTextNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, false, false, true);
MenuButtonClick(event, true, true, false, false);
}
void MenuButtonClickFramedWithTextWithMarkerWithImageFramelessWindowImpl(
void MenuButtonClickFramedNoTextWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, true, true, false);
MenuButtonClick(event, true, false, true, true);
}
void MenuButtonClickFramedWithTextNoMarkerWithImageFramelessWindowImpl(
void MenuButtonClickFramedNoTextNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, false, true, false);
MenuButtonClick(event, true, false, false, true);
}
void MenuButtonClickFramedWithTextWithMarkerNoImageFramelessWindowImpl(
void MenuButtonClickFramedNoTextWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, true, false, false);
MenuButtonClick(event, true, false, true, false);
}
void MenuButtonClickFramedWithTextNoMarkerNoImageFramelessWindowImpl(
void MenuButtonClickFramedNoTextNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, true, false, false, false);
MenuButtonClick(event, true, false, false, false);
}
void MenuButtonClickFramedNoTextWithMarkerWithImageFramedWindowImpl(
void MenuButtonClickFramelessWithTextWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, true, true, true);
MenuButtonClick(event, false, true, true, true);
}
void MenuButtonClickFramedNoTextNoMarkerWithImageFramedWindowImpl(
void MenuButtonClickFramelessWithTextNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, false, true, true);
MenuButtonClick(event, false, true, false, true);
}
void MenuButtonClickFramedNoTextWithMarkerNoImageFramedWindowImpl(
void MenuButtonClickFramelessWithTextWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, true, false, true);
MenuButtonClick(event, false, true, true, false);
}
void MenuButtonClickFramedNoTextNoMarkerNoImageFramedWindowImpl(
void MenuButtonClickFramelessWithTextNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, false, false, true);
MenuButtonClick(event, false, true, false, false);
}
void MenuButtonClickFramedNoTextWithMarkerWithImageFramelessWindowImpl(
void MenuButtonClickFramelessNoTextWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, true, true, false);
MenuButtonClick(event, false, false, true, true);
}
void MenuButtonClickFramedNoTextNoMarkerWithImageFramelessWindowImpl(
void MenuButtonClickFramelessNoTextNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, false, true, false);
MenuButtonClick(event, false, false, false, true);
}
void MenuButtonClickFramedNoTextWithMarkerNoImageFramelessWindowImpl(
void MenuButtonClickFramelessNoTextWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, true, false, false);
MenuButtonClick(event, false, false, true, false);
}
void MenuButtonClickFramedNoTextNoMarkerNoImageFramelessWindowImpl(
void MenuButtonClickFramelessNoTextNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, true, false, false, false, false);
}
void MenuButtonClickFramelessWithTextWithMarkerWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, true, true, true);
}
void MenuButtonClickFramelessWithTextNoMarkerWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, false, true, true);
}
void MenuButtonClickFramelessWithTextWithMarkerNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, true, false, true);
}
void MenuButtonClickFramelessWithTextNoMarkerNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, false, false, true);
}
void MenuButtonClickFramelessWithTextWithMarkerWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, true, true, false);
}
void MenuButtonClickFramelessWithTextNoMarkerWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, false, true, false);
}
void MenuButtonClickFramelessWithTextWithMarkerNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, true, false, false);
}
void MenuButtonClickFramelessWithTextNoMarkerNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, true, false, false, false);
}
void MenuButtonClickFramelessNoTextWithMarkerWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, true, true, true);
}
void MenuButtonClickFramelessNoTextNoMarkerWithImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, false, true, true);
}
void MenuButtonClickFramelessNoTextWithMarkerNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, true, false, true);
}
void MenuButtonClickFramelessNoTextNoMarkerNoImageFramedWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, false, false, true);
}
void MenuButtonClickFramelessNoTextWithMarkerWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, true, true, false);
}
void MenuButtonClickFramelessNoTextNoMarkerWithImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, false, true, false);
}
void MenuButtonClickFramelessNoTextWithMarkerNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, true, false, false);
}
void MenuButtonClickFramelessNoTextNoMarkerNoImageFramelessWindowImpl(
CefRefPtr<CefWaitableEvent> event) {
MenuButtonClick(event, false, false, false, false, false);
MenuButtonClick(event, false, false, false, false);
}
} // namespace
@ -710,53 +616,22 @@ void MenuButtonClickFramelessNoTextNoMarkerNoImageFramelessWindowImpl(
// Test MenuButton functionality. This is primarily to exercise exposed CEF
// APIs and is not intended to comprehensively test button-related behavior
// (which we presume that Chromium is testing).
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramedWithTextNoMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramedWithTextWithMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramedWithTextWithMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramedNoTextWithMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextNoMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextWithMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextWithMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextNoMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextWithMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextNoMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessWithTextWithMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessNoTextWithMarkerWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithMarkerNoImageFramedWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessNoTextNoMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessNoTextWithMarkerWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(
MenuButtonClickFramelessNoTextWithMarkerNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoImageFramedWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithImageFramelessWindow);
BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoImageFramelessWindow);
namespace {
@ -804,9 +679,7 @@ class TestMenuButtonCustomPopupDelegate : public CefMenuButtonDelegate,
return parent_window_;
}
bool IsFrameless(CefRefPtr<CefWindow> window) override {
return true;
}
bool IsFrameless(CefRefPtr<CefWindow> window) override { return true; }
void OnFocus(CefRefPtr<CefView> view) override {
if (popup_window_ && view->GetWindow()->IsSame(popup_window_)) {
@ -842,8 +715,7 @@ class TestMenuButtonCustomPopupDelegate : public CefMenuButtonDelegate,
void RunMenuButtonCustomPopupClick(bool can_activate,
CefRefPtr<CefWindow> window) {
CefRefPtr<CefMenuButton> button = CefMenuButton::CreateMenuButton(
new TestMenuButtonCustomPopupDelegate(can_activate), "Custom", true,
false);
new TestMenuButtonCustomPopupDelegate(can_activate), "Custom", true);
button->SetID(kButtonID);
window->AddChildView(button);