| 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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
| 8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 static bool is_exiting(ExitWarningHandler* ewh) { | 271 static bool is_exiting(ExitWarningHandler* ewh) { |
| 272 return ewh->state_ == ExitWarningHandler::EXITING; | 272 return ewh->state_ == ExitWarningHandler::EXITING; |
| 273 } | 273 } |
| 274 aura::Window* CreatePanel() { | 274 aura::Window* CreatePanel() { |
| 275 aura::Window* window = | 275 aura::Window* window = |
| 276 CreateTestWindowInShellWithDelegateAndType(NULL, | 276 CreateTestWindowInShellWithDelegateAndType(NULL, |
| 277 ui::wm::WINDOW_TYPE_PANEL, 0, gfx::Rect(5, 5, 20, 20)); | 277 ui::wm::WINDOW_TYPE_PANEL, 0, gfx::Rect(5, 5, 20, 20)); |
| 278 test::TestShelfDelegate* shelf_delegate = | 278 test::TestShelfDelegate* shelf_delegate = |
| 279 test::TestShelfDelegate::instance(); | 279 test::TestShelfDelegate::instance(); |
| 280 shelf_delegate->AddShelfItem(window); | 280 shelf_delegate->AddShelfItem(window); |
| 281 PanelLayoutManager* manager = static_cast<PanelLayoutManager*>( | 281 PanelLayoutManager* manager = |
| 282 Shell::GetContainer(window->GetRootWindow(), | 282 PanelLayoutManager::Get(wm::WmWindowAura::Get(window)); |
| 283 kShellWindowId_PanelContainer)->layout_manager()); | |
| 284 manager->Relayout(); | 283 manager->Relayout(); |
| 285 return window; | 284 return window; |
| 286 } | 285 } |
| 287 | 286 |
| 288 private: | 287 private: |
| 289 DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); | 288 DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); |
| 290 }; | 289 }; |
| 291 | 290 |
| 292 AcceleratorController* AcceleratorControllerTest::GetController() { | 291 AcceleratorController* AcceleratorControllerTest::GetController() { |
| 293 return Shell::GetInstance()->accelerator_controller(); | 292 return Shell::GetInstance()->accelerator_controller(); |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1589 EXPECT_TRUE(IsMessageCenterEmpty()); | 1588 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1590 | 1589 |
| 1591 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1590 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
| 1592 // screen before we proceed testing the rest of accelerators. | 1591 // screen before we proceed testing the rest of accelerators. |
| 1593 ResetStateIfNeeded(); | 1592 ResetStateIfNeeded(); |
| 1594 } | 1593 } |
| 1595 } | 1594 } |
| 1596 #endif // defined(OS_CHROMEOS) | 1595 #endif // defined(OS_CHROMEOS) |
| 1597 | 1596 |
| 1598 } // namespace ash | 1597 } // namespace ash |
| OLD | NEW |