Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: trunk/src/ash/launcher/launcher_item_delegate_manager.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/ash/launcher/launcher_delegate.h ('k') | trunk/src/ash/shell/app_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/launcher/launcher_item_delegate_manager.h" 5 #include "ash/launcher/launcher_item_delegate_manager.h"
6 6
7 #include "base/logging.h"
8
9 namespace ash { 7 namespace ash {
10 8
11 LauncherItemDelegateManager::LauncherItemDelegateManager() { 9 LauncherItemDelegateManager::LauncherItemDelegateManager() {
12 } 10 }
13 11
14 LauncherItemDelegateManager::~LauncherItemDelegateManager() { 12 LauncherItemDelegateManager::~LauncherItemDelegateManager() {
15 } 13 }
16 14
17 void LauncherItemDelegateManager::RegisterLauncherItemDelegate( 15 void LauncherItemDelegateManager::RegisterLauncherItemDelegate(
18 ash::LauncherItemType type, LauncherItemDelegate* item_delegate) { 16 ash::LauncherItemType type, LauncherItemDelegate* item_delegate) {
19 // When a new |item_delegate| is registered with an exsiting |type|, it will 17 // When a new |item_delegate| is registered with an exsiting |type|, it will
20 // get overwritten. 18 // get overwritten.
21 item_type_to_item_delegate_map_[type] = item_delegate; 19 item_type_to_item_delegate_map_[type] = item_delegate;
22 } 20 }
23 21
24 LauncherItemDelegate* LauncherItemDelegateManager::GetLauncherItemDelegate( 22 LauncherItemDelegate* LauncherItemDelegateManager::GetLauncherItemDelegate(
25 ash::LauncherItemType item_type) { 23 ash::LauncherItemType item_type) {
26 DCHECK(item_type_to_item_delegate_map_.find(item_type) != 24 DCHECK(item_type_to_item_delegate_map_.find(item_type) !=
27 item_type_to_item_delegate_map_.end()); 25 item_type_to_item_delegate_map_.end());
28 return item_type_to_item_delegate_map_[item_type]; 26 return item_type_to_item_delegate_map_[item_type];
29 } 27 }
30 28
31 } // namespace ash 29 } // namespace ash
OLDNEW
« no previous file with comments | « trunk/src/ash/launcher/launcher_delegate.h ('k') | trunk/src/ash/shell/app_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698