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

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

Issue 97983003: Start the move of launcher_types.h to shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: the rename Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_view.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 "ui/aura/window_property.h" 8 #include "ui/aura/window_property.h"
8 9
9 DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherID); 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherID);
10 DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherItemDetails*); 11 DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherItemDetails*);
11 12
12 namespace ash { 13 namespace ash {
13 14
14 DEFINE_LOCAL_WINDOW_PROPERTY_KEY(LauncherID, kLauncherID, kInvalidLauncherID); 15 DEFINE_LOCAL_WINDOW_PROPERTY_KEY(LauncherID, kLauncherID, kInvalidShelfID);
15 16
16 // ash::LauncherItemDetails for kLauncherItemDetaildKey is owned by the window 17 // ash::LauncherItemDetails for kLauncherItemDetaildKey is owned by the window
17 // and will be freed automatically. 18 // and will be freed automatically.
18 DEFINE_OWNED_WINDOW_PROPERTY_KEY(LauncherItemDetails, 19 DEFINE_OWNED_WINDOW_PROPERTY_KEY(LauncherItemDetails,
19 kLauncherItemDetailsKey, 20 kLauncherItemDetailsKey,
20 NULL); 21 NULL);
21 22
22 void SetLauncherIDForWindow(LauncherID id, aura::Window* window) { 23 void SetLauncherIDForWindow(LauncherID id, aura::Window* window) {
23 if (!window) 24 if (!window)
24 return; 25 return;
(...skipping 16 matching lines...) Expand all
41 void ClearShelfItemDetailsForWindow(aura::Window* window) { 42 void ClearShelfItemDetailsForWindow(aura::Window* window) {
42 window->ClearProperty(kLauncherItemDetailsKey); 43 window->ClearProperty(kLauncherItemDetailsKey);
43 } 44 }
44 45
45 const LauncherItemDetails* GetLauncherItemDetailsForWindow( 46 const LauncherItemDetails* GetLauncherItemDetailsForWindow(
46 aura::Window* window) { 47 aura::Window* window) {
47 return window->GetProperty(kLauncherItemDetailsKey); 48 return window->GetProperty(kLauncherItemDetailsKey);
48 } 49 }
49 50
50 } // namespace ash 51 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698