| 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/common/accelerators/accelerator_controller.h" | 5 #include "ash/common/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/common/accelerators/accelerator_table.h" | 7 #include "ash/common/accelerators/accelerator_table.h" |
| 8 #include "ash/common/accessibility_delegate.h" | 8 #include "ash/common/accessibility_delegate.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 258 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
| 259 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, gfx::Rect(5, 5, 20, 20)); | 259 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, gfx::Rect(5, 5, 20, 20)); |
| 260 WmWindow* wm_window = WmWindow::Get(window); | 260 WmWindow* wm_window = WmWindow::Get(window); |
| 261 test::TestShelfDelegate::instance()->AddShelfItem(wm_window); | 261 test::TestShelfDelegate::instance()->AddShelfItem(wm_window); |
| 262 PanelLayoutManager::Get(wm_window)->Relayout(); | 262 PanelLayoutManager::Get(wm_window)->Relayout(); |
| 263 return window; | 263 return window; |
| 264 } | 264 } |
| 265 | 265 |
| 266 void SetBrightnessControlDelegate( | 266 void SetBrightnessControlDelegate( |
| 267 std::unique_ptr<BrightnessControlDelegate> delegate) { | 267 std::unique_ptr<BrightnessControlDelegate> delegate) { |
| 268 WmShell::Get()->brightness_control_delegate_ = std::move(delegate); | 268 Shell::Get()->brightness_control_delegate_ = std::move(delegate); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void SetKeyboardBrightnessControlDelegate( | 271 void SetKeyboardBrightnessControlDelegate( |
| 272 std::unique_ptr<KeyboardBrightnessControlDelegate> delegate) { | 272 std::unique_ptr<KeyboardBrightnessControlDelegate> delegate) { |
| 273 WmShell::Get()->keyboard_brightness_control_delegate_ = std::move(delegate); | 273 Shell::Get()->keyboard_brightness_control_delegate_ = std::move(delegate); |
| 274 } | 274 } |
| 275 | 275 |
| 276 private: | 276 private: |
| 277 DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); | 277 DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 AcceleratorController* AcceleratorControllerTest::GetController() { | 280 AcceleratorController* AcceleratorControllerTest::GetController() { |
| 281 return Shell::Get()->accelerator_controller(); | 281 return Shell::Get()->accelerator_controller(); |
| 282 } | 282 } |
| 283 | 283 |
| (...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 // Expect no notifications from the new accelerators. | 1565 // Expect no notifications from the new accelerators. |
| 1566 EXPECT_TRUE(IsMessageCenterEmpty()); | 1566 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1567 | 1567 |
| 1568 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1568 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
| 1569 // screen before we proceed testing the rest of accelerators. | 1569 // screen before we proceed testing the rest of accelerators. |
| 1570 ResetStateIfNeeded(); | 1570 ResetStateIfNeeded(); |
| 1571 } | 1571 } |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 } // namespace ash | 1574 } // namespace ash |
| OLD | NEW |