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

Unified Diff: ash/shell/shell_delegate_impl.cc

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 months 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 | « ash/shell/shell_delegate_impl.h ('k') | ash/shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/shell_delegate_impl.cc
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index 02c6a27a2d5d75ac1cc1d24515a34ecd9f4ad1d5..fb8f6050dbe470fe175a1e29960f2d9abf65a1c6 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -22,6 +22,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "components/user_manager/user_info_impl.h"
+#include "ui/app_list/app_list_view_delegate.h"
#include "ui/aura/window.h"
#include "ui/wm/core/input_method_event_filter.h"
@@ -212,8 +213,10 @@ content::BrowserContext* ShellDelegateImpl::GetActiveBrowserContext() {
return browser_context_;
}
-app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
- return ash::shell::CreateAppListViewDelegate();
+app_list::AppListViewDelegate* ShellDelegateImpl::GetAppListViewDelegate() {
+ if (!app_list_view_delegate_)
+ app_list_view_delegate_.reset(ash::shell::CreateAppListViewDelegate());
+ return app_list_view_delegate_.get();
}
ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) {
« no previous file with comments | « ash/shell/shell_delegate_impl.h ('k') | ash/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698