Chromium Code Reviews| Index: ash/root_window_property.cc |
| diff --git a/ash/root_window_property.cc b/ash/root_window_property.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..16e387fbfec2666be67f4756f6c6f74de637c93d |
| --- /dev/null |
| +++ b/ash/root_window_property.cc |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ash/root_window_property.h" |
| + |
| +#include "ui/aura/root_window.h" |
| +#include "ui/aura/window_property.h" |
| +#include "ui/gfx/display.h" |
| + |
| +DECLARE_WINDOW_PROPERTY_TYPE(ash::internal::RootWindowProperty*); |
| + |
| +namespace ash { |
| +namespace internal { |
| + |
| +DEFINE_OWNED_WINDOW_PROPERTY_KEY(RootWindowProperty, |
| + kRootWindowPropertyKey, NULL); |
| + |
| +RootWindowProperty::RootWindowProperty() |
| + : solo_window_header(false), |
| + display_id(gfx::Display::kInvalidDisplayID) { |
|
James Cook
2013/08/30 00:06:36
Initialize controller to NULL?
oshima
2013/08/30 05:38:33
Done.
|
| +} |
| + |
| + |
| +RootWindowProperty* GetRootWindowProperty(aura::RootWindow* root) { |
| + RootWindowProperty* property = root->GetProperty(kRootWindowPropertyKey); |
| + if (!property) { |
| + property = new RootWindowProperty(); |
| + root->SetProperty(kRootWindowPropertyKey, property); |
| + } |
| + return property; |
| +} |
| + |
| +const RootWindowProperty* GetRootWindowProperty(const aura::RootWindow* root) { |
| + return root->GetProperty(kRootWindowPropertyKey); |
| +} |
| + |
| +} // namespace internal |
| +} // namespace ash |