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:
parent
ea97f43145
commit
2f3fcb9dbe
2 changed files with 6 additions and 0 deletions
|
@ -451,6 +451,9 @@ NativeWindowMac::NativeWindowMac(const mate::Dictionary& options,
|
||||||
// by calls to other APIs.
|
// by calls to other APIs.
|
||||||
SetMaximizable(maximizable);
|
SetMaximizable(maximizable);
|
||||||
|
|
||||||
|
// Default content view.
|
||||||
|
SetContentView(new views::View());
|
||||||
|
|
||||||
// Make sure the bottom corner is rounded for non-modal windows:
|
// Make sure the bottom corner is rounded for non-modal windows:
|
||||||
// http://crbug.com/396264. But do not enable it on OS X 10.9 for transparent
|
// http://crbug.com/396264. But do not enable it on OS X 10.9 for transparent
|
||||||
// window, otherwise a semi-transparent frame would show.
|
// window, otherwise a semi-transparent frame would show.
|
||||||
|
|
|
@ -276,6 +276,9 @@ NativeWindowViews::NativeWindowViews(const mate::Dictionary& options,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default content view.
|
||||||
|
SetContentView(new views::View());
|
||||||
|
|
||||||
gfx::Size size = bounds.size();
|
gfx::Size size = bounds.size();
|
||||||
if (has_frame() &&
|
if (has_frame() &&
|
||||||
options.Get(options::kUseContentSize, &use_content_size_) &&
|
options.Get(options::kUseContentSize, &use_content_size_) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue