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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 void TestShelfDelegate::OnWindowHierarchyChanging( | 79 void TestShelfDelegate::OnWindowHierarchyChanging( |
80 const HierarchyChangeParams& params) { | 80 const HierarchyChangeParams& params) { |
81 // The window may be legitimately reparented while staying open if it moves | 81 // The window may be legitimately reparented while staying open if it moves |
82 // to another display or container. If the window does not have a new parent | 82 // to another display or container. If the window does not have a new parent |
83 // then remove the shelf item. | 83 // then remove the shelf item. |
84 if (!params.new_parent) | 84 if (!params.new_parent) |
85 RemoveShelfItemForWindow(params.target); | 85 RemoveShelfItemForWindow(params.target); |
86 } | 86 } |
87 | 87 |
88 void TestShelfDelegate::OnShelfCreated(Shelf* shelf) {} | 88 void TestShelfDelegate::OnShelfCreated(WmShelf* shelf) {} |
89 | 89 |
90 void TestShelfDelegate::OnShelfDestroyed(Shelf* shelf) {} | 90 void TestShelfDelegate::OnShelfDestroyed(WmShelf* shelf) {} |
91 | 91 |
92 void TestShelfDelegate::OnShelfAlignmentChanged(Shelf* shelf) {} | 92 void TestShelfDelegate::OnShelfAlignmentChanged(WmShelf* shelf) {} |
93 | 93 |
94 void TestShelfDelegate::OnShelfAutoHideBehaviorChanged(Shelf* shelf) {} | 94 void TestShelfDelegate::OnShelfAutoHideBehaviorChanged(WmShelf* shelf) {} |
95 | 95 |
96 void TestShelfDelegate::OnShelfAutoHideStateChanged(Shelf* shelf) {} | 96 void TestShelfDelegate::OnShelfAutoHideStateChanged(WmShelf* shelf) {} |
97 | 97 |
98 void TestShelfDelegate::OnShelfVisibilityStateChanged(Shelf* shelf) {} | 98 void TestShelfDelegate::OnShelfVisibilityStateChanged(WmShelf* shelf) {} |
99 | 99 |
100 ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id) { | 100 ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id) { |
101 for (auto const& iter : shelf_id_to_app_id_map_) { | 101 for (auto const& iter : shelf_id_to_app_id_map_) { |
102 if (iter.second == app_id) | 102 if (iter.second == app_id) |
103 return iter.first; | 103 return iter.first; |
104 } | 104 } |
105 return 0; | 105 return 0; |
106 } | 106 } |
107 | 107 |
108 bool TestShelfDelegate::HasShelfIDToAppIDMapping(ShelfID id) const { | 108 bool TestShelfDelegate::HasShelfIDToAppIDMapping(ShelfID id) const { |
(...skipping 21 matching lines...) Expand all Loading... |
130 const std::string& app_id) { | 130 const std::string& app_id) { |
131 shelf_id_to_app_id_map_[shelf_id] = app_id; | 131 shelf_id_to_app_id_map_[shelf_id] = app_id; |
132 } | 132 } |
133 | 133 |
134 void TestShelfDelegate::RemoveShelfIDToAppIDMapping(ShelfID shelf_id) { | 134 void TestShelfDelegate::RemoveShelfIDToAppIDMapping(ShelfID shelf_id) { |
135 shelf_id_to_app_id_map_.erase(shelf_id); | 135 shelf_id_to_app_id_map_.erase(shelf_id); |
136 } | 136 } |
137 | 137 |
138 } // namespace test | 138 } // namespace test |
139 } // namespace ash | 139 } // namespace ash |
OLD | NEW |