OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 "chrome/browser/ui/views/theme_profile_key.h" |
| 6 |
| 7 #include "ui/aura/window.h" |
| 8 #include "ui/base/class_property.h" |
| 9 |
| 10 DECLARE_UI_CLASS_PROPERTY_TYPE(Profile*); |
| 11 |
| 12 namespace { |
| 13 |
| 14 DEFINE_UI_CLASS_PROPERTY_KEY(Profile*, kThemeProfileKey, nullptr); |
| 15 |
| 16 } // anonymous namespace |
| 17 |
| 18 void SetThemeProfileForWindow(aura::Window* window, Profile* profile) { |
| 19 window->SetProperty(kThemeProfileKey, profile); |
| 20 } |
| 21 |
| 22 Profile* GetThemeProfileForWindow(aura::Window* window) { |
| 23 return window->GetProperty(kThemeProfileKey); |
| 24 } |
OLD | NEW |