Add "parent" option for BrowserWindow

This commit is contained in:
Cheng Zhao 2016-06-19 12:06:08 +09:00
parent 473413e874
commit 85ba382027
8 changed files with 68 additions and 11 deletions

View file

@ -126,7 +126,8 @@ class NativeWindowClientView : public views::ClientView {
NativeWindowViews::NativeWindowViews(
brightray::InspectableWebContents* web_contents,
const mate::Dictionary& options)
const mate::Dictionary& options,
NativeWindow* parent)
: NativeWindow(web_contents, options),
window_(new views::Widget),
web_view_(inspectable_web_contents()->GetView()->GetView()),
@ -1139,8 +1140,9 @@ ui::WindowShowState NativeWindowViews::GetRestoredState() {
// static
NativeWindow* NativeWindow::Create(
brightray::InspectableWebContents* inspectable_web_contents,
const mate::Dictionary& options) {
return new NativeWindowViews(inspectable_web_contents, options);
const mate::Dictionary& options,
NativeWindow* parent) {
return new NativeWindowViews(inspectable_web_contents, options, parent);
}
} // namespace atom