Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: chrome/browser/ui/app_list/chrome_app_list_item.cc

Issue 1483593002: arc: Hide app list view on ARC app launch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b2_app_list
Patch Set: Rebased Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/chrome_app_list_item.cc
diff --git a/chrome/browser/ui/app_list/chrome_app_list_item.cc b/chrome/browser/ui/app_list/chrome_app_list_item.cc
index 24ca68d674c4793b73137a6363e6fbc3398fc5ae..aa892ab4561bd77907a1d89f68070739045194ef 100644
--- a/chrome/browser/ui/app_list/chrome_app_list_item.cc
+++ b/chrome/browser/ui/app_list/chrome_app_list_item.cc
@@ -12,6 +12,18 @@
#include "ui/gfx/color_utils.h"
#include "ui/gfx/image/image_skia_operations.h"
+namespace {
+
+AppListControllerDelegate* g_controller_for_test = nullptr;
+
+} // namespace
+
+// static
+void ChromeAppListItem::OverrideAppListControllerDelegateForTesting(
+ AppListControllerDelegate* controller) {
+ g_controller_for_test = controller;
+}
+
// static
gfx::ImageSkia ChromeAppListItem::CreateDisabledIcon(
const gfx::ImageSkia& icon) {
@@ -56,6 +68,7 @@ void ChromeAppListItem::UpdatePositionFromOrdering() {
}
AppListControllerDelegate* ChromeAppListItem::GetController() {
- return AppListService::Get(chrome::GetActiveDesktop())->
- GetControllerDelegate();
+ return g_controller_for_test != nullptr ?
+ g_controller_for_test :
+ AppListService::Get(chrome::GetActiveDesktop())->GetControllerDelegate();
}

Powered by Google App Engine
This is Rietveld 408576698