Chromium Code Reviews| Index: chrome/browser/ui/views/app_list/app_list_controller_win.cc |
| diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc |
| index b87598a59f0f3385e1f51f57b77864d1bb1baf7e..501ff25cab2b68685a2952470cf5844c1f9b4981 100644 |
| --- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc |
| +++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc |
| @@ -62,10 +62,6 @@ |
| #include "ui/views/widget/widget.h" |
| #include "win8/util/win8_util.h" |
| -#if defined(GOOGLE_CHROME_BUILD) |
| -#include "chrome/installer/util/install_util.h" |
| -#endif |
|
xiyuan
2013/08/01 20:47:28
Removed because it is already included around line
|
| - |
| #if defined(USE_AURA) |
| #include "ui/aura/root_window.h" |
| #include "ui/aura/window.h" |
| @@ -268,6 +264,7 @@ class AppListControllerDelegateWin : public AppListControllerDelegate { |
| virtual void LaunchApp(Profile* profile, |
| const extensions::Extension* extension, |
| int event_flags) OVERRIDE; |
| + virtual void ShowAppsGrid() OVERRIDE; |
| DISALLOW_COPY_AND_ASSIGN(AppListControllerDelegateWin); |
| }; |
| @@ -301,6 +298,7 @@ class AppListController : public AppListServiceImpl { |
| void AppListClosing(); |
| void AppListActivationChanged(bool active); |
| void ShowAppListDuringModeSwitch(Profile* requested_profile); |
| + void ShowAppsGrid(); |
| app_list::AppListView* GetView() { return current_view_; } |
| @@ -480,6 +478,10 @@ void AppListControllerDelegateWin::LaunchApp( |
| profile, extension, NEW_FOREGROUND_TAB)); |
| } |
| +void AppListControllerDelegateWin::ShowAppsGrid() { |
| + AppListController::GetInstance()->ShowAppsGrid(); |
| +} |
| + |
| AppListController::AppListController() |
| : current_view_(NULL), |
| view_delegate_(NULL), |
| @@ -554,6 +556,11 @@ void AppListController::ShowAppListDuringModeSwitch( |
| ShowForProfile(requested_profile); |
| } |
| +void AppListController::ShowAppsGrid() { |
| + DCHECK(current_view_); |
|
benwells
2013/08/01 22:53:12
Nit: it's not obvious why this assumption is valid
xiyuan
2013/08/01 23:18:28
Well, you have to create a view before you can cha
benwells
2013/08/02 04:26:41
No, DCHECK is right. Sorry I should have been more
|
| + current_view_->ShowAppsGrid(); |
| +} |
| + |
| void AppListController::PopulateViewFromProfile(Profile* requested_profile) { |
| #if !defined(USE_AURA) |
| if (requested_profile == profile()) |