OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_COMMON_SHELF_SHELF_DELEGATE_H_ | 5 #ifndef ASH_COMMON_SHELF_SHELF_DELEGATE_H_ |
6 #define ASH_COMMON_SHELF_SHELF_DELEGATE_H_ | 6 #define ASH_COMMON_SHELF_SHELF_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 // Called when |shelf|'s auto-hide state changes. | 36 // Called when |shelf|'s auto-hide state changes. |
37 virtual void OnShelfAutoHideStateChanged(WmShelf* shelf) = 0; | 37 virtual void OnShelfAutoHideStateChanged(WmShelf* shelf) = 0; |
38 | 38 |
39 // Called when |shelf|'s visibility state is committed. | 39 // Called when |shelf|'s visibility state is committed. |
40 virtual void OnShelfVisibilityStateChanged(WmShelf* shelf) = 0; | 40 virtual void OnShelfVisibilityStateChanged(WmShelf* shelf) = 0; |
41 | 41 |
42 // Get the shelf ID from an application ID. | 42 // Get the shelf ID from an application ID. |
43 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0; | 43 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0; |
44 | 44 |
45 // Get the shelf ID from an application ID and a launch ID. | |
46 virtual ShelfID GetShelfIDForAppIDAndLaunchID( | |
47 const std::string& app_id, | |
48 const std::string& launch_id) = 0; | |
James Cook
2016/09/01 04:27:51
|launch_id| needs to be documented at this level a
Andra Paraschiv
2016/09/01 08:27:25
Added the comment for launch_id.
| |
49 | |
45 // Checks whether a mapping exists from the ShelfID |id| to an app id. | 50 // Checks whether a mapping exists from the ShelfID |id| to an app id. |
46 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0; | 51 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0; |
47 | 52 |
48 // Get the application ID for a given shelf ID. | 53 // Get the application ID for a given shelf ID. |
49 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the | 54 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the |
50 // ShelfID can be successfully mapped to an app id. | 55 // ShelfID can be successfully mapped to an app id. |
51 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0; | 56 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0; |
52 | 57 |
53 // Pins an app with |app_id| to shelf. A running instance will get pinned. | 58 // Pins an app with |app_id| to shelf. A running instance will get pinned. |
54 // In case there is no running instance a new shelf item is created and | 59 // In case there is no running instance a new shelf item is created and |
55 // pinned. | 60 // pinned. |
56 virtual void PinAppWithID(const std::string& app_id) = 0; | 61 virtual void PinAppWithID(const std::string& app_id) = 0; |
57 | 62 |
58 // Check if the app with |app_id_| is pinned to the shelf. | 63 // Check if the app with |app_id_| is pinned to the shelf. |
59 virtual bool IsAppPinned(const std::string& app_id) = 0; | 64 virtual bool IsAppPinned(const std::string& app_id) = 0; |
60 | 65 |
61 // Unpins app item with |app_id|. | 66 // Unpins app item with |app_id|. |
62 virtual void UnpinAppWithID(const std::string& app_id) = 0; | 67 virtual void UnpinAppWithID(const std::string& app_id) = 0; |
63 }; | 68 }; |
64 | 69 |
65 } // namespace ash | 70 } // namespace ash |
66 | 71 |
67 #endif // ASH_COMMON_SHELF_SHELF_DELEGATE_H_ | 72 #endif // ASH_COMMON_SHELF_SHELF_DELEGATE_H_ |
OLD | NEW |