OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "ui/app_list/app_list_view_delegate.h" | 14 #include "ui/app_list/app_list_view_delegate.h" |
14 | 15 |
15 class AppListControllerDelegate; | 16 class AppListControllerDelegate; |
16 class AppsModelBuilder; | 17 class AppsModelBuilder; |
17 class Profile; | 18 class Profile; |
18 | 19 |
19 namespace app_list { | 20 namespace app_list { |
20 class SearchController; | 21 class SearchController; |
21 } | 22 } |
22 | 23 |
| 24 namespace base { |
| 25 class FilePath; |
| 26 } |
| 27 |
23 namespace gfx { | 28 namespace gfx { |
24 class ImageSkia; | 29 class ImageSkia; |
25 } | 30 } |
26 | 31 |
27 #if defined(USE_ASH) | 32 #if defined(USE_ASH) |
28 class AppSyncUIStateWatcher; | 33 class AppSyncUIStateWatcher; |
29 #endif | 34 #endif |
30 | 35 |
31 class AppListViewDelegate : public app_list::AppListViewDelegate { | 36 class AppListViewDelegate : public app_list::AppListViewDelegate { |
32 public: | 37 public: |
33 // The delegate will take ownership of the controller. | 38 // The delegate will take ownership of the controller. |
34 AppListViewDelegate(AppListControllerDelegate* controller, Profile* profile); | 39 AppListViewDelegate(AppListControllerDelegate* controller, Profile* profile); |
35 virtual ~AppListViewDelegate(); | 40 virtual ~AppListViewDelegate(); |
36 | 41 |
37 private: | 42 private: |
38 // Overridden from app_list::AppListViewDelegate: | 43 // Overridden from app_list::AppListViewDelegate: |
39 virtual void SetModel(app_list::AppListModel* model) OVERRIDE; | 44 virtual void SetModel(app_list::AppListModel* model) OVERRIDE; |
40 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE; | 45 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE; |
| 46 virtual void GetShortcutPathForApp( |
| 47 const std::string& app_id, |
| 48 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE; |
41 virtual void ActivateAppListItem(app_list::AppListItemModel* item, | 49 virtual void ActivateAppListItem(app_list::AppListItemModel* item, |
42 int event_flags) OVERRIDE; | 50 int event_flags) OVERRIDE; |
43 virtual void StartSearch() OVERRIDE; | 51 virtual void StartSearch() OVERRIDE; |
44 virtual void StopSearch() OVERRIDE; | 52 virtual void StopSearch() OVERRIDE; |
45 virtual void OpenSearchResult(app_list::SearchResult* result, | 53 virtual void OpenSearchResult(app_list::SearchResult* result, |
46 int event_flags) OVERRIDE; | 54 int event_flags) OVERRIDE; |
47 virtual void InvokeSearchResultAction(app_list::SearchResult* result, | 55 virtual void InvokeSearchResultAction(app_list::SearchResult* result, |
48 int action_index, | 56 int action_index, |
49 int event_flags) OVERRIDE; | 57 int event_flags) OVERRIDE; |
50 virtual void Dismiss() OVERRIDE; | 58 virtual void Dismiss() OVERRIDE; |
(...skipping 13 matching lines...) Expand all Loading... |
64 Profile* profile_; | 72 Profile* profile_; |
65 | 73 |
66 #if defined(USE_ASH) | 74 #if defined(USE_ASH) |
67 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; | 75 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; |
68 #endif | 76 #endif |
69 | 77 |
70 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); | 78 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); |
71 }; | 79 }; |
72 | 80 |
73 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 81 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |