2018-05-02 00:39:43 -06: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 14:46:59 -06:00
|
|
|
#include "shell/browser/ui/cocoa/root_view_mac.h"
|
2018-05-02 00:39:43 -06:00
|
|
|
|
2023-12-13 14:01:03 -07:00
|
|
|
#include <memory>
|
|
|
|
|
2019-06-19 14:46:59 -06:00
|
|
|
#include "shell/browser/native_window.h"
|
2023-12-13 14:01:03 -07:00
|
|
|
#include "ui/views/layout/fill_layout.h"
|
2018-05-02 00:39:43 -06:00
|
|
|
|
2019-06-19 15:23:04 -06:00
|
|
|
namespace electron {
|
2018-05-02 00:39:43 -06:00
|
|
|
|
|
|
|
RootViewMac::RootViewMac(NativeWindow* window) : window_(window) {
|
|
|
|
set_owned_by_client();
|
2023-12-13 14:01:03 -07:00
|
|
|
SetLayoutManager(std::make_unique<views::FillLayout>());
|
2018-05-02 00:39:43 -06:00
|
|
|
}
|
|
|
|
|
2021-06-03 22:16:13 -06:00
|
|
|
RootViewMac::~RootViewMac() = default;
|
2018-05-02 00:39:43 -06:00
|
|
|
|
|
|
|
gfx::Size RootViewMac::GetMinimumSize() const {
|
|
|
|
return window_->GetMinimumSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
gfx::Size RootViewMac::GetMaximumSize() const {
|
|
|
|
return window_->GetMaximumSize();
|
|
|
|
}
|
|
|
|
|
2019-06-19 15:23:04 -06:00
|
|
|
} // namespace electron
|