| 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/common/shelf/shelf_item_types.h" |   9 #include "ash/common/shelf/shelf_item_types.h" | 
|  10 #include "ash/common/shelf/shelf_types.h" |  10 #include "ash/common/shelf/shelf_types.h" | 
|  11 #include "base/strings/string16.h" |  11 #include "base/strings/string16.h" | 
|  12 #include "ui/aura/window.h" |  12 #include "ui/aura/window.h" | 
|  13  |  13  | 
|  14 namespace aura { |  14 namespace aura { | 
|  15 class Window; |  15 class Window; | 
|  16 } |  16 } | 
|  17  |  17  | 
|  18 namespace ash { |  18 namespace ash { | 
|  19  |  19  | 
|  20 // A property key to store the id of the ShelfItem associated with the window. |  20 // A property key to store the id of the ShelfItem associated with the window. | 
|  21 extern const aura::WindowProperty<ShelfID>* const kShelfID; |  21 extern const aura::WindowProperty<ShelfID>* const kShelfID; | 
|  22  |  22  | 
|  23 // A property key to store the resource id and title of the item shown on the |  23 // A property key to store the resource id and title of the item shown on the | 
|  24 // shelf for this window. |  24 // shelf for this window. | 
|  25 extern const aura::WindowProperty<ShelfItemDetails*>* const |  25 extern const aura::WindowProperty<ShelfItemDetails*>* const | 
|  26     kShelfItemDetailsKey; |  26     kShelfItemDetailsKey; | 
|  27  |  27  | 
 |  28 // A property key to indicate that the item should should be shown on tray | 
 |  29 // instead of shelf, which is only used for IME menu. | 
 |  30 ASH_EXPORT extern const aura::WindowProperty<bool>* const | 
 |  31     kShelfItemOnTrayForImeMenu; | 
 |  32  | 
|  28 // Associates ShelfItem of |id| with specified |window|. |  33 // Associates ShelfItem of |id| with specified |window|. | 
|  29 ASH_EXPORT void SetShelfIDForWindow(ShelfID id, aura::Window* window); |  34 ASH_EXPORT void SetShelfIDForWindow(ShelfID id, aura::Window* window); | 
|  30  |  35  | 
|  31 // Returns the id of the ShelfItem associated with the specified |window|, |  36 // Returns the id of the ShelfItem associated with the specified |window|, | 
|  32 // or 0 if there isn't one. |  37 // or 0 if there isn't one. | 
|  33 // Note: Window of a tabbed browser will return the |ShelfID| of the |  38 // Note: Window of a tabbed browser will return the |ShelfID| of the | 
|  34 // currently active tab. |  39 // currently active tab. | 
|  35 ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window); |  40 ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window); | 
|  36  |  41  | 
|  37 // Creates a new ShelfItemDetails instance from |details| and sets it for |  42 // Creates a new ShelfItemDetails instance from |details| and sets it for | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
|  51 ASH_EXPORT void ClearShelfItemDetailsForWindow(aura::Window* window); |  56 ASH_EXPORT void ClearShelfItemDetailsForWindow(aura::Window* window); | 
|  52  |  57  | 
|  53 // Returns ShelfItemDetails for |window| or NULL if it doesn't have. |  58 // Returns ShelfItemDetails for |window| or NULL if it doesn't have. | 
|  54 // Returned ShelfItemDetails object is owned by the |window|. |  59 // Returned ShelfItemDetails object is owned by the |window|. | 
|  55 ASH_EXPORT const ShelfItemDetails* GetShelfItemDetailsForWindow( |  60 ASH_EXPORT const ShelfItemDetails* GetShelfItemDetailsForWindow( | 
|  56     aura::Window* window); |  61     aura::Window* window); | 
|  57  |  62  | 
|  58 }  // namespace ash |  63 }  // namespace ash | 
|  59  |  64  | 
|  60 #endif  // ASH_SHELF_SHELF_UTIL_H_ |  65 #endif  // ASH_SHELF_SHELF_UTIL_H_ | 
| OLD | NEW |