| 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/session_state_delegate.h" | 8 #include "ash/session/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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 explicit TestWindow(bool modal) : modal_(modal) {} | 66 explicit TestWindow(bool modal) : modal_(modal) {} |
| 67 virtual ~TestWindow() {} | 67 virtual ~TestWindow() {} |
| 68 | 68 |
| 69 // The window needs be closed from widget in order for | 69 // The window needs be closed from widget in order for |
| 70 // aura::client::kModalKey property to be reset. | 70 // aura::client::kModalKey property to be reset. |
| 71 static void CloseTestWindow(aura::Window* window) { | 71 static void CloseTestWindow(aura::Window* window) { |
| 72 views::Widget::GetWidgetForNativeWindow(window)->Close(); | 72 views::Widget::GetWidgetForNativeWindow(window)->Close(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // Overridden from views::View: | 75 // Overridden from views::View: |
| 76 virtual gfx::Size GetPreferredSize() OVERRIDE { | 76 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
| 77 return gfx::Size(50, 50); | 77 return gfx::Size(50, 50); |
| 78 } | 78 } |
| 79 | 79 |
| 80 // Overridden from views::WidgetDelegate: | 80 // Overridden from views::WidgetDelegate: |
| 81 virtual views::View* GetContentsView() OVERRIDE { | 81 virtual views::View* GetContentsView() OVERRIDE { |
| 82 return this; | 82 return this; |
| 83 } | 83 } |
| 84 virtual ui::ModalType GetModalType() const OVERRIDE { | 84 virtual ui::ModalType GetModalType() const OVERRIDE { |
| 85 return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE; | 85 return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE; |
| 86 } | 86 } |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 ShowKeyboard(true); | 650 ShowKeyboard(true); |
| 651 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); | 651 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); |
| 652 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); | 652 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); |
| 653 EXPECT_EQ(0, modal_window->bounds().y()); | 653 EXPECT_EQ(0, modal_window->bounds().y()); |
| 654 | 654 |
| 655 ShowKeyboard(false); | 655 ShowKeyboard(false); |
| 656 } | 656 } |
| 657 | 657 |
| 658 } // namespace test | 658 } // namespace test |
| 659 } // namespace ash | 659 } // namespace ash |
| OLD | NEW |