summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-25 05:11:55 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-25 05:11:55 +0000
commit4280f4be4e602f51c34add5286d119dfa764a00c (patch)
treeb4fa3461a5f760f07a81b994ff9159ddf8782b24 /ash
parent2e6b2ddcc4e9a0363d3e125172be75f1dc24bf6b (diff)
downloadchromium_src-4280f4be4e602f51c34add5286d119dfa764a00c.zip
chromium_src-4280f4be4e602f51c34add5286d119dfa764a00c.tar.gz
chromium_src-4280f4be4e602f51c34add5286d119dfa764a00c.tar.bz2
Remove app mode
BUG=119518 TEST=Existing Launcher tests Review URL: https://chromiumcodereview.appspot.com/9839099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/launcher/launcher_model_unittest.cc10
-rw-r--r--ash/launcher/launcher_types.h3
-rw-r--r--ash/launcher/launcher_unittest.cc37
-rw-r--r--ash/launcher/launcher_view.cc10
4 files changed, 6 insertions, 54 deletions
diff --git a/ash/launcher/launcher_model_unittest.cc b/ash/launcher/launcher_model_unittest.cc
index 2a725f1..55025eb 100644
--- a/ash/launcher/launcher_model_unittest.cc
+++ b/ash/launcher/launcher_model_unittest.cc
@@ -104,17 +104,17 @@ TEST(LauncherModel, BasicAssertions) {
EXPECT_EQ("removed=1", observer.StateStringAndClear());
// Add an app item.
- item.type = TYPE_APP;
+ item.type = TYPE_APP_SHORTCUT;
index = model.Add(item);
observer.StateStringAndClear();
// Change everything.
model.Set(index, item);
EXPECT_EQ("changed=1", observer.StateStringAndClear());
- EXPECT_EQ(TYPE_APP, model.items()[index].type);
+ EXPECT_EQ(TYPE_APP_SHORTCUT, model.items()[index].type);
// Add another item.
- item.type = TYPE_APP;
+ item.type = TYPE_APP_SHORTCUT;
model.Add(item);
observer.StateStringAndClear();
@@ -155,10 +155,6 @@ TEST(LauncherModel, AddIndices) {
int app_shortcut_index2 = model.Add(item);
EXPECT_EQ(2, app_shortcut_index2);
- // Apps should go with tabbed items.
- item.type = TYPE_APP;
- int app_index1 = model.Add(item);
- EXPECT_EQ(5, app_index1);
EXPECT_EQ(TYPE_BROWSER_SHORTCUT, model.items()[0].type);
EXPECT_EQ(TYPE_APP_LIST, model.items()[model.item_count() - 1].type);
diff --git a/ash/launcher/launcher_types.h b/ash/launcher/launcher_types.h
index c1a3ed1..cd952d7 100644
--- a/ash/launcher/launcher_types.h
+++ b/ash/launcher/launcher_types.h
@@ -29,9 +29,6 @@ enum ASH_EXPORT LauncherItemType {
TYPE_TABBED,
// Represents an app window.
- TYPE_APP,
-
- // Represents an app window.
TYPE_APP_SHORTCUT,
// Toggles visiblity of the app list.
diff --git a/ash/launcher/launcher_unittest.cc b/ash/launcher/launcher_unittest.cc
index f872982..83f78f5 100644
--- a/ash/launcher/launcher_unittest.cc
+++ b/ash/launcher/launcher_unittest.cc
@@ -30,43 +30,6 @@ TEST_F(LauncherTest, SetStatusWidth) {
EXPECT_EQ(total_width - total_width / 2, launcher_view->width());
}
-// Confirm that launching an app gets the appropriate state reflected in
-// its button.
-TEST_F(LauncherTest, LaunchApp) {
- Launcher* launcher = Shell::GetInstance()->launcher();
- ASSERT_TRUE(launcher);
- LauncherView* launcher_view = launcher->GetLauncherViewForTest();
- LauncherView::TestAPI test(launcher_view);
- LauncherModel* model = launcher->model();
-
- // Initially we have the app list and chrome icon.
- int button_count = test.GetButtonCount();
-
- // Add closed app.
- LauncherItem item;
- item.type = TYPE_APP;
- int index = model->Add(item);
- ASSERT_EQ(++button_count, test.GetButtonCount());
- LauncherButton* button = test.GetButton(index);
- EXPECT_EQ(LauncherButton::STATE_NORMAL, button->state());
-
- // Open it.
- item = model->items()[index];
- item.status = STATUS_RUNNING;
- model->Set(index, item);
- EXPECT_EQ(LauncherButton::STATE_RUNNING, button->state());
-
- // Close it.
- item = model->items()[index];
- item.status = STATUS_CLOSED;
- model->Set(index, item);
- EXPECT_EQ(LauncherButton::STATE_NORMAL, button->state());
-
- // Remove it.
- model->RemoveItemAt(index);
- ASSERT_EQ(--button_count, test.GetButtonCount());
-}
-
// Confirm that launching a browser gets the appropriate state reflected in
// its button.
TEST_F(LauncherTest, OpenBrowser) {
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 0147fde..44ac922 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -355,8 +355,7 @@ views::View* LauncherView::CreateViewForItem(const LauncherItem& item) {
break;
}
- case TYPE_APP_SHORTCUT:
- case TYPE_APP: {
+ case TYPE_APP_SHORTCUT: {
LauncherButton* button = LauncherButton::Create(this, this);
button->SetImage(item.image);
ReflectItemStatus(item, button);
@@ -464,7 +463,7 @@ void LauncherView::GetOverflowItems(std::vector<LauncherItem>* items) {
}
while (index < view_model_->view_size()) {
const LauncherItem& item = model_->items()[index];
- if (item.type == TYPE_TABBED || item.type == TYPE_APP)
+ if (item.type == TYPE_TABBED)
items->push_back(item);
index++;
}
@@ -601,8 +600,7 @@ void LauncherView::LauncherItemChanged(int model_index,
break;
}
- case TYPE_APP_SHORTCUT:
- case TYPE_APP: {
+ case TYPE_APP_SHORTCUT: {
LauncherButton* button = static_cast<LauncherButton*>(view);
ReflectItemStatus(item, button);
button->SetImage(item.image);
@@ -678,7 +676,6 @@ string16 LauncherView::GetAccessibleName(const views::View* view) {
switch (model_->items()[view_index].type) {
case TYPE_TABBED:
- case TYPE_APP:
case TYPE_APP_SHORTCUT:
return delegate_->GetTitle(model_->items()[view_index]);
@@ -710,7 +707,6 @@ void LauncherView::ButtonPressed(views::Button* sender,
switch (model_->items()[view_index].type) {
case TYPE_TABBED:
- case TYPE_APP:
case TYPE_APP_SHORTCUT:
delegate_->ItemClicked(model_->items()[view_index]);
break;