| 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 } | 2036 } |
| 2037 | 2037 |
| 2038 // ShelfMenuModel: | 2038 // ShelfMenuModel: |
| 2039 bool IsCommandActive(int command_id) const override { return false; } | 2039 bool IsCommandActive(int command_id) const override { return false; } |
| 2040 | 2040 |
| 2041 // ui::SimpleMenuModel::Delegate: | 2041 // ui::SimpleMenuModel::Delegate: |
| 2042 bool IsCommandIdChecked(int command_id) const override { return false; } | 2042 bool IsCommandIdChecked(int command_id) const override { return false; } |
| 2043 bool IsCommandIdEnabled(int command_id) const override { | 2043 bool IsCommandIdEnabled(int command_id) const override { |
| 2044 return command_id != 0; | 2044 return command_id != 0; |
| 2045 } | 2045 } |
| 2046 bool GetAcceleratorForCommandId(int command_id, | |
| 2047 ui::Accelerator* accelerator) const override { | |
| 2048 return false; | |
| 2049 } | |
| 2050 void ExecuteCommand(int command_id, int event_flags) override {} | 2046 void ExecuteCommand(int command_id, int event_flags) override {} |
| 2051 | 2047 |
| 2052 DISALLOW_COPY_AND_ASSIGN(TestShelfMenuModel); | 2048 DISALLOW_COPY_AND_ASSIGN(TestShelfMenuModel); |
| 2053 }; | 2049 }; |
| 2054 | 2050 |
| 2055 // A ShelfItemDelegate that returns a menu for the shelf item. | 2051 // A ShelfItemDelegate that returns a menu for the shelf item. |
| 2056 class ListMenuShelfItemDelegate : public TestShelfItemDelegate { | 2052 class ListMenuShelfItemDelegate : public TestShelfItemDelegate { |
| 2057 public: | 2053 public: |
| 2058 ListMenuShelfItemDelegate() : TestShelfItemDelegate(nullptr) {} | 2054 ListMenuShelfItemDelegate() : TestShelfItemDelegate(nullptr) {} |
| 2059 ~ListMenuShelfItemDelegate() override {} | 2055 ~ListMenuShelfItemDelegate() override {} |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2583 test_api_->CloseMenu(); | 2579 test_api_->CloseMenu(); |
| 2584 EXPECT_EQ(views::InkDropState::HIDDEN, | 2580 EXPECT_EQ(views::InkDropState::HIDDEN, |
| 2585 browser_button_ink_drop_->GetTargetInkDropState()); | 2581 browser_button_ink_drop_->GetTargetInkDropState()); |
| 2586 EXPECT_THAT(browser_button_ink_drop_->GetAndResetRequestedStates(), | 2582 EXPECT_THAT(browser_button_ink_drop_->GetAndResetRequestedStates(), |
| 2587 ElementsAre(views::InkDropState::ACTIVATED, | 2583 ElementsAre(views::InkDropState::ACTIVATED, |
| 2588 views::InkDropState::DEACTIVATED)); | 2584 views::InkDropState::DEACTIVATED)); |
| 2589 } | 2585 } |
| 2590 | 2586 |
| 2591 } // namespace test | 2587 } // namespace test |
| 2592 } // namespace ash | 2588 } // namespace ash |
| OLD | NEW |