Chromium Code Reviews| 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_UTIL_H_ | 5 #ifndef ASH_SHELF_SHELF_UTIL_H_ |
| 6 #define ASH_SHELF_SHELF_UTIL_H_ | 6 #define ASH_SHELF_SHELF_UTIL_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 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 // Associates ShelfItem of |id| with specified |window|. | 26 // Associates ShelfItem of |id| with specified |window|. |
| 27 ASH_EXPORT void SetShelfIDForWindow(ShelfID id, aura::Window* window); | 27 ASH_EXPORT void SetShelfIDForWindow(ShelfID id, aura::Window* window); |
| 28 | 28 |
| 29 // Returns the id of the ShelfItem associated with the specified |window|, | 29 // Returns the id of the ShelfItem associated with the specified |window|, |
| 30 // or 0 if there isn't one. | 30 // or 0 if there isn't one. |
| 31 // Note: Window of a tabbed browser will return the |ShelfID| of the | 31 // Note: Window of a tabbed browser will return the |ShelfID| of the |
| 32 // currently active tab. | 32 // currently active tab. |
| 33 ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window); | 33 ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window); |
| 34 | 34 |
| 35 // Sets ShelfItemDetails for |window|. | 35 // Constructs a new ShelfItemDetails instance from |details| and sets it for |
|
Mr4D (OOO till 08-26)
2014/06/17 16:01:10
Maybe "Create a new .." ? "Construct" sounds funny
stevenjb
2014/06/18 19:54:47
Done.
| |
| 36 // |window|. | |
| 36 ASH_EXPORT void SetShelfItemDetailsForWindow(aura::Window* window, | 37 ASH_EXPORT void SetShelfItemDetailsForWindow(aura::Window* window, |
| 37 const ShelfItemDetails& details); | 38 const ShelfItemDetails& details); |
| 38 | 39 |
| 40 // Constructs a new ShelfItemDetails instance with type DIALOG and image id | |
| 41 // |image_resource_id| and sets it for |window|. | |
| 42 ASH_EXPORT void SetShelfItemDetailsForDialogWindow(aura::Window* window, | |
| 43 int image_resource_id); | |
| 44 | |
| 39 // Clears ShelfItemDetails for |window|. | 45 // Clears ShelfItemDetails for |window|. |
| 40 // If |window| has a ShelfItem by SetShelfItemDetailsForWindow(), it will | 46 // If |window| has a ShelfItem by SetShelfItemDetailsForWindow(), it will |
| 41 // be removed. | 47 // be removed. |
| 42 ASH_EXPORT void ClearShelfItemDetailsForWindow(aura::Window* window); | 48 ASH_EXPORT void ClearShelfItemDetailsForWindow(aura::Window* window); |
| 43 | 49 |
| 44 // Returns ShelfItemDetails for |window| or NULL if it doesn't have. | 50 // Returns ShelfItemDetails for |window| or NULL if it doesn't have. |
| 45 // Returned ShelfItemDetails object is owned by the |window|. | 51 // Returned ShelfItemDetails object is owned by the |window|. |
| 46 ASH_EXPORT const ShelfItemDetails* GetShelfItemDetailsForWindow( | 52 ASH_EXPORT const ShelfItemDetails* GetShelfItemDetailsForWindow( |
| 47 aura::Window* window); | 53 aura::Window* window); |
| 48 | 54 |
| 49 } // namespace ash | 55 } // namespace ash |
| 50 | 56 |
| 51 #endif // ASH_SHELF_SHELF_UTIL_H_ | 57 #endif // ASH_SHELF_SHELF_UTIL_H_ |
| OLD | NEW |