| Index: ui/app_list/cocoa/apps_grid_view_item.mm
|
| diff --git a/ui/app_list/cocoa/apps_grid_view_item.mm b/ui/app_list/cocoa/apps_grid_view_item.mm
|
| index 92e5d1b77ea0fcb1f3aad2d7bcc53d4e0a33084d..dd6757977175d4da299ec5de6211069994c5fd2a 100644
|
| --- a/ui/app_list/cocoa/apps_grid_view_item.mm
|
| +++ b/ui/app_list/cocoa/apps_grid_view_item.mm
|
| @@ -13,6 +13,7 @@
|
| #include "ui/app_list/app_list_item.h"
|
| #include "ui/app_list/app_list_item_observer.h"
|
| #import "ui/app_list/cocoa/apps_grid_controller.h"
|
| +#import "ui/app_list/cocoa/apps_pagination_model_observer.h"
|
| #import "ui/base/cocoa/menu_controller.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/font.h"
|
| @@ -53,7 +54,7 @@ const int kMacFontSizeDelta = -1;
|
| // Ensure the page this item is on is the visible page in the grid.
|
| - (void)ensureVisible;
|
|
|
| -// Add or remove a progress bar from the view.
|
| +// Adds a progress bar to the view if |isInstalling|, otherwise removes it.
|
| - (void)setItemIsInstalling:(BOOL)isInstalling;
|
|
|
| // Update the progress bar to represent |percent|, or make it indeterminate if
|
| @@ -388,6 +389,11 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
|
| base::mac::ObjCCastStrict<AppsGridController>([collectionView delegate]);
|
| size_t pageIndex = [gridController pageIndexForCollectionView:collectionView];
|
| [gridController scrollToPage:pageIndex];
|
| +
|
| + // If the item just completed a user-initiated install, additionally clear
|
| + // search results to reveal the item in the grid.
|
| + if ([self model]->percent_downloaded() == -1)
|
| + [[gridController paginationObserver] ensureAppsPagesVisible];
|
| }
|
|
|
| - (void)setItemIsInstalling:(BOOL)isInstalling {
|
|
|