blob: 752eb782568d748b95846803da88956fcd2f75ef [file] [log] [blame]
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +01001// 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.
4
5#ifndef ATHENA_HOME_APP_LIST_VIEW_DELEGATE_H_
6#define ATHENA_HOME_APP_LIST_VIEW_DELEGATE_H_
7
8#include "base/macros.h"
9#include "base/memory/scoped_ptr.h"
10#include "ui/app_list/app_list_view_delegate.h"
11
Torne (Richard Coles)f8ee7882014-06-20 14:52:04 +010012namespace app_list {
13class SearchProvider;
14}
15
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010016namespace athena {
Torne (Richard Coles)f8ee7882014-06-20 14:52:04 +010017class AppModelBuilder;
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010018
19class AppListViewDelegate : public app_list::AppListViewDelegate {
20 public:
Torne (Richard Coles)f8ee7882014-06-20 14:52:04 +010021 explicit AppListViewDelegate(AppModelBuilder* model_builder);
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010022 virtual ~AppListViewDelegate();
23
Torne (Richard Coles)f8ee7882014-06-20 14:52:04 +010024 void RegisterSearchProvider(app_list::SearchProvider* search_provider);
25
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010026 private:
Torne (Richard Coles)f8ee7882014-06-20 14:52:04 +010027 void SearchResultChanged();
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010028
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,
40 bool auto_launch,
41 int event_flags) OVERRIDE;
42 virtual void InvokeSearchResultAction(app_list::SearchResult* result,
43 int action_index,
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;
61
62 scoped_ptr<app_list::AppListModel> model_;
63 scoped_ptr<app_list::SpeechUIModel> speech_ui_;
64 Users users_;
65
Torne (Richard Coles)f8ee7882014-06-20 14:52:04 +010066 std::vector<app_list::SearchProvider*> search_providers_;
67
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010068 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
69};
70
71} // namespace athena
72
73#endif // ATHENA_HOME_APP_LIST_VIEW_DELEGATE_H_