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

Unified Diff: ash/root_window_settings.cc

Issue 23496024: Introduce RootWindowProperty for RootWindow's properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Created 7 years, 4 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
« no previous file with comments | « ash/root_window_settings.h ('k') | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_settings.cc
diff --git a/ash/root_window_settings.cc b/ash/root_window_settings.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a5e396898446738ae141cacd575481ea99b55caa
--- /dev/null
+++ b/ash/root_window_settings.cc
@@ -0,0 +1,40 @@
+// 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_settings.h"
+
+#include "ui/aura/root_window.h"
+#include "ui/aura/window_property.h"
+#include "ui/gfx/display.h"
+
+DECLARE_WINDOW_PROPERTY_TYPE(ash::internal::RootWindowSettings*);
+
+namespace ash {
+namespace internal {
+
+DEFINE_OWNED_WINDOW_PROPERTY_KEY(RootWindowSettings,
+ kRootWindowSettingsKey, NULL);
+
+RootWindowSettings::RootWindowSettings()
+ : solo_window_header(false),
+ display_id(gfx::Display::kInvalidDisplayID),
+ controller(NULL) {
+}
+
+RootWindowSettings* InitRootWindowSettings(aura::RootWindow* root) {
+ RootWindowSettings* property = new RootWindowSettings();
+ root->SetProperty(kRootWindowSettingsKey, property);
+ return property;
+}
+
+RootWindowSettings* GetRootWindowSettings(aura::RootWindow* root) {
+ return root->GetProperty(kRootWindowSettingsKey);
+}
+
+const RootWindowSettings* GetRootWindowSettings(const aura::RootWindow* root) {
+ return root->GetProperty(kRootWindowSettingsKey);
+}
+
+} // namespace internal
+} // namespace ash
« no previous file with comments | « ash/root_window_settings.h ('k') | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698