refactor: pass views::Widget* into constructors of our TreeHosts and NativeWidgets (#47177)
* refactor: remove unnecessary downcast in MenuViews::PopupAt() * refactor: pass a views::Widget as an arg to the ElectronDesktopWindowTreeHostLinux ctor * refactor: pass a views::Widget as an arg to the ElectronDesktopNativeWidgetAura ctor * refactor: pass a views::Widget as an arg to the ElectronDesktopWindowTreeHostWin ctor * refactor: create desktop_window_tree_host_ in the ElectronDesktopNativeWidgetAura constructor * fixup! refactor: create desktop_window_tree_host_ in the ElectronDesktopNativeWidgetAura constructor fix: tyop
This commit is contained in:
parent
4af0c5d762
commit
2e8fc17f07
8 changed files with 22 additions and 18 deletions
|
@ -27,7 +27,7 @@ void MenuViews::PopupAt(BaseWindow* window,
|
|||
int positioning_item,
|
||||
ui::mojom::MenuSourceType source_type,
|
||||
base::OnceClosure callback) {
|
||||
auto* native_window = static_cast<NativeWindowViews*>(window->window());
|
||||
const NativeWindow* native_window = window->window();
|
||||
if (!native_window)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue