2018-05-02 06:39:43 +00:00
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/ui/cocoa/root_view_mac.h"
|
2018-05-02 06:39:43 +00:00
|
|
|
|
2023-12-13 21:01:03 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/native_window.h"
|
2023-12-13 21:01:03 +00:00
|
|
|
#include "ui/views/layout/fill_layout.h"
|
2018-05-02 06:39:43 +00:00
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
|
|
|
RootViewMac::RootViewMac(NativeWindow* window) : window_(window) {
|
|
|
|
set_owned_by_client();
|
2023-12-13 21:01:03 +00:00
|
|
|
SetLayoutManager(std::make_unique<views::FillLayout>());
|
2018-05-02 06:39:43 +00:00
|
|
|
}
|
|
|
|
|
2021-06-04 04:16:13 +00:00
|
|
|
RootViewMac::~RootViewMac() = default;
|
2018-05-02 06:39:43 +00:00
|
|
|
|
|
|
|
gfx::Size RootViewMac::GetMinimumSize() const {
|
|
|
|
return window_->GetMinimumSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
gfx::Size RootViewMac::GetMaximumSize() const {
|
|
|
|
return window_->GetMaximumSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace electron
|