give window a default content view

Certain APIs are expecting the window to have a content view, having a
default one simplifies our design.
This commit is contained in:
Cheng Zhao 2018-05-08 16:02:57 +09:00
parent ea97f43145
commit 2f3fcb9dbe
2 changed files with 6 additions and 0 deletions

View file

@ -276,6 +276,9 @@ NativeWindowViews::NativeWindowViews(const mate::Dictionary& options,
#endif
}
// Default content view.
SetContentView(new views::View());
gfx::Size size = bounds.size();
if (has_frame() &&
options.Get(options::kUseContentSize, &use_content_size_) &&