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

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: nits addressed 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
« no previous file with comments | « chrome/browser/ui/app_list/chrome_app_list_item.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0c8fbd59d0d6011895de136dcc70359c913f744f..a2fb48032f4b40173f1ee0314950529b06f96134 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) {
@@ -43,6 +55,7 @@ void ChromeAppListItem::UpdateFromSync(
}
AppListControllerDelegate* ChromeAppListItem::GetController() {
- return AppListService::Get(chrome::GetActiveDesktop())->
- GetControllerDelegate();
+ return g_controller_for_test != nullptr ?
+ g_controller_for_test :
+ AppListService::Get(chrome::GetActiveDesktop())->GetControllerDelegate();
}
« no previous file with comments | « chrome/browser/ui/app_list/chrome_app_list_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698