Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: ash/shelf/shelf_util.cc

Issue 801953002: Use template specialization to generate WindowProperty code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use namespace Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/touch/touch_uma.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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);
11 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfItemDetails*); 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfItemDetails*);
12 11
13 namespace ash { 12 namespace ash {
14 13
15 DEFINE_WINDOW_PROPERTY_KEY(ShelfID, kShelfID, kInvalidShelfID); 14 DEFINE_WINDOW_PROPERTY_KEY(ShelfID, kShelfID, kInvalidShelfID);
16 15
17 // ShelfItemDetails for kShelfItemDetaildKey is owned by the window 16 // ShelfItemDetails for kShelfItemDetaildKey is owned by the window
18 // and will be freed automatically. 17 // and will be freed automatically.
19 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ShelfItemDetails, 18 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ShelfItemDetails,
20 kShelfItemDetailsKey, 19 kShelfItemDetailsKey,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void ClearShelfItemDetailsForWindow(aura::Window* window) { 52 void ClearShelfItemDetailsForWindow(aura::Window* window) {
54 window->ClearProperty(kShelfItemDetailsKey); 53 window->ClearProperty(kShelfItemDetailsKey);
55 } 54 }
56 55
57 const ShelfItemDetails* GetShelfItemDetailsForWindow( 56 const ShelfItemDetails* GetShelfItemDetailsForWindow(
58 aura::Window* window) { 57 aura::Window* window) {
59 return window->GetProperty(kShelfItemDetailsKey); 58 return window->GetProperty(kShelfItemDetailsKey);
60 } 59 }
61 60
62 } // namespace ash 61 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/touch/touch_uma.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698