shelf_util.cc revision f2477e01787aa58f445919b809d89e252beef54f
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
3// found in the LICENSE file.
4
5#include "ash/shelf/shelf_util.h"
6
7#include "ui/aura/window.h"
8#include "ui/aura/window_property.h"
9
10DECLARE_WINDOW_PROPERTY_TYPE(ash::LauncherID);
11
12namespace ash {
13
14DEFINE_LOCAL_WINDOW_PROPERTY_KEY(LauncherID, kLauncherID, 0);
15
16void SetLauncherIDForWindow(LauncherID id, aura::Window* window) {
17  if (!window)
18    return;
19
20  window->SetProperty(kLauncherID, id);
21}
22
23LauncherID GetLauncherIDForWindow(aura::Window* window) {
24  DCHECK(window);
25  return window->GetProperty(kLauncherID);
26}
27
28}  // namespace ash
29