fix: draggable views on BrowserViews on Windows (#26738)

This commit is contained in:
Shelley Vohr 2020-12-01 15:03:00 -08:00 committed by GitHub
parent cdcee04bbe
commit 528b0f0e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 0 deletions

View file

@ -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);
};