![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 116.0.5793.3 * chore: update patches * chore: bump chromium in DEPS to 116.0.5795.0 * chore: update patches * chore: bump chromium in DEPS to 116.0.5797.0 * chore: update patches * chore: bump chromium in DEPS to 116.0.5799.0 * 4522192: [serial] Allow Bluetooth ports to be requested by service class ID. |4522192
* 4545385: Create base:🍎:Owned[frameworktype], use it for gfx::NativeEvent |4545385
* chore: bump chromium in DEPS to 116.0.5801.0 * chore: update patches * 4562796: Use base:🍎:Owned[frameworktype] for ui::PlatformEvent |4562796
* 4559790: Manual raw_ptr rewrite: //base |4559790
* chore: bump chromium in DEPS to 116.0.5803.0 * chore: update patches * chore: bump chromium in DEPS to 116.0.5805.2 * chore: update patches * 4547630: Move content/public/common/network_service_util.h to c/p/browser/ |4547630
* 4510075: Adding extensions to network response experiment |4510075
* 4566552: Auto-generate grd file for chrome://accessibility. |4566552
* chore: bump chromium in DEPS to 116.0.5807.0 * chore: update patches * 4533536: [Privacy Hub] Geolocation manager used directly |4533536
* chore: patch out ARC support from /chrome/browser 4571955: Convert /chrome/browser to use ARC |4571955
* chore: bump chromium in DEPS to 116.0.5809.2 * chore: bump chromium in DEPS to 116.0.5811.0 * chore: update patches * 4573627: Adopt base::NoDestructor for KeyedService factories |4573627
* 4576878: Reland "Shared Storage: Add mojo method for observing response headers" |4576878
* chore: bump chromium in DEPS to 116.0.5813.0 * chore: update patches * fixup! 4566552: Auto-generate grd file for chrome://accessibility. |4566552
* chore: fix up lint * test: (debug) use Promise.all in asan tests * chore: manually roll DEPS to 116.0.5815.0 * chore: update patches * 4585150: Convert /printing to use ARC |4585150
* test: (asan) extend timeout, clean up debugging * chore: remove ARC chromium patch * chore: update patches after main sync * 4546398: Convert /chrome/browser to use ARC |4546398
* build: add chrome_lib_arc for chromium_src/BUILD.gn sources * fixup! 4559790: Manual raw_ptr rewrite: //base |4559790
--------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
40 lines
1.5 KiB
Text
40 lines
1.5 KiB
Text
// Copyright (c) 2018 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "shell/browser/ui/cocoa/delayed_native_view_host.h"
|
|
#include "base/apple/owned_objc.h"
|
|
#include "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h"
|
|
|
|
namespace electron {
|
|
|
|
DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view)
|
|
: native_view_(native_view) {}
|
|
|
|
DelayedNativeViewHost::~DelayedNativeViewHost() = default;
|
|
|
|
void DelayedNativeViewHost::ViewHierarchyChanged(
|
|
const views::ViewHierarchyChangedDetails& details) {
|
|
NativeViewHost::ViewHierarchyChanged(details);
|
|
if (details.is_add && GetWidget())
|
|
Attach(native_view_);
|
|
}
|
|
|
|
bool DelayedNativeViewHost::OnMousePressed(const ui::MouseEvent& ui_event) {
|
|
// NativeViewHost::OnMousePressed normally isn't called, but
|
|
// NativeWidgetMacNSWindow specifically carves out an event here for
|
|
// right-mouse-button clicks. We want to forward them to the web content, so
|
|
// handle them here.
|
|
// See:
|
|
// https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm;l=415-421;drc=a5af91924bafb85426e091c6035801990a6dc697
|
|
|
|
ElectronInspectableWebContentsView* inspectable_web_contents_view =
|
|
(ElectronInspectableWebContentsView*)native_view_.GetNativeNSView();
|
|
[inspectable_web_contents_view
|
|
redispatchContextMenuEvent:base::apple::OwnedNSEvent(
|
|
ui_event.native_event())];
|
|
|
|
return true;
|
|
}
|
|
|
|
} // namespace electron
|