page_info_resource_id.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. // This file maps resource IDs to Android resource IDs.
  5. // Presence of regular include guards is checked by:
  6. // 1. cpplint
  7. // 2. a custom presubmit in src/PRESUBMIT.py
  8. // 3. clang (but it only checks the guard is correct if present)
  9. // Disable the first two with these magic comments:
  10. // NOLINT(build/header_guard)
  11. // no-include-guard-because-multiply-included
  12. // LINK_RESOURCE_ID is used for IDs that come from a .grd file.
  13. #ifndef LINK_RESOURCE_ID
  14. #error "LINK_RESOURCE_ID should be defined before including this file"
  15. #endif
  16. // DECLARE_RESOURCE_ID is used for IDs that don't have .grd entries, and
  17. // are only declared in this file.
  18. #ifndef DECLARE_RESOURCE_ID
  19. #error "DECLARE_RESOURCE_ID should be defined before including this file"
  20. #endif
  21. // PageInfoUI images, used in ConnectionInfoView
  22. // Good:
  23. DECLARE_RESOURCE_ID(IDR_PAGEINFO_GOOD, R.drawable.omnibox_https_valid)
  24. // Bad:
  25. DECLARE_RESOURCE_ID(IDR_PAGEINFO_BAD, R.drawable.omnibox_not_secure_warning)
  26. // PageInfoUI colors, used in ConnectionInfoView
  27. // Good:
  28. DECLARE_RESOURCE_ID(IDR_PAGEINFO_GOOD_COLOR,
  29. R.color.default_icon_color_tint_list)
  30. // Warning:
  31. DECLARE_RESOURCE_ID(IDR_PAGEINFO_WARNING_COLOR,
  32. R.color.default_icon_color_accent1_tint_list)
  33. // Bad:
  34. DECLARE_RESOURCE_ID(IDR_PAGEINFO_BAD_COLOR, R.color.default_text_color_error)