electron/shell/browser/ui/views/frameless_view.h
electron-roller[bot] e72f4f7f26
chore: bump chromium to 123.0.6312.5 (main) (#41337)
* chore: bump chromium in DEPS to 123.0.6300.2

* chore: bump chromium in DEPS to 123.0.6301.2

* chore: update patches

* chore: bump chromium in DEPS to 123.0.6302.0

* chore: bump chromium in DEPS to 123.0.6304.0

* chore: update patches

* chore: bump chromium in DEPS to 123.0.6306.2

* chore: update patches

* chore: bump chromium in DEPS to 123.0.6308.0

* chore: update patches

* Refactor //components/pdf/common constants

https://chromium-review.googlesource.com/c/chromium/src/+/5292816

* Rename URLLoaderFactoryParams::is_corb_enabled to is_orb_enabled.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5277040

* Add placeholder of speaker-selection permission.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5278243

* Move kPdfMimeType to //components/pdf/common/constants.h

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5293155

* chore: gen-libc++-filenames.js

* Make GetClassName non virtual

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5293075
Refs https://issues.chromium.org/issues/324596267

* chore: bump chromium in DEPS to 123.0.6310.0

* chore: update filenames.libcxx.gni

* 5282732: Compute input region using correct pixel size.

https://chromium-review.googlesource.com/c/chromium/src/+/5282732

* fixup: Make GetClassName non virtual

* chore: bump chromium in DEPS to 123.0.6312.0

* chore: update patches

* chore: bump chromium in DEPS to 123.0.6312.5

* fixup: Make GetClassName non virtual

* docs: document speaker-selection

https://chromium-review.googlesource.com/c/chromium/src/+/5278243

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-02-21 15:27:05 -05:00

70 lines
2.2 KiB
C++

// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_
#define ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_
#include "base/memory/raw_ptr.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/window/non_client_view.h"
namespace views {
class Widget;
}
namespace electron {
class NativeWindowViews;
class FramelessView : public views::NonClientFrameView {
METADATA_HEADER(FramelessView, views::NonClientFrameView)
public:
FramelessView();
~FramelessView() override;
// disable copy
FramelessView(const FramelessView&) = delete;
FramelessView& operator=(const FramelessView&) = delete;
virtual void Init(NativeWindowViews* window, views::Widget* frame);
// Returns whether the |point| is on frameless window's resizing border.
virtual int ResizingBorderHitTest(const gfx::Point& point);
protected:
// Helper function for subclasses to implement ResizingBorderHitTest with a
// custom resize inset.
int ResizingBorderHitTestImpl(const gfx::Point& point,
const gfx::Insets& resize_border);
// views::NonClientFrameView:
gfx::Rect GetBoundsForClientView() const override;
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override;
int NonClientHitTest(const gfx::Point& point) override;
void GetWindowMask(const gfx::Size& size, SkPath* window_mask) override;
void ResetWindowControls() override;
void UpdateWindowIcon() override;
void UpdateWindowTitle() override;
void SizeConstraintsChanged() override;
// views::ViewTargeterDelegate:
views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;
// views::View:
gfx::Size CalculatePreferredSize() const override;
gfx::Size GetMinimumSize() const override;
gfx::Size GetMaximumSize() const override;
// Not owned.
raw_ptr<NativeWindowViews> window_ = nullptr;
raw_ptr<views::Widget> frame_ = nullptr;
friend class NativeWindowsViews;
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_