assistant_ui_constants.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2018 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_ASSISTANT_UI_ASSISTANT_UI_CONSTANTS_H_
  5. #define ASH_ASSISTANT_UI_ASSISTANT_UI_CONSTANTS_H_
  6. #include "base/component_export.h"
  7. #include "third_party/skia/include/core/SkColor.h"
  8. #include "ui/aura/window.h"
  9. #include "ui/gfx/color_palette.h"
  10. namespace gfx {
  11. class FontList;
  12. } // namespace gfx
  13. namespace ash {
  14. // Appearance.
  15. // TODO(b/233386078): Usage of kPreferredWidthDip is discouraged as it can
  16. // change
  17. constexpr int kPreferredWidthDip = 640;
  18. constexpr int kSpacingDip = 8;
  19. constexpr int kMarginDip = 8;
  20. // Typography.
  21. constexpr SkColor kTextColorPrimary = gfx::kGoogleGrey900;
  22. constexpr SkColor kTextColorSecondary = gfx::kGoogleGrey700;
  23. // TODO(dmblack): Move the other constants into ash::assistant::ui.
  24. namespace assistant {
  25. namespace ui {
  26. // Window property to instruct the event targeter for the Assistant window to
  27. // only allow mouse click events to reach the specified |window|. All other
  28. // events will not be explored by |window|'s subtree for handling.
  29. COMPONENT_EXPORT(ASSISTANT_UI_CONSTANTS)
  30. extern const aura::WindowProperty<bool>* const kOnlyAllowMouseClickEvents;
  31. // Returns the default font list for Assistant UI.
  32. COMPONENT_EXPORT(ASSISTANT_UI_CONSTANTS)
  33. const gfx::FontList& GetDefaultFontList();
  34. // The maximum number of user sessions in which to show Assistant onboarding.
  35. constexpr int kOnboardingMaxSessionsShown = 3;
  36. // Returns the horizontal margin in DIPs.
  37. COMPONENT_EXPORT(ASSISTANT_UI_CONSTANTS)
  38. int GetHorizontalMargin();
  39. // Returns the horizontal padding in DIPs.
  40. COMPONENT_EXPORT(ASSISTANT_UI_CONSTANTS)
  41. int GetHorizontalPadding();
  42. } // namespace ui
  43. } // namespace assistant
  44. } // namespace ash
  45. #endif // ASH_ASSISTANT_UI_ASSISTANT_UI_CONSTANTS_H_