Save browser_view_ in the NativeWindow

No need to store it separately in subclasses.
This commit is contained in:
Cheng Zhao 2018-03-06 15:04:40 +09:00
parent 503b0ba1b1
commit 3b3e69f8b2
8 changed files with 34 additions and 33 deletions

View file

@ -4,6 +4,8 @@
#include "atom/browser/api/atom_api_browser_window.h"
#include "atom/browser/native_window_views.h"
namespace atom {
namespace api {
@ -13,7 +15,8 @@ void BrowserWindow::UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) {
if (window_->has_frame())
return;
window_->UpdateDraggableRegions(DraggableRegionsToSkRegion(regions));
static_cast<NativeWindowViews*>(window_.get())->UpdateDraggableRegions(
DraggableRegionsToSkRegion(regions));
}
} // namespace api