| Index: ui/views/test/child_modal_window.cc
|
| diff --git a/ui/views/test/child_modal_window.cc b/ui/views/test/child_modal_window.cc
|
| index fc19ddfd31fab1f4cd1d79bd43a14897d66c05f7..36479824830aaa5df6bfb7d1de2a0aa4b154cc89 100644
|
| --- a/ui/views/test/child_modal_window.cc
|
| +++ b/ui/views/test/child_modal_window.cc
|
| @@ -121,8 +121,10 @@ ChildModalParent::ChildModalParent(gfx::NativeView context)
|
| widget->Init(params);
|
| widget->GetRootView()->set_background(
|
| Background::CreateSolidBackground(kModalParentColor));
|
| - modal_parent_ = widget->GetNativeView();
|
| + modal_parent_ = widget->GetNativeWindow();
|
| +#if defined(USE_AURA)
|
| widget->GetNativeView()->SetName("ModalParent");
|
| +#endif
|
| AddChildView(button_);
|
| AddChildView(textfield_);
|
| AddChildView(host_);
|
| @@ -143,16 +145,18 @@ gfx::NativeWindow ChildModalParent::GetModalParent() const {
|
|
|
| gfx::NativeWindow ChildModalParent::GetChild() const {
|
| if (child_)
|
| - return child_->GetNativeView();
|
| + return child_->GetNativeWindow();
|
| return NULL;
|
| }
|
|
|
| Widget* ChildModalParent::CreateChild() {
|
| Widget* child = Widget::CreateWindowWithParent(
|
| new ChildModalWindow, GetWidget()->GetNativeView());
|
| +#if defined(USE_AURA)
|
| wm::SetModalParent(child->GetNativeView(), GetModalParent());
|
| - child->AddObserver(this);
|
| child->GetNativeView()->SetName("ChildModalWindow");
|
| +#endif
|
| + child->AddObserver(this);
|
| return child;
|
| }
|
|
|
| @@ -190,8 +194,10 @@ void ChildModalParent::Layout() {
|
| void ChildModalParent::ViewHierarchyChanged(
|
| const ViewHierarchyChangedDetails& details) {
|
| if (details.is_add && details.child == this) {
|
| +#if defined(USE_AURA)
|
| host_->Attach(modal_parent_);
|
| GetWidget()->GetNativeView()->SetName("Parent");
|
| +#endif
|
| }
|
| }
|
|
|
|
|