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/shelf/shelf_view.h" | 5 #include "ash/shelf/shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 ink_drop_->AnimateToState(ink_drop_state); | 1991 ink_drop_->AnimateToState(ink_drop_state); |
1992 } | 1992 } |
1993 void SnapToActivated() override { ink_drop_->SnapToActivated(); } | 1993 void SnapToActivated() override { ink_drop_->SnapToActivated(); } |
1994 void SetHovered(bool is_hovered) override { | 1994 void SetHovered(bool is_hovered) override { |
1995 ink_drop_->SetHovered(is_hovered); | 1995 ink_drop_->SetHovered(is_hovered); |
1996 } | 1996 } |
1997 void SetFocused(bool is_focused) override { | 1997 void SetFocused(bool is_focused) override { |
1998 ink_drop_->SetFocused(is_focused); | 1998 ink_drop_->SetFocused(is_focused); |
1999 } | 1999 } |
2000 | 2000 |
| 2001 bool IsHighlightFadingInOrVisible() const override { |
| 2002 return ink_drop_->IsHighlightFadingInOrVisible(); |
| 2003 } |
| 2004 |
| 2005 void SetShowHighlightOnHover(bool show_highlight_on_hover) override { |
| 2006 ink_drop_->SetShowHighlightOnHover(show_highlight_on_hover); |
| 2007 } |
| 2008 |
| 2009 void SetShowHighlightOnFocus(bool show_highlight_on_focus) override { |
| 2010 ink_drop_->SetShowHighlightOnFocus(show_highlight_on_focus); |
| 2011 } |
| 2012 |
2001 std::unique_ptr<views::InkDrop> ink_drop_; | 2013 std::unique_ptr<views::InkDrop> ink_drop_; |
2002 std::vector<views::InkDropState> requested_states_; | 2014 std::vector<views::InkDropState> requested_states_; |
2003 | 2015 |
2004 private: | 2016 private: |
2005 DISALLOW_COPY_AND_ASSIGN(InkDropSpy); | 2017 DISALLOW_COPY_AND_ASSIGN(InkDropSpy); |
2006 }; | 2018 }; |
2007 | 2019 |
2008 // A ShelfItemDelegate that returns a menu for the shelf item. | 2020 // A ShelfItemDelegate that returns a menu for the shelf item. |
2009 class ListMenuShelfItemDelegate : public ShelfItemDelegate { | 2021 class ListMenuShelfItemDelegate : public ShelfItemDelegate { |
2010 public: | 2022 public: |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3126 EXPECT_EQ(views::InkDropState::ACTIVATED, | 3138 EXPECT_EQ(views::InkDropState::ACTIVATED, |
3127 overflow_button_ink_drop_->GetTargetInkDropState()); | 3139 overflow_button_ink_drop_->GetTargetInkDropState()); |
3128 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), | 3140 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), |
3129 IsEmpty()); | 3141 IsEmpty()); |
3130 | 3142 |
3131 ASSERT_TRUE(test_api_->IsShowingOverflowBubble()); | 3143 ASSERT_TRUE(test_api_->IsShowingOverflowBubble()); |
3132 } | 3144 } |
3133 | 3145 |
3134 } // namespace test | 3146 } // namespace test |
3135 } // namespace ash | 3147 } // namespace ash |
OLD | NEW |