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

Unified Diff: ui/aura_shell/launcher/launcher_model.h

Issue 8247012: Positions the launcher in the bottom left corner. Adds ShellDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura_shell/launcher/launcher.cc ('k') | ui/aura_shell/launcher/launcher_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/launcher/launcher_model.h
diff --git a/ui/aura_shell/launcher/launcher_model.h b/ui/aura_shell/launcher/launcher_model.h
index 9aac41c09577bd19fd36100a354e537a66334dfa..242129e25ef8935ed74f2303a95353aadc4d75cf 100644
--- a/ui/aura_shell/launcher/launcher_model.h
+++ b/ui/aura_shell/launcher/launcher_model.h
@@ -10,6 +10,7 @@
#include "base/observer_list.h"
#include "ui/aura_shell/aura_shell_export.h"
+#include "ui/aura_shell/launcher/launcher_types.h"
namespace views {
class View;
@@ -25,40 +26,24 @@ class AURA_SHELL_EXPORT LauncherModel {
LauncherModel();
~LauncherModel();
- // Adds a new view to the model. The model takes ownership of the view.
- void AddItem(views::View* view, int index, bool draggable);
-
- // Removes an item by the view.
- void RemoveItem(views::View* view);
+ // Adds a new item to the model.
+ void Add(int index, const LauncherItem& item);
// Removes the item at |index|.
void RemoveItemAt(int index);
- // The selected index; -1 if nothing is selected.
- void SetSelectedIndex(int index);
- int selected_index() const { return selected_index_; }
+ // Changes the images of the specified item.
+ void SetTabbedImages(int index, const LauncherTabbedImages& images);
+ void SetAppImage(int index, const SkBitmap& image);
- // Returns the index of |view|, or -1 if view isn't contained in this model.
- int IndexOfItemByView(views::View* view);
+ const LauncherItems& items() const { return items_; }
int item_count() const { return static_cast<int>(items_.size()); }
- views::View* view_at(int index) { return items_[index].view; }
- bool is_draggable(int index) { return items_[index].draggable; }
void AddObserver(LauncherModelObserver* observer);
void RemoveObserver(LauncherModelObserver* observer);
private:
- struct Item {
- Item() : view(NULL), draggable(false) {}
-
- // The view, we own this.
- views::View* view;
- bool draggable;
- };
- typedef std::vector<Item> Items;
-
- Items items_;
- int selected_index_;
+ LauncherItems items_;
ObserverList<LauncherModelObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(LauncherModel);
« no previous file with comments | « ui/aura_shell/launcher/launcher.cc ('k') | ui/aura_shell/launcher/launcher_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698