fix: move BrowserWindow's WebContentsView to be a child of rootview (#41802)

fix: move BrowserWindow's WebContentsView to be a child of rootview (#41256)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
trop[bot] 2024-04-10 13:20:44 +02:00 committed by GitHub
parent 73fd29195f
commit 3ea26fb9d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 31 additions and 34 deletions

View file

@ -46,8 +46,9 @@ class RootView : public views::View {
void RegisterAcceleratorsWithFocusManager(ElectronMenuModel* menu_model);
void UnregisterAcceleratorsWithFocusManager();
views::View* GetMainView() { return main_view_; }
// views::View:
void Layout(PassKey) override;
gfx::Size GetMinimumSize() const override;
gfx::Size GetMaximumSize() const override;
bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
@ -62,6 +63,9 @@ class RootView : public views::View {
bool menu_bar_visible_ = false;
bool menu_bar_alt_pressed_ = false;
// Main view area.
raw_ptr<views::View> main_view_;
// Map from accelerator to menu item's command id.
accelerator_util::AcceleratorTable accelerator_table_;