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_ASH_APP_LIST_APP_LIST_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 class Profile; | 10 class Profile; |
11 | 11 |
12 namespace extensions { | |
13 class Extension; | |
14 } | |
15 | |
16 // Interface to allow the view delegate to call out to whatever is controlling | 12 // Interface to allow the view delegate to call out to whatever is controlling |
17 // the app list. This will have different implementations for different | 13 // the app list. This will have different implementations for different |
18 // platforms. | 14 // platforms. |
19 class AppListController { | 15 class AppListController { |
20 public: | 16 public: |
21 virtual ~AppListController() {} | 17 virtual ~AppListController() {} |
22 | 18 |
23 // Handle the controller being closed. | 19 // Handle the controller being closed. |
24 virtual void CloseView() = 0; | 20 virtual void CloseView() = 0; |
25 | 21 |
26 // Control of pinning apps. | 22 // Control of pinning apps. |
27 virtual bool IsAppPinned(const std::string& extension_id) = 0; | 23 virtual bool IsAppPinned(const std::string& extension_id) = 0; |
28 virtual void PinApp(const std::string& extension_id) = 0; | 24 virtual void PinApp(const std::string& extension_id) = 0; |
29 virtual void UnpinApp(const std::string& extension_id) = 0; | 25 virtual void UnpinApp(const std::string& extension_id) = 0; |
30 virtual bool CanPin() = 0; | 26 virtual bool CanPin() = 0; |
31 | 27 |
32 // App has been clicked on in the app list. | 28 // App has been clicked on in the app list. |
33 virtual void ActivateApp(Profile* profile, | 29 virtual void ActivateApp(Profile* profile, |
34 const std::string& extension_id, | 30 const std::string& extension_id, |
35 int event_flags) = 0; | 31 int event_flags) = 0; |
36 // Open the app (e.g. from search results). | |
37 virtual void OpenApp(Profile* profile, | |
38 const std::string& extension_id, | |
39 int event_flags) = 0; | |
40 }; | 32 }; |
41 | 33 |
42 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_H_ | 34 #endif // CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_H_ |
OLD | NEW |