2015-07-24 08:04:54 +00:00
|
|
|
// Copyright (c) 2015 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_VIEWS_NATIVE_FRAME_VIEW_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_
|
2015-07-24 08:04:54 +00:00
|
|
|
|
|
|
|
#include "ui/views/window/native_frame_view.h"
|
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
2015-10-05 11:05:59 +00:00
|
|
|
class NativeWindow;
|
2015-07-24 08:04:54 +00:00
|
|
|
|
|
|
|
// Like the views::NativeFrameView, but returns the min/max size from the
|
|
|
|
// NativeWindowViews.
|
|
|
|
class NativeFrameView : public views::NativeFrameView {
|
|
|
|
public:
|
2018-05-15 18:49:27 +00:00
|
|
|
static const char kViewClassName[];
|
2015-10-05 11:05:59 +00:00
|
|
|
NativeFrameView(NativeWindow* window, views::Widget* widget);
|
2015-07-24 08:04:54 +00:00
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
NativeFrameView(const NativeFrameView&) = delete;
|
|
|
|
NativeFrameView& operator=(const NativeFrameView&) = delete;
|
|
|
|
|
2015-07-24 08:04:54 +00:00
|
|
|
protected:
|
|
|
|
// views::View:
|
|
|
|
gfx::Size GetMinimumSize() const override;
|
|
|
|
gfx::Size GetMaximumSize() const override;
|
|
|
|
const char* GetClassName() const override;
|
|
|
|
|
|
|
|
private:
|
2015-10-05 11:05:59 +00:00
|
|
|
NativeWindow* window_; // weak ref.
|
2015-07-24 08:04:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_
|