| 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/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 namespace ash { | 54 namespace ash { |
| 55 namespace test { | 55 namespace test { |
| 56 namespace { | 56 namespace { |
| 57 | 57 |
| 58 class AshEventGeneratorDelegate | 58 class AshEventGeneratorDelegate |
| 59 : public aura::test::EventGeneratorDelegateAura { | 59 : public aura::test::EventGeneratorDelegateAura { |
| 60 public: | 60 public: |
| 61 AshEventGeneratorDelegate() {} | 61 AshEventGeneratorDelegate() {} |
| 62 virtual ~AshEventGeneratorDelegate() {} | 62 ~AshEventGeneratorDelegate() override {} |
| 63 | 63 |
| 64 // aura::test::EventGeneratorDelegateAura overrides: | 64 // aura::test::EventGeneratorDelegateAura overrides: |
| 65 virtual aura::WindowTreeHost* GetHostAt( | 65 aura::WindowTreeHost* GetHostAt( |
| 66 const gfx::Point& point_in_screen) const override { | 66 const gfx::Point& point_in_screen) const override { |
| 67 gfx::Screen* screen = Shell::GetScreen(); | 67 gfx::Screen* screen = Shell::GetScreen(); |
| 68 gfx::Display display = screen->GetDisplayNearestPoint(point_in_screen); | 68 gfx::Display display = screen->GetDisplayNearestPoint(point_in_screen); |
| 69 return Shell::GetInstance()->display_controller()-> | 69 return Shell::GetInstance()->display_controller()-> |
| 70 GetRootWindowForDisplayId(display.id())->GetHost(); | 70 GetRootWindowForDisplayId(display.id())->GetHost(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 virtual aura::client::ScreenPositionClient* GetScreenPositionClient( | 73 aura::client::ScreenPositionClient* GetScreenPositionClient( |
| 74 const aura::Window* window) const override { | 74 const aura::Window* window) const override { |
| 75 return aura::client::GetScreenPositionClient(window->GetRootWindow()); | 75 return aura::client::GetScreenPositionClient(window->GetRootWindow()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(AshEventGeneratorDelegate); | 79 DISALLOW_COPY_AND_ASSIGN(AshEventGeneratorDelegate); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace | 82 } // namespace |
| 83 | 83 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 void AshTestBase::UnblockUserSession() { | 332 void AshTestBase::UnblockUserSession() { |
| 333 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 333 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 334 SetSessionStarted(true); | 334 SetSessionStarted(true); |
| 335 SetUserAddingScreenRunning(false); | 335 SetUserAddingScreenRunning(false); |
| 336 } | 336 } |
| 337 | 337 |
| 338 | 338 |
| 339 } // namespace test | 339 } // namespace test |
| 340 } // namespace ash | 340 } // namespace ash |
| OLD | NEW |