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/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
10 #include "ash/common/shelf/shelf_model.h" | 10 #include "ash/common/shelf/shelf_model.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 void TestShelfDelegate::OnWindowHierarchyChanging( | 83 void TestShelfDelegate::OnWindowHierarchyChanging( |
84 const HierarchyChangeParams& params) { | 84 const HierarchyChangeParams& params) { |
85 // The window may be legitimately reparented while staying open if it moves | 85 // The window may be legitimately reparented while staying open if it moves |
86 // to another display or container. If the window does not have a new parent | 86 // to another display or container. If the window does not have a new parent |
87 // then remove the shelf item. | 87 // then remove the shelf item. |
88 if (!params.new_parent) | 88 if (!params.new_parent) |
89 RemoveShelfItemForWindow(params.target); | 89 RemoveShelfItemForWindow(params.target); |
90 } | 90 } |
91 | 91 |
92 void TestShelfDelegate::OnShelfCreated(WmShelf* shelf) {} | |
93 | |
94 void TestShelfDelegate::OnShelfDestroyed(WmShelf* shelf) {} | |
95 | |
96 void TestShelfDelegate::OnShelfAlignmentChanged(WmShelf* shelf) {} | |
97 | |
98 void TestShelfDelegate::OnShelfAutoHideBehaviorChanged(WmShelf* shelf) {} | |
99 | |
100 void TestShelfDelegate::OnShelfAutoHideStateChanged(WmShelf* shelf) {} | |
101 | |
102 void TestShelfDelegate::OnShelfVisibilityStateChanged(WmShelf* shelf) {} | |
103 | |
104 ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id) { | 92 ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id) { |
105 for (auto const& iter : shelf_id_to_app_id_map_) { | 93 for (auto const& iter : shelf_id_to_app_id_map_) { |
106 if (iter.second == app_id) | 94 if (iter.second == app_id) |
107 return iter.first; | 95 return iter.first; |
108 } | 96 } |
109 return 0; | 97 return 0; |
110 } | 98 } |
111 | 99 |
112 ShelfID TestShelfDelegate::GetShelfIDForAppIDAndLaunchID( | 100 ShelfID TestShelfDelegate::GetShelfIDForAppIDAndLaunchID( |
113 const std::string& app_id, | 101 const std::string& app_id, |
(...skipping 26 matching lines...) Expand all Loading... |
140 const std::string& app_id) { | 128 const std::string& app_id) { |
141 shelf_id_to_app_id_map_[shelf_id] = app_id; | 129 shelf_id_to_app_id_map_[shelf_id] = app_id; |
142 } | 130 } |
143 | 131 |
144 void TestShelfDelegate::RemoveShelfIDToAppIDMapping(ShelfID shelf_id) { | 132 void TestShelfDelegate::RemoveShelfIDToAppIDMapping(ShelfID shelf_id) { |
145 shelf_id_to_app_id_map_.erase(shelf_id); | 133 shelf_id_to_app_id_map_.erase(shelf_id); |
146 } | 134 } |
147 | 135 |
148 } // namespace test | 136 } // namespace test |
149 } // namespace ash | 137 } // namespace ash |
OLD | NEW |