| 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_SHELF_SHELF_DELEGATE_H_ | 5 #ifndef ASH_SHELF_SHELF_DELEGATE_H_ |
| 6 #define ASH_SHELF_SHELF_DELEGATE_H_ | 6 #define ASH_SHELF_SHELF_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_item_types.h" | 9 #include "ash/shelf/shelf_item_types.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // Callback used to inform the delegate that a specific shelf no longer | 24 // Callback used to inform the delegate that a specific shelf no longer |
| 25 // exists. | 25 // exists. |
| 26 virtual void OnShelfDestroyed(Shelf* shelf) = 0; | 26 virtual void OnShelfDestroyed(Shelf* shelf) = 0; |
| 27 | 27 |
| 28 // Called when |shelf|'s alignment changes. | 28 // Called when |shelf|'s alignment changes. |
| 29 virtual void OnShelfAlignmentChanged(Shelf* shelf) = 0; | 29 virtual void OnShelfAlignmentChanged(Shelf* shelf) = 0; |
| 30 | 30 |
| 31 // Called when |shelf|'s auto-hide behavior changes. | 31 // Called when |shelf|'s auto-hide behavior changes. |
| 32 virtual void OnShelfAutoHideBehaviorChanged(Shelf* shelf) = 0; | 32 virtual void OnShelfAutoHideBehaviorChanged(Shelf* shelf) = 0; |
| 33 | 33 |
| 34 // Called when |shelf|'s auto-hide state changes. |
| 35 virtual void OnShelfAutoHideStateChanged(Shelf* shelf) = 0; |
| 36 |
| 37 // Called when |shelf|'s visibility state is committed. |
| 38 virtual void OnShelfVisibilityStateChanged(Shelf* shelf) = 0; |
| 39 |
| 34 // Get the shelf ID from an application ID. | 40 // Get the shelf ID from an application ID. |
| 35 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0; | 41 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0; |
| 36 | 42 |
| 37 // Checks whether a mapping exists from the ShelfID |id| to an app id. | 43 // Checks whether a mapping exists from the ShelfID |id| to an app id. |
| 38 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0; | 44 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0; |
| 39 | 45 |
| 40 // Get the application ID for a given shelf ID. | 46 // Get the application ID for a given shelf ID. |
| 41 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the | 47 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the |
| 42 // ShelfID can be successfully mapped to an app id. | 48 // ShelfID can be successfully mapped to an app id. |
| 43 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0; | 49 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0; |
| 44 | 50 |
| 45 // Pins an app with |app_id| to shelf. A running instance will get pinned. | 51 // Pins an app with |app_id| to shelf. A running instance will get pinned. |
| 46 // In case there is no running instance a new shelf item is created and | 52 // In case there is no running instance a new shelf item is created and |
| 47 // pinned. | 53 // pinned. |
| 48 virtual void PinAppWithID(const std::string& app_id) = 0; | 54 virtual void PinAppWithID(const std::string& app_id) = 0; |
| 49 | 55 |
| 50 // Check if the app with |app_id_| is pinned to the shelf. | 56 // Check if the app with |app_id_| is pinned to the shelf. |
| 51 virtual bool IsAppPinned(const std::string& app_id) = 0; | 57 virtual bool IsAppPinned(const std::string& app_id) = 0; |
| 52 | 58 |
| 53 // Unpins app item with |app_id|. | 59 // Unpins app item with |app_id|. |
| 54 virtual void UnpinAppWithID(const std::string& app_id) = 0; | 60 virtual void UnpinAppWithID(const std::string& app_id) = 0; |
| 55 }; | 61 }; |
| 56 | 62 |
| 57 } // namespace ash | 63 } // namespace ash |
| 58 | 64 |
| 59 #endif // ASH_SHELF_SHELF_DELEGATE_H_ | 65 #endif // ASH_SHELF_SHELF_DELEGATE_H_ |
| OLD | NEW |