Skip to content

Commit

Permalink
chore: bump chromium to 964c4bca8de5c320534d95606c861 (master) (elect…
Browse files Browse the repository at this point in the history
…ron#18440)

* chore: bump chromium in DEPS to 2930eb12d56988c2c80bad2797ab036fe493d4e1

* chore: update patches

* Revert "disable robotjs-based tests"

This reverts commit e56adaf.

* Revert "skip dbus tests (electron#18409)"

This reverts commit aea042c.

* Revert "skip more dbus tests"

This reverts commit 68dbef4.

* chore: bump chromium in DEPS to fd62da5601399b92effaa32a943fcd96143c8605

* chore: bump chromium in DEPS to 99f87ca22ee6e7ec953defe694771cb68f47a596

* chore: bump chromium in DEPS to d88778435b4cd9a510a63385b6d4ba24674b9774

* chore: update patches

* chore: update ssl_security_state_tab_helper.patch

* Remove content_packaged_services

https://chromium-review.googlesource.com/c/chromium/src/+/1604203

* chore: fix false positive lint error

* views: wireup widget name to crash data

https://chromium-review.googlesource.com/c/chromium/src/+/1626640

* chore: bump chromium in DEPS to ab588d36191964c4bca8de5c320534d95606c861

* roll patches
  • Loading branch information
electron-bot authored and deepak1556 committed May 28, 2019
1 parent c621615 commit 96b32a8
Show file tree
Hide file tree
Showing 48 changed files with 207 additions and 789 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gclient_gn_args = [

vars = {
'chromium_version':
'6a008993a2e54af93edd956a53c786668bc0e253',
'ab588d36191964c4bca8de5c320534d95606c861',
'node_version':
'a86a4a160dc520c61a602c949a32a1bc4c0fc633',

Expand Down
24 changes: 20 additions & 4 deletions atom/app/manifests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
#include "chrome/services/printing/public/cpp/manifest.h"
#endif

namespace {

// TODO(https://crbug.com/781334): Remove these helpers and just update the
// manifest definitions to be marked out-of-process. This is here only to avoid
// extra churn when transitioning away from content_packaged_services.
service_manager::Manifest MakeOutOfProcess(
const service_manager::Manifest& manifest) {
// cpplint.py emits a false positive [build/include_what_you_use]
service_manager::Manifest copy(manifest); // NOLINT
copy.options.execution_mode =
service_manager::Manifest::ExecutionMode::kOutOfProcessBuiltin;
return copy;
}

} // namespace

const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
static base::NoDestructor<service_manager::Manifest> manifest{
service_manager::ManifestBuilder()
Expand All @@ -35,14 +51,14 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
}

const std::vector<service_manager::Manifest>&
GetElectronPackagedServicesOverlayManifest() {
GetElectronBuiltinServiceManifests() {
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
proxy_resolver::GetManifest(),
MakeOutOfProcess(proxy_resolver::GetManifest()),
#if BUILDFLAG(ENABLE_PRINTING)
printing::GetPdfCompositorManifest(),
MakeOutOfProcess(printing::GetPdfCompositorManifest()),
#endif
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
GetChromePrintingManifest(),
MakeOutOfProcess(GetChromePrintingManifest()),
#endif
}};
return *manifests;
Expand Down
2 changes: 1 addition & 1 deletion atom/app/manifests.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

const service_manager::Manifest& GetElectronContentBrowserOverlayManifest();
const std::vector<service_manager::Manifest>&
GetElectronPackagedServicesOverlayManifest();
GetElectronBuiltinServiceManifests();

#endif // ATOM_APP_MANIFESTS_H_
13 changes: 6 additions & 7 deletions atom/browser/atom_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -722,17 +722,16 @@ void AtomBrowserClient::RegisterOutOfProcessServices(

base::Optional<service_manager::Manifest>
AtomBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
if (name == content::mojom::kBrowserServiceName) {
if (name == content::mojom::kBrowserServiceName)
return GetElectronContentBrowserOverlayManifest();
} else if (name == content::mojom::kPackagedServicesServiceName) {
service_manager::Manifest overlay;
overlay.packaged_services = GetElectronPackagedServicesOverlayManifest();
return overlay;
}

return base::nullopt;
}

std::vector<service_manager::Manifest>
AtomBrowserClient::GetExtraServiceManifests() {
return GetElectronBuiltinServiceManifests();
}

net::NetLog* AtomBrowserClient::GetNetLog() {
return g_browser_process->net_log();
}
Expand Down
1 change: 1 addition & 0 deletions atom/browser/atom_browser_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class AtomBrowserClient : public content::ContentBrowserClient,
void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override;
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
base::StringPiece name) override;
std::vector<service_manager::Manifest> GetExtraServiceManifests() override;
net::NetLog* GetNetLog() override;
content::MediaObserver* GetMediaObserver() override;
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
Expand Down
7 changes: 1 addition & 6 deletions atom/browser/native_window_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#elif defined(OS_WIN)
#include "atom/browser/ui/views/win_frame_view.h"
#include "atom/browser/ui/win/atom_desktop_native_widget_aura.h"
#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
#include "skia/ext/skia_utils_win.h"
#include "ui/base/win/shell.h"
#include "ui/display/screen.h"
Expand Down Expand Up @@ -186,11 +185,7 @@ NativeWindowViews::NativeWindowViews(const mate::Dictionary& options,
if (parent)
params.parent = parent->GetNativeWindow();

params.native_widget = new AtomDesktopNativeWidgetAura(widget());
atom_desktop_window_tree_host_win_ = new AtomDesktopWindowTreeHostWin(
this, widget(),
static_cast<views::DesktopNativeWidgetAura*>(params.native_widget));
params.desktop_window_tree_host = atom_desktop_window_tree_host_win_;
params.native_widget = new AtomDesktopNativeWidgetAura(this);
#elif defined(USE_X11)
std::string name = Browser::Get()->GetName();
// Set WM_WINDOW_ROLE.
Expand Down
25 changes: 11 additions & 14 deletions atom/browser/native_window_views.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "ui/views/widget/widget_observer.h"

#if defined(OS_WIN)
#include "atom/browser/ui/win/message_handler_delegate.h"
#include "atom/browser/ui/win/taskbar_host.h"
#include "base/win/scoped_gdi_object.h"
#endif
Expand All @@ -30,16 +29,11 @@ class GlobalMenuBarX11;
class RootView;
class WindowStateWatcher;

#if defined(OS_WIN)
class AtomDesktopWindowTreeHostWin;
#elif defined(USE_X11)
#if defined(USE_X11)
class EventDisabler;
#endif

class NativeWindowViews : public NativeWindow,
#if defined(OS_WIN)
public MessageHandlerDelegate,
#endif
public views::WidgetObserver,
public ui::EventHandler {
public:
Expand Down Expand Up @@ -142,6 +136,16 @@ class NativeWindowViews : public NativeWindow,
void DecrementChildModals();

#if defined(OS_WIN)
// Catch-all message handling and filtering. Called before
// HWNDMessageHandler's built-in handling, which may pre-empt some
// expectations in Views/Aura if messages are consumed. Returns true if the
// message was consumed by the delegate and should not be processed further
// by the HWNDMessageHandler. In this case, |result| is returned. |result| is
// not modified otherwise.
bool PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result);
void SetIcon(HICON small_icon, HICON app_icon);
#elif defined(USE_X11)
void SetIcon(const gfx::ImageSkia& icon);
Expand Down Expand Up @@ -180,11 +184,6 @@ class NativeWindowViews : public NativeWindow,
#endif

#if defined(OS_WIN)
// MessageHandlerDelegate:
bool PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) override;
void HandleSizeEvent(WPARAM w_param, LPARAM l_param);
void SetForwardMouseMessages(bool forward);
static LRESULT CALLBACK SubclassProc(HWND hwnd,
Expand Down Expand Up @@ -237,8 +236,6 @@ class NativeWindowViews : public NativeWindow,
#endif

#if defined(OS_WIN)
// Weak ref.
AtomDesktopWindowTreeHostWin* atom_desktop_window_tree_host_win_;

ui::WindowShowState last_window_state_;

Expand Down
18 changes: 16 additions & 2 deletions atom/browser/ui/win/atom_desktop_native_widget_aura.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,32 @@
// found in the LICENSE file.

#include "atom/browser/ui/win/atom_desktop_native_widget_aura.h"

#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"
#include "ui/views/corewm/tooltip_controller.h"
#include "ui/wm/public/tooltip_client.h"

namespace atom {

AtomDesktopNativeWidgetAura::AtomDesktopNativeWidgetAura(
views::internal::NativeWidgetDelegate* delegate)
: views::DesktopNativeWidgetAura(delegate) {
NativeWindowViews* native_window_view)
: views::DesktopNativeWidgetAura(native_window_view->widget()),
native_window_view_(native_window_view) {
GetNativeWindow()->SetName("AtomDesktopNativeWidgetAura");
// This is to enable the override of OnWindowActivated
wm::SetActivationChangeObserver(GetNativeWindow(), this);
}

void AtomDesktopNativeWidgetAura::InitNativeWidget(
const views::Widget::InitParams& params) {
views::Widget::InitParams modified_params = params;
desktop_window_tree_host_ = new AtomDesktopWindowTreeHostWin(
native_window_view_,
static_cast<views::DesktopNativeWidgetAura*>(params.native_widget));
modified_params.desktop_window_tree_host = desktop_window_tree_host_;
views::DesktopNativeWidgetAura::InitNativeWidget(modified_params);
}

void AtomDesktopNativeWidgetAura::Activate() {
// Activate can cause the focused window to be blurred so only
// call when the window being activated is visible. This prevents
Expand Down
16 changes: 14 additions & 2 deletions atom/browser/ui/win/atom_desktop_native_widget_aura.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@
#include "atom/browser/native_window_views.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"

namespace views {
class DesktopWindowTreeHost;
}

namespace atom {

class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
public:
explicit AtomDesktopNativeWidgetAura(
views::internal::NativeWidgetDelegate* delegate);
explicit AtomDesktopNativeWidgetAura(NativeWindowViews* native_window_view);

// views::DesktopNativeWidgetAura:
void InitNativeWidget(const views::Widget::InitParams& params) override;

// internal::NativeWidgetPrivate:
void Activate() override;
Expand All @@ -22,6 +28,12 @@ class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
void OnWindowActivated(wm::ActivationChangeObserver::ActivationReason reason,
aura::Window* gained_active,
aura::Window* lost_active) override;

NativeWindowViews* native_window_view_;

// Owned by DesktopNativeWidgetAura.
views::DesktopWindowTreeHost* desktop_window_tree_host_;

DISALLOW_COPY_AND_ASSIGN(AtomDesktopNativeWidgetAura);
};

Expand Down
11 changes: 4 additions & 7 deletions atom/browser/ui/win/atom_desktop_window_tree_host_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,22 @@

#include "atom/browser/ui/win/atom_desktop_window_tree_host_win.h"

#include "atom/browser/ui/win/message_handler_delegate.h"

namespace atom {

AtomDesktopWindowTreeHostWin::AtomDesktopWindowTreeHostWin(
MessageHandlerDelegate* delegate,
views::internal::NativeWidgetDelegate* native_widget_delegate,
NativeWindowViews* native_window_view,
views::DesktopNativeWidgetAura* desktop_native_widget_aura)
: views::DesktopWindowTreeHostWin(native_widget_delegate,
: views::DesktopWindowTreeHostWin(native_window_view->widget(),
desktop_native_widget_aura),
delegate_(delegate) {}
native_window_view_(native_window_view) {}

AtomDesktopWindowTreeHostWin::~AtomDesktopWindowTreeHostWin() {}

bool AtomDesktopWindowTreeHostWin::PreHandleMSG(UINT message,
WPARAM w_param,
LPARAM l_param,
LRESULT* result) {
return delegate_->PreHandleMSG(message, w_param, l_param, result);
return native_window_view_->PreHandleMSG(message, w_param, l_param, result);
}

bool AtomDesktopWindowTreeHostWin::HasNativeFrame() const {
Expand Down
11 changes: 3 additions & 8 deletions atom/browser/ui/win/atom_desktop_window_tree_host_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@

#include <windows.h>

#include <vector>

#include "atom/browser/native_window.h"
#include "atom/browser/native_window_views.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"

namespace atom {

class MessageHandlerDelegate;

class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin {
public:
AtomDesktopWindowTreeHostWin(
MessageHandlerDelegate* delegate,
views::internal::NativeWidgetDelegate* native_widget_delegate,
NativeWindowViews* native_window_view,
views::DesktopNativeWidgetAura* desktop_native_widget_aura);
~AtomDesktopWindowTreeHostWin() override;

Expand All @@ -32,7 +27,7 @@ class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin {
bool HasNativeFrame() const override;

private:
MessageHandlerDelegate* delegate_; // weak ref
NativeWindowViews* native_window_view_; // weak ref

DISALLOW_COPY_AND_ASSIGN(AtomDesktopWindowTreeHostWin);
};
Expand Down
16 changes: 0 additions & 16 deletions atom/browser/ui/win/message_handler_delegate.cc

This file was deleted.

28 changes: 0 additions & 28 deletions atom/browser/ui/win/message_handler_delegate.h

This file was deleted.

2 changes: 0 additions & 2 deletions filenames.gni
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,6 @@ filenames = {
"atom/browser/ui/win/atom_desktop_window_tree_host_win.h",
"atom/browser/ui/win/jump_list.cc",
"atom/browser/ui/win/jump_list.h",
"atom/browser/ui/win/message_handler_delegate.cc",
"atom/browser/ui/win/message_handler_delegate.h",
"atom/browser/ui/win/notify_icon_host.cc",
"atom/browser/ui/win/notify_icon_host.h",
"atom/browser/ui/win/notify_icon.cc",
Expand Down
2 changes: 1 addition & 1 deletion patches/common/chromium/blink_local_frame.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.

diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 06cf42e8199de15e2c32a59443b1daa1255d8882..4d66c30c45d87e70bce65f384a2944cf2697b1ae 100644
index 58df3d9d8ddc27ad0fe84781e8b9251c55757e0f..84f1dd7bd2a15467f253cc0b5ac612ec2609c2cc 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -392,10 +392,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
Expand Down
Loading

0 comments on commit 96b32a8

Please sign in to comment.