| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ash/launcher/launcher_item_delegate_manager.h" |
| 6 |
| 7 namespace ash { |
| 8 |
| 9 LauncherItemDelegateManager::LauncherItemDelegateManager() { |
| 10 } |
| 11 |
| 12 LauncherItemDelegateManager::~LauncherItemDelegateManager() { |
| 13 } |
| 14 |
| 15 void LauncherItemDelegateManager::RegisterLauncherItemDelegate( |
| 16 ash::LauncherItemType type, LauncherItemDelegate* item_delegate) { |
| 17 // When a new |item_delegate| is registered with an exsiting |type|, it will |
| 18 // get overwritten. |
| 19 item_type_to_item_delegate_map_[type] = item_delegate; |
| 20 } |
| 21 |
| 22 LauncherItemDelegate* LauncherItemDelegateManager::GetLauncherItemDelegate( |
| 23 ash::LauncherItemType item_type) { |
| 24 DCHECK(item_type_to_item_delegate_map_.find(item_type) != |
| 25 item_type_to_item_delegate_map_.end()); |
| 26 return item_type_to_item_delegate_map_[item_type]; |
| 27 } |
| 28 |
| 29 } // namespace ash |
| OLD | NEW |