[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 1 | // 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 | |||||
kylixrd | 61e45cf | 2017-01-30 19:52:53 | [diff] [blame] | 7 | #include "ui/aura/window.h" |
[email protected] | fcc51c95 | 2014-02-21 21:31:26 | [diff] [blame] | 8 | #include "ui/aura/window_event_dispatcher.h" |
kylixrd | 61e45cf | 2017-01-30 19:52:53 | [diff] [blame] | 9 | #include "ui/base/class_property.h" |
kylechar | bc319224 | 2016-11-23 00:51:27 | [diff] [blame] | 10 | #include "ui/display/types/display_constants.h" |
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 11 | |
Daniel Bratell | 0e33dbf | 2017-12-05 20:18:47 | [diff] [blame] | 12 | DEFINE_UI_CLASS_PROPERTY_TYPE(ash::RootWindowSettings*); |
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 13 | |
14 | namespace ash { | ||||
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 15 | |
kylixrd | 61e45cf | 2017-01-30 19:52:53 | [diff] [blame] | 16 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(RootWindowSettings, |
17 | kRootWindowSettingsKey, | ||||
18 | NULL); | ||||
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 19 | |
20 | RootWindowSettings::RootWindowSettings() | ||||
kylechar | bc319224 | 2016-11-23 00:51:27 | [diff] [blame] | 21 | : display_id(display::kInvalidDisplayId), controller(NULL) {} |
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 22 | |
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 23 | RootWindowSettings* InitRootWindowSettings(aura::Window* root) { |
[email protected] | fa781ec | 2013-09-05 20:13:55 | [diff] [blame] | 24 | RootWindowSettings* settings = new RootWindowSettings(); |
25 | root->SetProperty(kRootWindowSettingsKey, settings); | ||||
26 | return settings; | ||||
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 27 | } |
28 | |||||
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 29 | RootWindowSettings* GetRootWindowSettings(aura::Window* root) { |
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 30 | return root->GetProperty(kRootWindowSettingsKey); |
31 | } | ||||
32 | |||||
[email protected] | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 33 | const RootWindowSettings* GetRootWindowSettings(const aura::Window* root) { |
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 34 | return root->GetProperty(kRootWindowSettingsKey); |
35 | } | ||||
36 | |||||
[email protected] | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 37 | } // namespace ash |