| 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/focus_cycler.h" | 5 #include "ash/common/focus_cycler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/common/shelf/shelf_widget.h" | 9 #include "ash/common/shelf/shelf_widget.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 views::Widget* GetWidget() override { return widget_; }; | 50 views::Widget* GetWidget() override { return widget_; }; |
| 51 const views::Widget* GetWidget() const override { return widget_; } | 51 const views::Widget* GetWidget() const override { return widget_; } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 views::Widget* widget_; | 54 views::Widget* widget_; |
| 55 std::vector<views::View*> accessible_panes_; | 55 std::vector<views::View*> accessible_panes_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 // TODO(jamescook): Migrate this test to //ash/common after the status area | |
| 61 // widget moves. http://crbug.com/620955 | |
| 62 class FocusCyclerTest : public AshTestBase { | 60 class FocusCyclerTest : public AshTestBase { |
| 63 public: | 61 public: |
| 64 FocusCyclerTest() {} | 62 FocusCyclerTest() {} |
| 65 | 63 |
| 66 void SetUp() override { | 64 void SetUp() override { |
| 67 AshTestBase::SetUp(); | 65 AshTestBase::SetUp(); |
| 68 | 66 |
| 69 focus_cycler_.reset(new FocusCycler()); | 67 focus_cycler_.reset(new FocusCycler()); |
| 70 } | 68 } |
| 71 | 69 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // Cycle focus to the shelf. | 402 // Cycle focus to the shelf. |
| 405 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); | 403 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); |
| 406 | 404 |
| 407 // Cycle focus should go back to the browser. | 405 // Cycle focus should go back to the browser. |
| 408 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); | 406 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); |
| 409 EXPECT_TRUE(wm::IsActiveWindow(window.get())); | 407 EXPECT_TRUE(wm::IsActiveWindow(window.get())); |
| 410 } | 408 } |
| 411 | 409 |
| 412 } // namespace test | 410 } // namespace test |
| 413 } // namespace ash | 411 } // namespace ash |
| OLD | NEW |