OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_ | 5 #ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_ |
6 #define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_ | 6 #define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ui/app_list/presenter/app_list_presenter_export.h" | 10 #include "ui/app_list/presenter/app_list_presenter_export.h" |
| 11 #include "ui/display/types/display_constants.h" |
11 | 12 |
12 namespace app_list { | 13 namespace app_list { |
13 | 14 |
14 // Interface for showing and hiding the app list. | 15 // Interface for showing and hiding the app list. |
15 class APP_LIST_PRESENTER_EXPORT AppListPresenter { | 16 class APP_LIST_PRESENTER_EXPORT AppListPresenter { |
16 public: | 17 public: |
17 virtual ~AppListPresenter() {} | 18 virtual ~AppListPresenter() {} |
18 | 19 |
19 // Show/hide app list window. The |window| is used to deterime in | 20 // Show/hide app list window. The |window| is used to deterime in |
20 // which display (in which the |window| exists) the app list should | 21 // which display (in which the |window| exists) the app list should |
21 // be shown. | 22 // be shown. |
22 virtual void Show(int64_t display_id) = 0; | 23 virtual void Show(int64_t display_id) = 0; |
23 | 24 |
24 // Invoked to dismiss app list. This may leave the view open but hidden from | 25 // Invoked to dismiss app list. This may leave the view open but hidden from |
25 // the user. | 26 // the user. |
26 virtual void Dismiss() = 0; | 27 virtual void Dismiss() = 0; |
27 | 28 |
28 // Show the app list if it is visible, hide it if it is hidden. | 29 // Show the app list if it is visible, hide it if it is hidden. |
29 virtual void ToggleAppList(int64_t display_id) = 0; | 30 virtual void ToggleAppList(int64_t display_id) = 0; |
30 | 31 |
31 // Returns current visibility of the app list. | 32 // Returns current visibility of the app list. |
32 virtual bool IsVisible() const = 0; | 33 // Pass a valid display id to check visibility for a specific display. |
| 34 virtual bool IsVisible( |
| 35 int64_t display_id = display::kInvalidDisplayId) const = 0; |
33 | 36 |
34 // Returns target visibility. This may differ from IsVisible() if a | 37 // Returns target visibility. This may differ from IsVisible() if a |
35 // visibility transition is in progress. | 38 // visibility transition is in progress. |
36 virtual bool GetTargetVisibility() const = 0; | 39 // Pass a valid display id to check target visibility for a specific display. |
| 40 virtual bool GetTargetVisibility( |
| 41 int64_t display_id = display::kInvalidDisplayId) const = 0; |
37 }; | 42 }; |
38 | 43 |
39 } // namespace app_list | 44 } // namespace app_list |
40 | 45 |
41 #endif // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_ | 46 #endif // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_H_ |
OLD | NEW |