| 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 "ash/wm/system_modal_container_layout_manager.h" | 5 #include "ash/wm/system_modal_container_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(TestWindow); | 84 DISALLOW_COPY_AND_ASSIGN(TestWindow); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class EventTestWindow : public TestWindow { | 87 class EventTestWindow : public TestWindow { |
| 88 public: | 88 public: |
| 89 explicit EventTestWindow(bool modal) : TestWindow(modal), | 89 explicit EventTestWindow(bool modal) : TestWindow(modal), |
| 90 mouse_presses_(0) {} | 90 mouse_presses_(0) {} |
| 91 virtual ~EventTestWindow() {} | 91 virtual ~EventTestWindow() {} |
| 92 | 92 |
| 93 aura::Window* OpenTestWindowWithContext(aura::RootWindow* context) { | 93 aura::Window* OpenTestWindowWithContext(aura::Window* context) { |
| 94 views::Widget* widget = | 94 views::Widget* widget = |
| 95 views::Widget::CreateWindowWithContext(this, context); | 95 views::Widget::CreateWindowWithContext(this, context); |
| 96 widget->Show(); | 96 widget->Show(); |
| 97 return widget->GetNativeView(); | 97 return widget->GetNativeView(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 aura::Window* OpenTestWindowWithParent(aura::Window* parent) { | 100 aura::Window* OpenTestWindowWithParent(aura::Window* parent) { |
| 101 DCHECK(parent); | 101 DCHECK(parent); |
| 102 views::Widget* widget = | 102 views::Widget* widget = |
| 103 views::Widget::CreateWindowWithParent(this, parent); | 103 views::Widget::CreateWindowWithParent(this, parent); |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 // No more modal screen. | 487 // No more modal screen. |
| 488 modal1->Hide(); | 488 modal1->Hide(); |
| 489 TestWindow::CloseTestWindow(modal1.release()); | 489 TestWindow::CloseTestWindow(modal1.release()); |
| 490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); | 490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); |
| 491 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); | 491 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); |
| 492 } | 492 } |
| 493 | 493 |
| 494 } // namespace test | 494 } // namespace test |
| 495 } // namespace ash | 495 } // namespace ash |
| OLD | NEW |