| 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/shelf/shelf_view.h" | 5 #include "ash/common/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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // ids. This does not support pinning and unpinning operations and the return | 242 // ids. This does not support pinning and unpinning operations and the return |
| 243 // value of IsAppPinned(...) is configurable. | 243 // value of IsAppPinned(...) is configurable. |
| 244 class TestShelfDelegateForShelfView : public ShelfDelegate { | 244 class TestShelfDelegateForShelfView : public ShelfDelegate { |
| 245 public: | 245 public: |
| 246 TestShelfDelegateForShelfView() {} | 246 TestShelfDelegateForShelfView() {} |
| 247 ~TestShelfDelegateForShelfView() override {} | 247 ~TestShelfDelegateForShelfView() override {} |
| 248 | 248 |
| 249 void set_is_app_pinned(bool is_pinned) { is_app_pinned_ = is_pinned; } | 249 void set_is_app_pinned(bool is_pinned) { is_app_pinned_ = is_pinned; } |
| 250 | 250 |
| 251 // ShelfDelegate overrides: | 251 // ShelfDelegate overrides: |
| 252 void OnShelfCreated(Shelf* shelf) override {} | 252 void OnShelfCreated(WmShelf* shelf) override {} |
| 253 | 253 |
| 254 void OnShelfDestroyed(Shelf* shelf) override {} | 254 void OnShelfDestroyed(WmShelf* shelf) override {} |
| 255 | 255 |
| 256 void OnShelfAlignmentChanged(Shelf* shelf) override {} | 256 void OnShelfAlignmentChanged(WmShelf* shelf) override {} |
| 257 | 257 |
| 258 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {} | 258 void OnShelfAutoHideBehaviorChanged(WmShelf* shelf) override {} |
| 259 | 259 |
| 260 void OnShelfAutoHideStateChanged(Shelf* shelf) override {} | 260 void OnShelfAutoHideStateChanged(WmShelf* shelf) override {} |
| 261 | 261 |
| 262 void OnShelfVisibilityStateChanged(Shelf* shelf) override {} | 262 void OnShelfVisibilityStateChanged(WmShelf* shelf) override {} |
| 263 | 263 |
| 264 ShelfID GetShelfIDForAppID(const std::string& app_id) override { | 264 ShelfID GetShelfIDForAppID(const std::string& app_id) override { |
| 265 ShelfID id = 0; | 265 ShelfID id = 0; |
| 266 EXPECT_TRUE(base::StringToInt(app_id, &id)); | 266 EXPECT_TRUE(base::StringToInt(app_id, &id)); |
| 267 return id; | 267 return id; |
| 268 } | 268 } |
| 269 | 269 |
| 270 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return true; } | 270 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return true; } |
| 271 | 271 |
| 272 const std::string& GetAppIDForShelfID(ShelfID id) override { | 272 const std::string& GetAppIDForShelfID(ShelfID id) override { |
| (...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 test_api_->CloseMenu(); | 2568 test_api_->CloseMenu(); |
| 2569 EXPECT_EQ(views::InkDropState::HIDDEN, | 2569 EXPECT_EQ(views::InkDropState::HIDDEN, |
| 2570 browser_button_ink_drop_->GetTargetInkDropState()); | 2570 browser_button_ink_drop_->GetTargetInkDropState()); |
| 2571 EXPECT_THAT(browser_button_ink_drop_->GetAndResetRequestedStates(), | 2571 EXPECT_THAT(browser_button_ink_drop_->GetAndResetRequestedStates(), |
| 2572 ElementsAre(views::InkDropState::ACTIVATED, | 2572 ElementsAre(views::InkDropState::ACTIVATED, |
| 2573 views::InkDropState::DEACTIVATED)); | 2573 views::InkDropState::DEACTIVATED)); |
| 2574 } | 2574 } |
| 2575 | 2575 |
| 2576 } // namespace test | 2576 } // namespace test |
| 2577 } // namespace ash | 2577 } // namespace ash |
| OLD | NEW |