1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ATHENA_HOME_APP_LIST_VIEW_DELEGATE_H_
6 #define ATHENA_HOME_APP_LIST_VIEW_DELEGATE_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/app_list/app_list_view_delegate.h"
17 class AppModelBuilder
;
19 class AppListViewDelegate
: public app_list::AppListViewDelegate
{
21 explicit AppListViewDelegate(AppModelBuilder
* model_builder
);
22 virtual ~AppListViewDelegate();
24 void RegisterSearchProvider(app_list::SearchProvider
* search_provider
);
27 void SearchResultChanged();
29 // Overridden from app_list::AppListViewDelegate:
30 virtual bool ForceNativeDesktop() const OVERRIDE
;
31 virtual void SetProfileByPath(const base::FilePath
& profile_path
) OVERRIDE
;
32 virtual app_list::AppListModel
* GetModel() OVERRIDE
;
33 virtual app_list::SpeechUIModel
* GetSpeechUI() OVERRIDE
;
34 virtual void GetShortcutPathForApp(
35 const std::string
& app_id
,
36 const base::Callback
<void(const base::FilePath
&)>& callback
) OVERRIDE
;
37 virtual void StartSearch() OVERRIDE
;
38 virtual void StopSearch() OVERRIDE
;
39 virtual void OpenSearchResult(app_list::SearchResult
* result
,
41 int event_flags
) OVERRIDE
;
42 virtual void InvokeSearchResultAction(app_list::SearchResult
* result
,
44 int event_flags
) OVERRIDE
;
45 virtual base::TimeDelta
GetAutoLaunchTimeout() OVERRIDE
;
46 virtual void AutoLaunchCanceled() OVERRIDE
;
47 virtual void ViewInitialized() OVERRIDE
;
48 virtual void Dismiss() OVERRIDE
;
49 virtual void ViewClosing() OVERRIDE
;
50 virtual gfx::ImageSkia
GetWindowIcon() OVERRIDE
;
51 virtual void OpenSettings() OVERRIDE
;
52 virtual void OpenHelp() OVERRIDE
;
53 virtual void OpenFeedback() OVERRIDE
;
54 virtual void ToggleSpeechRecognition() OVERRIDE
;
55 virtual void ShowForProfileByPath(
56 const base::FilePath
& profile_path
) OVERRIDE
;
57 virtual views::View
* CreateStartPageWebView(const gfx::Size
& size
) OVERRIDE
;
58 virtual bool IsSpeechRecognitionEnabled() OVERRIDE
;
59 virtual const Users
& GetUsers() const OVERRIDE
;
60 virtual bool ShouldCenterWindow() const OVERRIDE
;
62 scoped_ptr
<app_list::AppListModel
> model_
;
63 scoped_ptr
<app_list::SpeechUIModel
> speech_ui_
;
66 std::vector
<app_list::SearchProvider
*> search_providers_
;
68 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate
);
73 #endif // ATHENA_HOME_APP_LIST_VIEW_DELEGATE_H_