refactor: rename managed_web_contents to inspectable_web_contents (#26525)

This commit is contained in:
Jeremy Rose 2020-11-17 14:15:20 -08:00 committed by GitHub
parent 29211a51df
commit b8372fdc29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 87 additions and 83 deletions

View file

@ -19,11 +19,12 @@ namespace electron {
namespace api {
void BrowserWindow::OverrideNSWindowContentView(InspectableWebContents* iwc) {
void BrowserWindow::OverrideNSWindowContentView(
InspectableWebContentsView* view) {
// Make NativeWindow use a NSView as content view.
static_cast<NativeWindowMac*>(window())->OverrideNSWindowContentView();
// Add webview to contentView.
NSView* webView = iwc->GetView()->GetNativeView().GetNativeNSView();
NSView* webView = view->GetNativeView().GetNativeNSView();
NSView* contentView =
[window()->GetNativeWindow().GetNativeNSWindow() contentView];
[webView setFrame:[contentView bounds]];