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

Unified Diff: chrome/browser/ui/views/theme_profile_key.cc

Issue 2697513008: Linux Aura: Use Aura theme on all windows when 'Use Classic theme' is used (Closed)
Patch Set: Add new files Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
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..36f26bf1c64a6334ef8a225dfac4a820efabc75f
--- /dev/null
+++ b/chrome/browser/ui/views/theme_profile_key.cc
@@ -0,0 +1,28 @@
+// 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
+
+namespace ThemeProfileKey {
+
+void SetThemeProfileForWindow(aura::Window* window, Profile* profile) {
+ window->SetProperty(kThemeProfileKey, profile);
+}
+
+Profile* GetThemeProfileForWindow(aura::Window* window) {
+ return window->GetProperty(kThemeProfileKey);
+}
+
+} // namespace ThemeProfileKey

Powered by Google App Engine
This is Rietveld 408576698