Chromium Code Reviews| 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 new |item_delegate| is registered with exsiting |type|, overwrites | |
|
Mr4D (OOO till 08-26)
2013/08/27 15:00:52
// When a new |item_delegate| is registered with
simonhong_
2013/08/27 21:52:00
Done.
| |
| 18 // it. | |
| 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 |