| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/test/child_modal_window.h" | 5 #include "ui/views/test/child_modal_window.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
| 10 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
| 11 #include "ui/views/controls/button/label_button.h" | 11 #include "ui/views/controls/button/label_button.h" |
| 12 #include "ui/views/controls/native/native_view_host.h" | 12 #include "ui/views/controls/native/native_view_host.h" |
| 13 #include "ui/views/controls/textfield/textfield.h" | 13 #include "ui/views/controls/textfield/textfield.h" |
| 14 #include "ui/views/corewm/window_modality_controller.h" | |
| 15 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 16 #include "ui/views/widget/widget_delegate.h" | 15 #include "ui/views/widget/widget_delegate.h" |
| 16 #include "ui/wm/core/window_modality_controller.h" |
| 17 | 17 |
| 18 namespace views { | 18 namespace views { |
| 19 namespace test { | 19 namespace test { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Parent window size and position. | 23 // Parent window size and position. |
| 24 const int kWindowLeft = 170; | 24 const int kWindowLeft = 170; |
| 25 const int kWindowTop = 200; | 25 const int kWindowTop = 200; |
| 26 const int kWindowWidth = 400; | 26 const int kWindowWidth = 400; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 void ChildModalParent::OnWidgetDestroying(Widget* widget) { | 210 void ChildModalParent::OnWidgetDestroying(Widget* widget) { |
| 211 if (child_) { | 211 if (child_) { |
| 212 DCHECK_EQ(child_, widget); | 212 DCHECK_EQ(child_, widget); |
| 213 child_ = NULL; | 213 child_ = NULL; |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace test | 217 } // namespace test |
| 218 } // namespace views | 218 } // namespace views |
| OLD | NEW |