| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/dock/docked_window_resizer.h" | 5 #include "ash/wm/dock/docked_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { | 75 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { |
| 76 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 76 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
| 77 &delegate_, | 77 &delegate_, |
| 78 window_type_, | 78 window_type_, |
| 79 0, | 79 0, |
| 80 bounds); | 80 bounds); |
| 81 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) { | 81 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) { |
| 82 test::TestShelfDelegate* shelf_delegate = | 82 test::TestShelfDelegate* shelf_delegate = |
| 83 test::TestShelfDelegate::instance(); | 83 test::TestShelfDelegate::instance(); |
| 84 shelf_delegate->AddLauncherItem(window); | 84 shelf_delegate->AddShelfItem(window); |
| 85 PanelLayoutManager* manager = | 85 PanelLayoutManager* manager = |
| 86 static_cast<PanelLayoutManager*>( | 86 static_cast<PanelLayoutManager*>( |
| 87 Shell::GetContainer(window->GetRootWindow(), | 87 Shell::GetContainer(window->GetRootWindow(), |
| 88 internal::kShellWindowId_PanelContainer)-> | 88 internal::kShellWindowId_PanelContainer)-> |
| 89 layout_manager()); | 89 layout_manager()); |
| 90 manager->Relayout(); | 90 manager->Relayout(); |
| 91 } | 91 } |
| 92 return window; | 92 return window; |
| 93 } | 93 } |
| 94 | 94 |
| (...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 EXPECT_TRUE(window_state->IsSnapped()); | 1515 EXPECT_TRUE(window_state->IsSnapped()); |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 // Tests run twice - on both panels and normal windows | 1518 // Tests run twice - on both panels and normal windows |
| 1519 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 1519 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
| 1520 DockedWindowResizerTest, | 1520 DockedWindowResizerTest, |
| 1521 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 1521 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
| 1522 ui::wm::WINDOW_TYPE_PANEL)); | 1522 ui::wm::WINDOW_TYPE_PANEL)); |
| 1523 } // namespace internal | 1523 } // namespace internal |
| 1524 } // namespace ash | 1524 } // namespace ash |
| OLD | NEW |