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

Unified Diff: ash/shelf/shelf_item_delegate_manager.h

Issue 97173003: ash: Rename more Launcher classes to Shelf*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: link chrome Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_item_delegate.h ('k') | ash/shelf/shelf_item_delegate_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_item_delegate_manager.h
diff --git a/ash/launcher/launcher_item_delegate_manager.h b/ash/shelf/shelf_item_delegate_manager.h
similarity index 39%
rename from ash/launcher/launcher_item_delegate_manager.h
rename to ash/shelf/shelf_item_delegate_manager.h
index 1768cd964e47a7c0a8303f535bc58fc3af4f4f6a..dc4df7339b178daf1aec972416cd6c81729eb953 100644
--- a/ash/launcher/launcher_item_delegate_manager.h
+++ b/ash/shelf/shelf_item_delegate_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_LAUNCHER_LAUNCHER_ITEM_DELEGATE_MANAGER_H_
-#define ASH_LAUNCHER_LAUNCHER_ITEM_DELEGATE_MANAGER_H_
+#ifndef ASH_SHELF_SHELF_ITEM_DELEGATE_MANAGER_H_
+#define ASH_SHELF_SHELF_ITEM_DELEGATE_MANAGER_H_
#include <map>
@@ -14,56 +14,54 @@
#include "base/memory/scoped_ptr.h"
namespace ash {
-class LauncherItemDelegate;
+class ShelfItemDelegate;
class ShelfModel;
namespace test {
-class LauncherItemDelegateManagerTestAPI;
+class ShelfItemDelegateManagerTestAPI;
}
-// LauncherItemDelegateManager manages the set of LauncherItemDelegates for the
-// launcher. LauncherItemDelegateManager does not create LauncherItemDelegates,
-// rather it is expected that someone else invokes SetLauncherItemDelegate
-// appropriately. On the other hand, LauncherItemDelegateManager destroys
-// LauncherItemDelegates when the corresponding item from the model is removed.
-class ASH_EXPORT LauncherItemDelegateManager : public ShelfModelObserver {
+// ShelfItemDelegateManager manages the set of ShelfItemDelegates for the
+// launcher. ShelfItemDelegateManager does not create ShelfItemDelegates,
+// rather it is expected that someone else invokes SetShelfItemDelegate
+// appropriately. On the other hand, ShelfItemDelegateManager destroys
+// ShelfItemDelegates when the corresponding item from the model is removed.
+class ASH_EXPORT ShelfItemDelegateManager : public ShelfModelObserver {
public:
- explicit LauncherItemDelegateManager(ShelfModel* model);
- virtual ~LauncherItemDelegateManager();
+ explicit ShelfItemDelegateManager(ShelfModel* model);
+ virtual ~ShelfItemDelegateManager();
// Set |item_delegate| for |id| and take an ownership.
- void SetLauncherItemDelegate(
- ash::LauncherID id,
- scoped_ptr<ash::LauncherItemDelegate> item_delegate);
+ void SetShelfItemDelegate(LauncherID id,
+ scoped_ptr<ShelfItemDelegate> item_delegate);
- // Returns LauncherItemDelegate for |item_type|. Always returns non-NULL.
- LauncherItemDelegate* GetLauncherItemDelegate(ash::LauncherID id);
+ // Returns ShelfItemDelegate for |item_type|. Always returns non-NULL.
+ ShelfItemDelegate* GetShelfItemDelegate(LauncherID id);
// ShelfModelObserver overrides:
virtual void ShelfItemAdded(int model_index) OVERRIDE;
- virtual void ShelfItemRemoved(int index, ash::LauncherID id) OVERRIDE;
+ virtual void ShelfItemRemoved(int index, LauncherID id) OVERRIDE;
virtual void ShelfItemMoved(int start_index, int targetindex) OVERRIDE;
virtual void ShelfItemChanged(int index,
const LauncherItem& old_item) OVERRIDE;
virtual void ShelfStatusChanged() OVERRIDE;
private:
- friend class ash::test::LauncherItemDelegateManagerTestAPI;
+ friend class test::ShelfItemDelegateManagerTestAPI;
- typedef std::map<ash::LauncherID, LauncherItemDelegate*>
- LauncherIDToItemDelegateMap;
+ typedef std::map<LauncherID, ShelfItemDelegate*> LauncherIDToItemDelegateMap;
- // Remove and destroy LauncherItemDelegate for |id|.
- void RemoveLauncherItemDelegate(ash::LauncherID id);
+ // Remove and destroy ShelfItemDelegate for |id|.
+ void RemoveShelfItemDelegate(LauncherID id);
// Owned by Shell.
ShelfModel* model_;
LauncherIDToItemDelegateMap id_to_item_delegate_map_;
- DISALLOW_COPY_AND_ASSIGN(LauncherItemDelegateManager);
+ DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateManager);
};
} // namespace ash
-#endif // ASH_LAUNCHER_LAUNCHER_ITEM_DELEGATE_MANAGER_H_
+#endif // ASH_SHELF_SHELF_ITEM_DELEGATE_MANAGER_H_
« no previous file with comments | « ash/shelf/shelf_item_delegate.h ('k') | ash/shelf/shelf_item_delegate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698