Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/test_shelf_delegate.h" | 5 #include "ash/test/test_shelf_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/shelf/shelf_model.h" | 9 #include "ash/common/shelf/shelf_model.h" |
| 10 #include "ash/shelf/shelf_util.h" | 10 #include "ash/shelf/shelf_util.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 void TestShelfDelegate::OnShelfDestroyed(Shelf* shelf) {} | 90 void TestShelfDelegate::OnShelfDestroyed(Shelf* shelf) {} |
| 91 | 91 |
| 92 void TestShelfDelegate::OnShelfAlignmentChanged(Shelf* shelf) {} | 92 void TestShelfDelegate::OnShelfAlignmentChanged(Shelf* shelf) {} |
| 93 | 93 |
| 94 void TestShelfDelegate::OnShelfAutoHideBehaviorChanged(Shelf* shelf) {} | 94 void TestShelfDelegate::OnShelfAutoHideBehaviorChanged(Shelf* shelf) {} |
| 95 | 95 |
| 96 void TestShelfDelegate::OnShelfAutoHideStateChanged(Shelf* shelf) {} | 96 void TestShelfDelegate::OnShelfAutoHideStateChanged(Shelf* shelf) {} |
| 97 | 97 |
| 98 void TestShelfDelegate::OnShelfVisibilityStateChanged(Shelf* shelf) {} | 98 void TestShelfDelegate::OnShelfVisibilityStateChanged(Shelf* shelf) {} |
| 99 | 99 |
| 100 ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id) { | 100 ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id, |
| 101 const std::string& app_shelf_id) { | |
|
stevenjb
2016/08/29 15:56:30
To document that app_shelf_id is unused:
cons std
Andra Paraschiv
2016/08/30 09:58:24
Done.
| |
| 101 for (auto const& iter : shelf_id_to_app_id_map_) { | 102 for (auto const& iter : shelf_id_to_app_id_map_) { |
| 102 if (iter.second == app_id) | 103 if (iter.second == app_id) |
| 103 return iter.first; | 104 return iter.first; |
| 104 } | 105 } |
| 105 return 0; | 106 return 0; |
| 106 } | 107 } |
| 107 | 108 |
| 108 bool TestShelfDelegate::HasShelfIDToAppIDMapping(ShelfID id) const { | 109 bool TestShelfDelegate::HasShelfIDToAppIDMapping(ShelfID id) const { |
| 109 return shelf_id_to_app_id_map_.find(id) != shelf_id_to_app_id_map_.end(); | 110 return shelf_id_to_app_id_map_.find(id) != shelf_id_to_app_id_map_.end(); |
| 110 } | 111 } |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 130 const std::string& app_id) { | 131 const std::string& app_id) { |
| 131 shelf_id_to_app_id_map_[shelf_id] = app_id; | 132 shelf_id_to_app_id_map_[shelf_id] = app_id; |
| 132 } | 133 } |
| 133 | 134 |
| 134 void TestShelfDelegate::RemoveShelfIDToAppIDMapping(ShelfID shelf_id) { | 135 void TestShelfDelegate::RemoveShelfIDToAppIDMapping(ShelfID shelf_id) { |
| 135 shelf_id_to_app_id_map_.erase(shelf_id); | 136 shelf_id_to_app_id_map_.erase(shelf_id); |
| 136 } | 137 } |
| 137 | 138 |
| 138 } // namespace test | 139 } // namespace test |
| 139 } // namespace ash | 140 } // namespace ash |
| OLD | NEW |