summaryrefslogtreecommitdiffstats
path: root/ash/launcher
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 16:52:20 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 16:52:20 +0000
commit259771100a1b9330485f674f58176b04e69720cd (patch)
tree6297c5c179c7f11824712ac165a85356e296ef5d /ash/launcher
parentd5416ff9e1e72b9222ceac6d707b89d3200befb9 (diff)
downloadchromium_src-259771100a1b9330485f674f58176b04e69720cd.zip
chromium_src-259771100a1b9330485f674f58176b04e69720cd.tar.gz
chromium_src-259771100a1b9330485f674f58176b04e69720cd.tar.bz2
Support platform apps in launcher
BUG=125895 TEST=New LauncherPlatformAppBrowserTest.* Review URL: https://chromiumcodereview.appspot.com/10443069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher')
-rw-r--r--ash/launcher/launcher_types.h3
-rw-r--r--ash/launcher/launcher_view.cc4
2 files changed, 7 insertions, 0 deletions
diff --git a/ash/launcher/launcher_types.h b/ash/launcher/launcher_types.h
index da0c2bd..6044841 100644
--- a/ash/launcher/launcher_types.h
+++ b/ash/launcher/launcher_types.h
@@ -39,6 +39,9 @@ enum LauncherItemType {
// The browser shortcut button.
TYPE_BROWSER_SHORTCUT,
+
+ // Represents a platform app.
+ TYPE_PLATFORM_APP,
};
// Represents the status of pinned or running app launcher items.
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index ae5d65b..4a5e9fb 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -474,6 +474,7 @@ views::View* LauncherView::CreateViewForItem(const LauncherItem& item) {
}
case TYPE_APP_SHORTCUT:
+ case TYPE_PLATFORM_APP:
case TYPE_APP_PANEL: {
LauncherButton* button = LauncherButton::Create(this, this);
button->SetImage(item.image);
@@ -620,6 +621,7 @@ bool LauncherView::SameDragType(LauncherItemType typea,
case TYPE_APP_SHORTCUT:
case TYPE_APP_LIST:
case TYPE_BROWSER_SHORTCUT:
+ case TYPE_PLATFORM_APP:
return typeb == typea;
}
NOTREACHED();
@@ -925,6 +927,7 @@ string16 LauncherView::GetAccessibleName(const views::View* view) {
case TYPE_TABBED:
case TYPE_APP_PANEL:
case TYPE_APP_SHORTCUT:
+ case TYPE_PLATFORM_APP:
return delegate_->GetTitle(model_->items()[view_index]);
case TYPE_APP_LIST:
@@ -956,6 +959,7 @@ void LauncherView::ButtonPressed(views::Button* sender,
case TYPE_TABBED:
case TYPE_APP_PANEL:
case TYPE_APP_SHORTCUT:
+ case TYPE_PLATFORM_APP:
delegate_->ItemClicked(model_->items()[view_index], event.flags());
break;