| Index: ash/test/child_modal_window.cc
|
| diff --git a/ash/test/child_modal_window.cc b/ash/test/child_modal_window.cc
|
| index 255f4ccf7051e1ee473743dd52d592317a676eee..40ab94e843469e41c01c14746fea7eab1039c812 100644
|
| --- a/ash/test/child_modal_window.cc
|
| +++ b/ash/test/child_modal_window.cc
|
| @@ -49,12 +49,11 @@ const SkColor kChildColor = SK_ColorWHITE;
|
|
|
| void CreateChildModalParent(gfx::NativeView context) {
|
| Widget::CreateWindowWithContextAndBounds(
|
| - new ChildModalParent(context),
|
| - context,
|
| - gfx::Rect(kWindowLeft, kWindowTop, kWindowWidth, kWindowHeight))->Show();
|
| + new ChildModalParent(context), context,
|
| + gfx::Rect(kWindowLeft, kWindowTop, kWindowWidth, kWindowHeight))
|
| + ->Show();
|
| }
|
|
|
| -
|
| class ChildModalWindow : public views::WidgetDelegateView {
|
| public:
|
| ChildModalWindow();
|
| @@ -77,13 +76,11 @@ class ChildModalWindow : public views::WidgetDelegateView {
|
| ChildModalWindow::ChildModalWindow() {
|
| views::Textfield* textfield = new views::Textfield;
|
| AddChildView(textfield);
|
| - textfield->SetBounds(
|
| - kChildTextfieldLeft, kChildTextfieldTop,
|
| - kChildTextfieldWidth, kChildTextfieldHeight);
|
| + textfield->SetBounds(kChildTextfieldLeft, kChildTextfieldTop,
|
| + kChildTextfieldWidth, kChildTextfieldHeight);
|
| }
|
|
|
| -ChildModalWindow::~ChildModalWindow() {
|
| -}
|
| +ChildModalWindow::~ChildModalWindow() {}
|
|
|
| void ChildModalWindow::OnPaint(gfx::Canvas* canvas) {
|
| canvas->FillRect(GetLocalBounds(), kChildColor);
|
| @@ -110,9 +107,9 @@ ui::ModalType ChildModalWindow::GetModalType() const {
|
| }
|
|
|
| ChildModalParent::ChildModalParent(gfx::NativeView context)
|
| - : button_(new views::LabelButton(this,
|
| - base::ASCIIToUTF16(
|
| - "Show/Hide Child Modal Window"))),
|
| + : button_(new views::LabelButton(
|
| + this,
|
| + base::ASCIIToUTF16("Show/Hide Child Modal Window"))),
|
| textfield_(new views::Textfield),
|
| host_(new views::NativeViewHost),
|
| modal_parent_(NULL),
|
| @@ -130,8 +127,7 @@ ChildModalParent::ChildModalParent(gfx::NativeView context)
|
| AddChildView(host_);
|
| }
|
|
|
| -ChildModalParent::~ChildModalParent() {
|
| -}
|
| +ChildModalParent::~ChildModalParent() {}
|
|
|
| void ChildModalParent::ShowChild() {
|
| if (!child_)
|
| @@ -150,8 +146,8 @@ gfx::NativeWindow ChildModalParent::GetChild() const {
|
| }
|
|
|
| Widget* ChildModalParent::CreateChild() {
|
| - Widget* child = Widget::CreateWindowWithParent(
|
| - new ChildModalWindow, GetWidget()->GetNativeView());
|
| + Widget* child = Widget::CreateWindowWithParent(new ChildModalWindow,
|
| + GetWidget()->GetNativeView());
|
| wm::SetModalParent(child->GetNativeView(), GetModalParent());
|
| child->AddObserver(this);
|
| child->GetNativeView()->SetName("ChildModalWindow");
|
|
|