| 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/focus_cycler.h" | 5 #include "ash/focus_cycler.h" |
| 6 | 6 |
| 7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 class PanedWidgetDelegate : public views::WidgetDelegate { | 40 class PanedWidgetDelegate : public views::WidgetDelegate { |
| 41 public: | 41 public: |
| 42 PanedWidgetDelegate(views::Widget* widget) : widget_(widget) {} | 42 PanedWidgetDelegate(views::Widget* widget) : widget_(widget) {} |
| 43 | 43 |
| 44 void SetAccessiblePanes(const std::vector<views::View*>& panes) { | 44 void SetAccessiblePanes(const std::vector<views::View*>& panes) { |
| 45 accessible_panes_ = panes; | 45 accessible_panes_ = panes; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // views::WidgetDelegate. | 48 // views::WidgetDelegate. |
| 49 virtual void GetAccessiblePanes(std::vector<views::View*>* panes) { | 49 virtual void GetAccessiblePanes(std::vector<views::View*>* panes) OVERRIDE { |
| 50 std::copy(accessible_panes_.begin(), accessible_panes_.end(), | 50 std::copy(accessible_panes_.begin(), |
| 51 accessible_panes_.end(), |
| 51 std::back_inserter(*panes)); | 52 std::back_inserter(*panes)); |
| 52 } | 53 } |
| 53 virtual views::Widget* GetWidget() OVERRIDE { | 54 virtual views::Widget* GetWidget() OVERRIDE { |
| 54 return widget_; | 55 return widget_; |
| 55 }; | 56 }; |
| 56 virtual const views::Widget* GetWidget() const OVERRIDE { | 57 virtual const views::Widget* GetWidget() const OVERRIDE { |
| 57 return widget_; | 58 return widget_; |
| 58 } | 59 } |
| 59 | 60 |
| 60 private: | 61 private: |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 // should do the same thing. | 393 // should do the same thing. |
| 393 focus_cycler()->RotateFocus(FocusCycler::BACKWARD); | 394 focus_cycler()->RotateFocus(FocusCycler::BACKWARD); |
| 394 EXPECT_TRUE(shelf_widget()->IsActive()); | 395 EXPECT_TRUE(shelf_widget()->IsActive()); |
| 395 event_generator.PressKey(ui::VKEY_ESCAPE, 0); | 396 event_generator.PressKey(ui::VKEY_ESCAPE, 0); |
| 396 EXPECT_TRUE(wm::IsActiveWindow(browser_window)); | 397 EXPECT_TRUE(wm::IsActiveWindow(browser_window)); |
| 397 EXPECT_EQ(focus_manager->GetFocusedView(), view1); | 398 EXPECT_EQ(focus_manager->GetFocusedView(), view1); |
| 398 } | 399 } |
| 399 | 400 |
| 400 } // namespace test | 401 } // namespace test |
| 401 } // namespace ash | 402 } // namespace ash |
| OLD | NEW |