Index: chrome/browser/ui/views/theme_profile_key.cc |
diff --git a/chrome/browser/ui/views/theme_profile_key.cc b/chrome/browser/ui/views/theme_profile_key.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e35d3da2fc91da8e17ee36c59b0b49ff199553d1 |
--- /dev/null |
+++ b/chrome/browser/ui/views/theme_profile_key.cc |
@@ -0,0 +1,24 @@ |
+// Copyright 2017 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 "chrome/browser/ui/views/theme_profile_key.h" |
+ |
+#include "ui/aura/window.h" |
+#include "ui/base/class_property.h" |
+ |
+DECLARE_UI_CLASS_PROPERTY_TYPE(Profile*); |
+ |
+namespace { |
+ |
+DEFINE_UI_CLASS_PROPERTY_KEY(Profile*, kThemeProfileKey, nullptr); |
+ |
+} // anonymous namespace |
+ |
+void SetThemeProfileForWindow(aura::Window* window, Profile* profile) { |
+ window->SetProperty(kThemeProfileKey, profile); |
+} |
+ |
+Profile* GetThemeProfileForWindow(aura::Window* window) { |
+ return window->GetProperty(kThemeProfileKey); |
+} |