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.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_
|
2018-05-02 06:39:43 +00:00
|
|
|
|
2023-06-13 18:45:48 +00:00
|
|
|
#include "base/memory/raw_ptr.h"
|
2018-05-02 06:39:43 +00:00
|
|
|
#include "ui/views/view.h"
|
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
|
|
|
class NativeWindow;
|
|
|
|
|
|
|
|
class RootViewMac : public views::View {
|
|
|
|
public:
|
|
|
|
explicit RootViewMac(NativeWindow* window);
|
|
|
|
~RootViewMac() override;
|
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
RootViewMac(const RootViewMac&) = delete;
|
|
|
|
RootViewMac& operator=(const RootViewMac&) = delete;
|
|
|
|
|
2018-05-02 06:39:43 +00:00
|
|
|
// views::View:
|
|
|
|
void Layout() override;
|
|
|
|
gfx::Size GetMinimumSize() const override;
|
|
|
|
gfx::Size GetMaximumSize() const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Parent window, weak ref.
|
2023-06-13 18:45:48 +00:00
|
|
|
raw_ptr<NativeWindow> window_;
|
2018-05-02 06:39:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_
|