window_properties.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright 2021 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 COMPONENTS_APP_RESTORE_WINDOW_PROPERTIES_H_
  5. #define COMPONENTS_APP_RESTORE_WINDOW_PROPERTIES_H_
  6. #include "base/component_export.h"
  7. #include "ui/base/class_property.h"
  8. namespace app_restore {
  9. struct WindowInfo;
  10. // Alphabetical sort.
  11. // A property key to store the activation index of an app. Used by ash to
  12. // determine where to stack a window among its siblings. Also used to determine
  13. // if a window is restored by the full restore process. Only a window, restored
  14. // from the full restore file and read by FullRestoreReadHandler during the
  15. // system startup phase, could have a kActivationIndexKey. A smaller index
  16. // indicates a more recently used window. If this key is null, then the window
  17. // was not launched from full restore.
  18. COMPONENT_EXPORT(APP_RESTORE)
  19. extern const ui::ClassProperty<int32_t*>* const kActivationIndexKey;
  20. // A property key to store the app id.
  21. COMPONENT_EXPORT(APP_RESTORE)
  22. extern const ui::ClassProperty<std::string*>* const kAppIdKey;
  23. // A property key to indicate that the browser window type is an app type.
  24. COMPONENT_EXPORT(APP_RESTORE)
  25. extern const ui::ClassProperty<bool>* const kAppTypeBrowser;
  26. // A property key to store the browser app name.
  27. COMPONENT_EXPORT(APP_RESTORE)
  28. extern const ui::ClassProperty<std::string*>* const kBrowserAppNameKey;
  29. // A property key to indicate the session id for the ARC ghost window from
  30. // RestoreData.
  31. COMPONENT_EXPORT(APP_RESTORE)
  32. extern const ui::ClassProperty<int32_t>* const kGhostWindowSessionIdKey;
  33. // A property key to store the window id for a Lacros window.
  34. COMPONENT_EXPORT(APP_RESTORE)
  35. extern const ui::ClassProperty<std::string*>* const kLacrosWindowId;
  36. // A property key indicating whether a window was launched from app restore.
  37. // These windows will not be activatable until they are shown.
  38. COMPONENT_EXPORT(APP_RESTORE)
  39. extern const ui::ClassProperty<bool>* const kLaunchedFromAppRestoreKey;
  40. // A property key to add the window to a hidden container, if the ARC task is
  41. // not created when the window is initialized.
  42. COMPONENT_EXPORT(APP_RESTORE)
  43. extern const ui::ClassProperty<bool>* const kParentToHiddenContainerKey;
  44. // A property key indicating whether a ARC ghost window has replaced by real
  45. // ARC task window.
  46. COMPONENT_EXPORT(APP_RESTORE)
  47. extern const ui::ClassProperty<bool>* const kRealArcTaskWindow;
  48. // A property key to indicate the restore id for the window from RestoreData.
  49. COMPONENT_EXPORT(APP_RESTORE)
  50. extern const ui::ClassProperty<int32_t>* const kRestoreWindowIdKey;
  51. // A property key to indicate the id for the window to be saved in RestoreData.
  52. // For web apps, browser windows or Chrome app windows, this is the session id.
  53. // For ARC apps, this is the task id.
  54. COMPONENT_EXPORT(APP_RESTORE)
  55. extern const ui::ClassProperty<int32_t>* const kWindowIdKey;
  56. COMPONENT_EXPORT(APP_RESTORE)
  57. extern const ui::ClassProperty<WindowInfo*>* const kWindowInfoKey;
  58. } // namespace app_restore
  59. #endif // COMPONENTS_APP_RESTORE_WINDOW_PROPERTIES_H_