Index: chrome/browser/ui/views/ash/app_list/app_list_view_delegate.cc |
=================================================================== |
--- chrome/browser/ui/views/ash/app_list/app_list_view_delegate.cc (revision 135932) |
+++ chrome/browser/ui/views/ash/app_list/app_list_view_delegate.cc (working copy) |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h" |
+#include "ash/shell.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/ui/views/ash/app_list/app_list_model_builder.h" |
#include "chrome/browser/ui/views/ash/app_list/chrome_app_list_item.h" |
@@ -14,7 +15,7 @@ |
AppListViewDelegate::~AppListViewDelegate() { |
} |
-void AppListViewDelegate::SetModel(ash::AppListModel* model) { |
+void AppListViewDelegate::SetModel(app_list::AppListModel* model) { |
if (model) { |
if (!model_builder_.get()) { |
model_builder_.reset( |
@@ -33,7 +34,13 @@ |
} |
void AppListViewDelegate::OnAppListItemActivated( |
- ash::AppListItemModel* item, |
+ app_list::AppListItemModel* item, |
int event_flags) { |
static_cast<ChromeAppListItem*>(item)->Activate(event_flags); |
} |
+ |
+void AppListViewDelegate::Close() { |
+ DCHECK(ash::Shell::HasInstance()); |
+ if (ash::Shell::GetInstance()->GetAppListTargetVisibility()) |
+ ash::Shell::GetInstance()->ToggleAppList(); |
+} |