oshima@chromium.org | 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 | |
oshima@chromium.org | fa781ec | 2013-09-05 20:13:55 | [diff] [blame] | 5 | #ifndef ASH_ROOT_WINDOW_SETTINGS_H_ |
| 6 | #define ASH_ROOT_WINDOW_SETTINGS_H_ |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 7 | |
avi | db567a8a | 2015-12-20 17:07:24 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 10 | #include "ash/ash_export.h" |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 11 | |
| 12 | namespace aura { |
ben@chromium.org | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 13 | class Window; |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | namespace ash { |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 17 | |
| 18 | class RootWindowController; |
| 19 | |
| 20 | // Per root window information should be stored here |
| 21 | // instead of using plain aura root window property because |
| 22 | // it can prevent mis-using on non root window. |
| 23 | struct RootWindowSettings { |
| 24 | RootWindowSettings(); |
| 25 | |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 26 | // ID of the display associated with the root window. |
avi | db567a8a | 2015-12-20 17:07:24 | [diff] [blame] | 27 | int64_t display_id; |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 28 | |
| 29 | // RootWindowController for the root window. This may be NULL |
| 30 | // for the root window used for mirroring. |
| 31 | RootWindowController* controller; |
| 32 | }; |
| 33 | |
oshima@chromium.org | fa781ec | 2013-09-05 20:13:55 | [diff] [blame] | 34 | // Initializes and returns RootWindowSettings for |root|. |
| 35 | // It is owned by the |root|. |
sadrul | ffeadfa | 2016-02-10 00:59:02 | [diff] [blame] | 36 | ASH_EXPORT RootWindowSettings* InitRootWindowSettings(aura::Window* root); |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 37 | |
| 38 | // Returns the RootWindowSettings for |root|. |
ben@chromium.org | bf9cdb36 | 2013-10-25 19:22:45 | [diff] [blame] | 39 | ASH_EXPORT RootWindowSettings* GetRootWindowSettings(aura::Window* root); |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 40 | |
| 41 | // const version of GetRootWindowSettings. |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 42 | ASH_EXPORT const RootWindowSettings* GetRootWindowSettings( |
| 43 | const aura::Window* root); |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 44 | |
oshima@chromium.org | f8e6aad | 2013-08-30 21:49:11 | [diff] [blame] | 45 | } // namespace ash |
| 46 | |
oshima@chromium.org | fa781ec | 2013-09-05 20:13:55 | [diff] [blame] | 47 | #endif // ASH_ROOT_WINDOW_SETTINGS_H_ |