| 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 #include "ash/shelf/shelf_util.h" | 5 #include "ash/shelf/shelf_util.h" |
| 6 | 6 |
| 7 #include "ash/shelf/shelf_constants.h" | 7 #include "ash/shelf/shelf_constants.h" |
| 8 #include "ui/aura/window_property.h" | 8 #include "ui/aura/window_property.h" |
| 9 | 9 |
| 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfID); |
| 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfItemDetails*); | 11 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfItemDetails*); |
| 11 | 12 |
| 12 namespace ash { | 13 namespace ash { |
| 13 | 14 |
| 14 DEFINE_WINDOW_PROPERTY_KEY(ShelfID, kShelfID, kInvalidShelfID); | 15 DEFINE_WINDOW_PROPERTY_KEY(ShelfID, kShelfID, kInvalidShelfID); |
| 15 | 16 |
| 16 // ShelfItemDetails for kShelfItemDetaildKey is owned by the window | 17 // ShelfItemDetails for kShelfItemDetaildKey is owned by the window |
| 17 // and will be freed automatically. | 18 // and will be freed automatically. |
| 18 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ShelfItemDetails, | 19 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ShelfItemDetails, |
| 19 kShelfItemDetailsKey, | 20 kShelfItemDetailsKey, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 void ClearShelfItemDetailsForWindow(aura::Window* window) { | 53 void ClearShelfItemDetailsForWindow(aura::Window* window) { |
| 53 window->ClearProperty(kShelfItemDetailsKey); | 54 window->ClearProperty(kShelfItemDetailsKey); |
| 54 } | 55 } |
| 55 | 56 |
| 56 const ShelfItemDetails* GetShelfItemDetailsForWindow( | 57 const ShelfItemDetails* GetShelfItemDetailsForWindow( |
| 57 aura::Window* window) { | 58 aura::Window* window) { |
| 58 return window->GetProperty(kShelfItemDetailsKey); | 59 return window->GetProperty(kShelfItemDetailsKey); |
| 59 } | 60 } |
| 60 | 61 |
| 61 } // namespace ash | 62 } // namespace ash |
| OLD | NEW |