fix: draggable views on BrowserViews on Windows (#26738)
This commit is contained in:
parent
cdcee04bbe
commit
528b0f0e74
4 changed files with 54 additions and 0 deletions
|
@ -5,7 +5,11 @@
|
|||
#ifndef SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_
|
||||
#define SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "shell/browser/native_browser_view.h"
|
||||
#include "third_party/skia/include/core/SkRegion.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -26,6 +30,10 @@ class NativeBrowserViewViews : public NativeBrowserView {
|
|||
void SetBounds(const gfx::Rect& bounds) override;
|
||||
gfx::Rect GetBounds() override;
|
||||
void SetBackgroundColor(SkColor color) override;
|
||||
void UpdateDraggableRegions(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions) override;
|
||||
|
||||
SkRegion* draggable_region() const { return draggable_region_.get(); }
|
||||
|
||||
private:
|
||||
void ResetAutoResizeProportions();
|
||||
|
@ -40,6 +48,8 @@ class NativeBrowserViewViews : public NativeBrowserView {
|
|||
float auto_vertical_proportion_height_ = 0.;
|
||||
float auto_vertical_proportion_top_ = 0.;
|
||||
|
||||
std::unique_ptr<SkRegion> draggable_region_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewViews);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue