controls_visibility_reason.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2020 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 WEBLAYER_BROWSER_CONTROLS_VISIBILITY_REASON_H_
  5. #define WEBLAYER_BROWSER_CONTROLS_VISIBILITY_REASON_H_
  6. namespace weblayer {
  7. // This enum represents actions or UI conditions that affect the visibility of
  8. // top UI, and is used to track concurrent concerns and to allow native and Java
  9. // code to coordinate.
  10. //
  11. // WARNING: only a subset of these are used if OnlyExpandTopControlsAtPageTop
  12. // is true.
  13. //
  14. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.weblayer_private
  15. // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ImplControlsVisibilityReason
  16. enum class ControlsVisibilityReason {
  17. // Browser controls are hidden when fullscreen is active.
  18. kFullscreen = 0,
  19. // Find in page forces browser controls to be visible.
  20. kFindInPage,
  21. // Tab modal dialogs obscure the content while leaving controls interactive.
  22. kTabModalDialog,
  23. // If accessibility is enabled, controls are forced shown.
  24. kAccessibility,
  25. // Browser controls visibility can be set to force them to animate in/out when
  26. // being set or cleared.
  27. kAnimation,
  28. // If the renderer isn't able to update the controls position because it is
  29. // being destroyed, crashed, or is unresponsive, show the controls.
  30. kRendererUnavailable,
  31. // Miscellaneous reasons for showing the controls, including:
  32. // * User entering text
  33. // * The URL being dangerous or having a warning
  34. // * An interstitial is showing
  35. // * chrome:// URL
  36. kOther,
  37. kReasonCount,
  38. };
  39. } // namespace weblayer
  40. #endif // WEBLAYER_BROWSER_CONTROLS_VISIBILITY_REASON_H_