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:
Родитель
ea97f43145
Коммит
2f3fcb9dbe
|
@ -451,6 +451,9 @@ NativeWindowMac::NativeWindowMac(const mate::Dictionary& options,
|
|||
// by calls to other APIs.
|
||||
SetMaximizable(maximizable);
|
||||
|
||||
// Default content view.
|
||||
SetContentView(new views::View());
|
||||
|
||||
// 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
|
||||
// window, otherwise a semi-transparent frame would show.
|
||||
|
|
|
@ -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_) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче