| Index: ash/shell/shell_delegate_impl.cc
|
| diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
|
| index 6fd7660fb96ff41af4fcde704d7562eadb02421a..6d7af0dde472b1d792985a74204572f93aea40ad 100644
|
| --- a/ash/shell/shell_delegate_impl.cc
|
| +++ b/ash/shell/shell_delegate_impl.cc
|
| @@ -18,11 +18,14 @@
|
| #include "ash/shell_window_ids.h"
|
| #include "ash/system/tray/default_system_tray_delegate.h"
|
| #include "ash/test/test_keyboard_ui.h"
|
| +#include "ash/wm/app_list_shower_delegate_factory.h"
|
| +#include "ash/wm/app_list_view_delegate_factory.h"
|
| #include "ash/wm/window_state.h"
|
| #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/app_list/shower/app_list_shower_impl.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/gfx/image/image.h"
|
| #include "ui/gfx/image/image_skia.h"
|
| @@ -134,9 +137,30 @@ class SessionStateDelegateImpl : public SessionStateDelegate {
|
| DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateImpl);
|
| };
|
|
|
| +class AppListViewDelegateFactoryImpl : public ash::AppListViewDelegateFactory {
|
| + public:
|
| + AppListViewDelegateFactoryImpl() {}
|
| + ~AppListViewDelegateFactoryImpl() override {}
|
| +
|
| + // app_list::AppListViewDelegateFactory:
|
| + app_list::AppListViewDelegate* GetDelegate() override {
|
| + if (!app_list_view_delegate_.get())
|
| + app_list_view_delegate_.reset(CreateAppListViewDelegate());
|
| + return app_list_view_delegate_.get();
|
| + }
|
| +
|
| + private:
|
| + scoped_ptr<app_list::AppListViewDelegate> app_list_view_delegate_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl);
|
| +};
|
| +
|
| } // namespace
|
|
|
| -ShellDelegateImpl::ShellDelegateImpl() : shelf_delegate_(nullptr) {}
|
| +ShellDelegateImpl::ShellDelegateImpl()
|
| + : shelf_delegate_(nullptr),
|
| + app_list_shower_delegate_factory_(new AppListShowerDelegateFactory(
|
| + make_scoped_ptr(new AppListViewDelegateFactoryImpl))) {}
|
|
|
| ShellDelegateImpl::~ShellDelegateImpl() {}
|
|
|
| @@ -191,10 +215,12 @@ void ShellDelegateImpl::RemoveVirtualKeyboardStateObserver(
|
|
|
| void ShellDelegateImpl::OpenUrl(const GURL& url) {}
|
|
|
| -app_list::AppListViewDelegate* ShellDelegateImpl::GetAppListViewDelegate() {
|
| - if (!app_list_view_delegate_)
|
| - app_list_view_delegate_.reset(ash::shell::CreateAppListViewDelegate());
|
| - return app_list_view_delegate_.get();
|
| +app_list::AppListShower* ShellDelegateImpl::GetAppListShower() {
|
| + if (!app_list_shower_) {
|
| + app_list_shower_.reset(new app_list::AppListShowerImpl(
|
| + app_list_shower_delegate_factory_.get()));
|
| + }
|
| + return app_list_shower_.get();
|
| }
|
|
|
| ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) {
|
|
|