root_window_settings.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef ASH_ROOT_WINDOW_SETTINGS_H_
  5. #define ASH_ROOT_WINDOW_SETTINGS_H_
  6. #include <stdint.h>
  7. #include "ash/ash_export.h"
  8. namespace aura {
  9. class Window;
  10. }
  11. namespace ash {
  12. class RootWindowController;
  13. // Per root window information should be stored here
  14. // instead of using plain aura root window property because
  15. // it can prevent mis-using on non root window.
  16. struct RootWindowSettings {
  17. RootWindowSettings();
  18. // ID of the display associated with the root window.
  19. int64_t display_id;
  20. // RootWindowController for the root window. This may be NULL
  21. // for the root window used for mirroring.
  22. RootWindowController* controller;
  23. };
  24. // Initializes and returns RootWindowSettings for |root|.
  25. // It is owned by the |root|.
  26. ASH_EXPORT RootWindowSettings* InitRootWindowSettings(aura::Window* root);
  27. // Returns the RootWindowSettings for |root|.
  28. ASH_EXPORT RootWindowSettings* GetRootWindowSettings(aura::Window* root);
  29. // const version of GetRootWindowSettings.
  30. ASH_EXPORT const RootWindowSettings* GetRootWindowSettings(
  31. const aura::Window* root);
  32. } // namespace ash
  33. #endif // ASH_ROOT_WINDOW_SETTINGS_H_