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/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 class PanedWidgetDelegate : public views::WidgetDelegate { | 37 class PanedWidgetDelegate : public views::WidgetDelegate { |
38 public: | 38 public: |
39 PanedWidgetDelegate(views::Widget* widget) : widget_(widget) {} | 39 PanedWidgetDelegate(views::Widget* widget) : widget_(widget) {} |
40 | 40 |
41 void SetAccessiblePanes(const std::vector<views::View*>& panes) { | 41 void SetAccessiblePanes(const std::vector<views::View*>& panes) { |
42 accessible_panes_ = panes; | 42 accessible_panes_ = panes; |
43 } | 43 } |
44 | 44 |
45 // views::WidgetDelegate. | 45 // views::WidgetDelegate. |
46 void GetAccessiblePanes(std::vector<views::View*>* panes) override { | 46 void GetAccessiblePanes(std::vector<views::View*>* panes) override { |
47 std::copy(accessible_panes_.begin(), | 47 std::copy(accessible_panes_.begin(), accessible_panes_.end(), |
48 accessible_panes_.end(), | |
49 std::back_inserter(*panes)); | 48 std::back_inserter(*panes)); |
50 } | 49 } |
51 views::Widget* GetWidget() override { return widget_; }; | 50 views::Widget* GetWidget() override { return widget_; }; |
52 const views::Widget* GetWidget() const override { return widget_; } | 51 const views::Widget* GetWidget() const override { return widget_; } |
53 | 52 |
54 private: | 53 private: |
55 views::Widget* widget_; | 54 views::Widget* widget_; |
56 std::vector<views::View*> accessible_panes_; | 55 std::vector<views::View*> accessible_panes_; |
57 }; | 56 }; |
58 | 57 |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 // Cycle focus to the shelf. | 408 // Cycle focus to the shelf. |
410 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); | 409 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); |
411 | 410 |
412 // Cycle focus should go back to the browser. | 411 // Cycle focus should go back to the browser. |
413 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); | 412 WmShell::Get()->focus_cycler()->RotateFocus(FocusCycler::FORWARD); |
414 EXPECT_TRUE(wm::IsActiveWindow(window.get())); | 413 EXPECT_TRUE(wm::IsActiveWindow(window.get())); |
415 } | 414 } |
416 | 415 |
417 } // namespace test | 416 } // namespace test |
418 } // namespace ash | 417 } // namespace ash |
OLD | NEW |