summaryrefslogtreecommitdiffstats
path: root/ash/launcher/launcher_model.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 18:22:51 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 18:22:51 +0000
commit194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656 (patch)
tree8b71cea824e13b6fca3734642fdf83e56c7d47f7 /ash/launcher/launcher_model.cc
parent783eb300ba843d498bfb55076d81d45e77bb6fff (diff)
downloadchromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.zip
chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.tar.gz
chromium_src-194ad1dd149ad2a577cd1a41ccfdd4a1fb7cd656.tar.bz2
Tweaks for the launcher:
. App list and browser shortcut buttons can be moved around. . Clicking the tabbed button cycles windows (creating a new one if there isn't one). BUG=110094 TEST=see bug R=ben@chromium.org,jamescook@chromium.org Review URL: http://codereview.chromium.org/9231030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher/launcher_model.cc')
-rw-r--r--ash/launcher/launcher_model.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ash/launcher/launcher_model.cc b/ash/launcher/launcher_model.cc
index c1778fa..efd17ca 100644
--- a/ash/launcher/launcher_model.cc
+++ b/ash/launcher/launcher_model.cc
@@ -10,6 +10,8 @@
namespace ash {
LauncherModel::LauncherModel() {
+ Add(0, LauncherItem(TYPE_APP_LIST, NULL));
+ Add(1, LauncherItem(TYPE_BROWSER_SHORTCUT, NULL));
}
LauncherModel::~LauncherModel() {
@@ -24,6 +26,9 @@ void LauncherModel::Add(int index, const LauncherItem& item) {
void LauncherModel::RemoveItemAt(int index) {
DCHECK(index >= 0 && index < item_count());
+ // The app list and browser shortcut can't be removed.
+ DCHECK(items_[index].type != TYPE_APP_LIST &&
+ items_[index].type != TYPE_BROWSER_SHORTCUT);
items_.erase(items_.begin() + index);
FOR_EACH_OBSERVER(LauncherModelObserver, observers_,
LauncherItemRemoved(index));