chore: bump chromium to bc8f70ed4cfe2262ea833750eaddb (master) (#22649)

* chore: bump chromium in DEPS to 9321f32fb1b3af8fdfce55c7bbfacf3f75118dca

* Update patches

* Update electron_swiftshader_binaries deps

2056931

* Use Promise with RequestPointerLock calls

2069199

* Replace content::CursorInfo with ui::Cursor

1999201

* Convert MaterialDesignController to a true singleton.

2090877

* Drop WebContentsView::RenderViewCreated hook

2093535

* chore: bump chromium in DEPS to 6478123cfa0102ed754c70eb9bbdd391d676a4dd

* Splitting context_menu_params.h into separate browser VS common parts.

2097468

* Fix DCHECK on OnThemeChanged()

2090713

* chore: bump chromium in DEPS to b0269bb003f699bc8ea7dcba8b0795ef963696d7

* Remove no longer needed patch

* Check PointerLock requests for new options and update accordingly

2071788

* Address issues from review

* Fixup compile error

* Add additional library files

* chore: bump chromium in DEPS to a41285fb8aebc8f70ed4cfe2262ea833750eaddb

* Update patches

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
This commit is contained in:
Electron Bot 2020-03-14 13:54:14 -07:00 committed by GitHub
parent a4c4c86b9d
commit d8737734bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 267 additions and 275 deletions

View file

@ -27,6 +27,7 @@
#include "content/browser/renderer_host/render_widget_host_view_base.h" // nogncheck
#include "content/common/widget_messages.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/download_request_utils.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/native_web_keyboard_event.h"
@ -43,7 +44,6 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/context_menu_params.h"
#include "electron/buildflags/buildflags.h"
#include "electron/shell/common/api/api.mojom.h"
#include "gin/data_object_builder.h"
@ -2390,17 +2390,18 @@ bool WebContents::IsBeingCaptured() {
return web_contents()->IsBeingCaptured();
}
void WebContents::OnCursorChange(const content::WebCursor& cursor) {
const content::CursorInfo& info = cursor.info();
void WebContents::OnCursorChange(const content::WebCursor& webcursor) {
const ui::Cursor& cursor = webcursor.cursor();
if (info.type == ui::mojom::CursorType::kCustom) {
Emit("cursor-changed", CursorTypeToString(info),
gfx::Image::CreateFrom1xBitmap(info.custom_image),
info.image_scale_factor,
gfx::Size(info.custom_image.width(), info.custom_image.height()),
info.hotspot);
if (cursor.type() == ui::mojom::CursorType::kCustom) {
Emit("cursor-changed", CursorTypeToString(cursor),
gfx::Image::CreateFrom1xBitmap(cursor.custom_bitmap()),
cursor.image_scale_factor(),
gfx::Size(cursor.custom_bitmap().width(),
cursor.custom_bitmap().height()),
cursor.custom_hotspot());
} else {
Emit("cursor-changed", CursorTypeToString(info));
Emit("cursor-changed", CursorTypeToString(cursor));
}
}

View file

@ -51,7 +51,6 @@
#include "shell/common/node_bindings.h"
#include "shell/common/node_includes.h"
#include "ui/base/idle/idle.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/ui_base_switches.h"
#if defined(USE_AURA)
@ -375,8 +374,6 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
}
void ElectronBrowserMainParts::ToolkitInitialized() {
ui::MaterialDesignController::Initialize();
#if defined(USE_AURA) && defined(USE_X11)
views::LinuxUI::instance()->Initialize();
#endif

View file

@ -370,9 +370,14 @@ gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() {
void OffScreenRenderWidgetHostView::SetInsets(const gfx::Insets& insets) {}
bool OffScreenRenderWidgetHostView::LockMouse(
blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::LockMouse(
bool request_unadjusted_movement) {
return false;
return blink::mojom::PointerLockResult::kUnsupportedOptions;
}
blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::ChangeMouseLock(
bool request_unadjusted_movement) {
return blink::mojom::PointerLockResult::kUnsupportedOptions;
}
void OffScreenRenderWidgetHostView::UnlockMouse() {}

View file

@ -93,7 +93,10 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
void SetBackgroundColor(SkColor color) override;
base::Optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override;
bool LockMouse(bool request_unadjusted_movement) override;
blink::mojom::PointerLockResult LockMouse(
bool request_unadjusted_movement) override;
blink::mojom::PointerLockResult ChangeMouseLock(
bool request_unadjusted_movement) override;
void UnlockMouse(void) override;
void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override;
#if defined(OS_MACOSX)

View file

@ -33,7 +33,8 @@ void OffScreenWebContentsView::SetWebContents(
content::WebContents* web_contents) {
web_contents_ = web_contents;
RenderViewCreated(web_contents_->GetRenderViewHost());
if (GetView())
GetView()->InstallTransparency();
}
void OffScreenWebContentsView::SetNativeWindow(NativeWindow* window) {
@ -144,12 +145,6 @@ OffScreenWebContentsView::CreateViewForChildWidget(
void OffScreenWebContentsView::SetPageTitle(const base::string16& title) {}
void OffScreenWebContentsView::RenderViewCreated(
content::RenderViewHost* host) {
if (GetView())
GetView()->InstallTransparency();
}
void OffScreenWebContentsView::RenderViewReady() {}
void OffScreenWebContentsView::RenderViewHostChanged(

View file

@ -58,7 +58,6 @@ class OffScreenWebContentsView : public content::WebContentsView,
content::RenderWidgetHostViewBase* CreateViewForChildWidget(
content::RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
void RenderViewCreated(content::RenderViewHost* host) override;
void RenderViewReady() override;
void RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) override;

View file

@ -296,6 +296,7 @@ void MenuBar::RefreshColorCache() {
}
void MenuBar::OnThemeChanged() {
views::AccessiblePaneView::OnThemeChanged();
RefreshColorCache();
UpdateViewColors();
}

View file

@ -73,6 +73,7 @@ class MenuBar : public views::AccessiblePaneView,
bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
bool SetPaneFocus(views::View* initial_focus) override;
void RemovePaneFocus() override;
void OnThemeChanged() override;
protected:
// views::View:
@ -80,7 +81,6 @@ class MenuBar : public views::AccessiblePaneView,
// views::ButtonListener:
void ButtonPressed(views::Button* source, const ui::Event& event) override;
void OnThemeChanged() override;
private:
friend class MenuBarColorUpdater;

View file

@ -43,8 +43,14 @@ void MediaAccessAllowed(const content::MediaStreamRequest& request,
}
void OnPointerLockResponse(content::WebContents* web_contents, bool allowed) {
if (web_contents)
web_contents->GotResponseToLockMouseRequest(allowed);
if (web_contents) {
if (allowed)
web_contents->GotResponseToLockMouseRequest(
blink::mojom::PointerLockResult::kSuccess);
else
web_contents->GotResponseToLockMouseRequest(
blink::mojom::PointerLockResult::kPermissionDenied);
}
}
void OnPermissionResponse(base::OnceCallback<void(bool)> callback,

View file

@ -7,9 +7,10 @@
#include <string>
#include <vector>
#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/untrustworthy_context_menu_params.h"
#include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/web_contents_permission_helper.h"
#include "shell/common/gin_converters/blink_converter.h"

View file

@ -11,8 +11,8 @@ using Cursor = ui::mojom::CursorType;
namespace electron {
std::string CursorTypeToString(const content::CursorInfo& info) {
switch (info.type) {
std::string CursorTypeToString(const ui::Cursor& cursor) {
switch (cursor.type()) {
case Cursor::kPointer:
return "default";
case Cursor::kCross:

View file

@ -27,7 +27,7 @@
namespace electron {
// Returns the cursor's type as a string.
std::string CursorTypeToString(const content::CursorInfo& info);
std::string CursorTypeToString(const ui::Cursor& cursor);
} // namespace electron