blob: 74f5d5acdc7b16b0b7b66d97e91a9410cfacbe66 [file] [log] [blame]
[email protected]f8e6aad2013-08-30 21:49:111// Copyright 2013 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 "ash/root_window_settings.h"
6
kylixrd61e45cf2017-01-30 19:52:537#include "ui/aura/window.h"
[email protected]fcc51c952014-02-21 21:31:268#include "ui/aura/window_event_dispatcher.h"
kylixrd61e45cf2017-01-30 19:52:539#include "ui/base/class_property.h"
kylecharbc3192242016-11-23 00:51:2710#include "ui/display/types/display_constants.h"
[email protected]f8e6aad2013-08-30 21:49:1111
Daniel Bratell0e33dbf2017-12-05 20:18:4712DEFINE_UI_CLASS_PROPERTY_TYPE(ash::RootWindowSettings*);
[email protected]f8e6aad2013-08-30 21:49:1113
14namespace ash {
[email protected]f8e6aad2013-08-30 21:49:1115
kylixrd61e45cf2017-01-30 19:52:5316DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(RootWindowSettings,
17 kRootWindowSettingsKey,
18 NULL);
[email protected]f8e6aad2013-08-30 21:49:1119
20RootWindowSettings::RootWindowSettings()
kylecharbc3192242016-11-23 00:51:2721 : display_id(display::kInvalidDisplayId), controller(NULL) {}
[email protected]f8e6aad2013-08-30 21:49:1122
[email protected]bf9cdb362013-10-25 19:22:4523RootWindowSettings* InitRootWindowSettings(aura::Window* root) {
[email protected]fa781ec2013-09-05 20:13:5524 RootWindowSettings* settings = new RootWindowSettings();
25 root->SetProperty(kRootWindowSettingsKey, settings);
26 return settings;
[email protected]f8e6aad2013-08-30 21:49:1127}
28
[email protected]bf9cdb362013-10-25 19:22:4529RootWindowSettings* GetRootWindowSettings(aura::Window* root) {
[email protected]f8e6aad2013-08-30 21:49:1130 return root->GetProperty(kRootWindowSettingsKey);
31}
32
[email protected]bf9cdb362013-10-25 19:22:4533const RootWindowSettings* GetRootWindowSettings(const aura::Window* root) {
[email protected]f8e6aad2013-08-30 21:49:1134 return root->GetProperty(kRootWindowSettingsKey);
35}
36
[email protected]f8e6aad2013-08-30 21:49:1137} // namespace ash