[views-ax] Cleanup of GetTooltipText (part 2)

This CL cleans up the last bits of the refactor to make Views cache
their tooltip text.

* Rename GetCachedTooltipText and SetCachedTooltipText to just
Get/SetTooltipText.
	- This involved some renaming in some Views that had a
	method named the same to set a custom tooltip text. That method
	on those Views was then renamed to make clearer that it was "custom".
	- Some Views also had some custom logic in their SetTooltipText and so
	this CL handled those by adding a PropertyChangedCallback with that logic
	that would run on those Views when the tooltip property changed.

* Rename GetTooltipText(Point) to GetRenderedTooltipText(Point)
	- This is the method that the tooltip controller uses to expose
	the tooltip, and in most cases this and GetTooltipText() return the same
	string, but there are some Views such as TableView and MenuItemView that
	require a Point to calculate the tooltip text.

* This CL also includes the small refactor of a couple of Views
for which their tooltip text had not been refactored. These were small
refactors, one just needed a callback and the other just had to call
SetTooltipText.

* For the Views that had their own custom logic in a local
`SetTooltipText`, this CL moves that custom logic to an override
of a function in view that will run when the tooltip text changes.
This is needed in many cases over adding a property callback because
these Views used the value of the tooltip text BEFORE it changes,
which was not possible to get via the property callback.

*`Label` had a local `SetTooltipText` that set a local custom
tooltip variable. To accommodate this along with the new method
of the same name in View, we renamed the Label version
to SetCustomTooltip text, which also fits the behavior better.

* More information can be found on the linked bug, but TLDR
is that Views now cache their tooltip text. This CL then renames
and cleans up a bit to finish up the refactor.
`View::GetTooltipText()` returns this cached tooltip for all Views.
`View::GetRenderedTooltipText(point)` exists so Views that require
of a point to compute their tooltip can override this method to do so.
The base version of this method will simply return the cached member.
`GetRenderedTooltipText` is the method that is used by the tooltip
manager.

This CL is part of the ViewsAX project:
https://docs.google.com/document/d/1Ku7HOyDsiZem1yaV6ccZ-tz3lO2XR2NEcm8HjR6d-VY/edit#heading=h.ke1u3utej413

Bug: 325137417, 378724151
Change-Id: Id24bab7877bdb89b5bf4b8c42c3c8ba148889268
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6093662
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Commit-Queue: Javier Contreras <javiercon@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1409190}
126 files changed
tree: 7e5195c147ac43d9cfb5009b6896f7d6b375274c
  1. android_webview/
  2. apps/
  3. ash/
  4. base/
  5. build/
  6. build_overrides/
  7. buildtools/
  8. cc/
  9. chrome/
  10. chromecast/
  11. chromeos/
  12. codelabs/
  13. components/
  14. content/
  15. crypto/
  16. dbus/
  17. device/
  18. docs/
  19. extensions/
  20. fuchsia_web/
  21. gin/
  22. google_apis/
  23. gpu/
  24. headless/
  25. infra/
  26. ios/
  27. ipc/
  28. media/
  29. mojo/
  30. native_client_sdk/
  31. net/
  32. pdf/
  33. ppapi/
  34. printing/
  35. remoting/
  36. rlz/
  37. sandbox/
  38. services/
  39. skia/
  40. sql/
  41. storage/
  42. styleguide/
  43. testing/
  44. third_party/
  45. tools/
  46. ui/
  47. url/
  48. webkit/
  49. .clang-format
  50. .clang-tidy
  51. .clangd
  52. .git-blame-ignore-revs
  53. .gitallowed
  54. .gitattributes
  55. .gitignore
  56. .gitmodules
  57. .gn
  58. .mailmap
  59. .rustfmt.toml
  60. .vpython3
  61. .yapfignore
  62. ATL_OWNERS
  63. AUTHORS
  64. BUILD.gn
  65. CODE_OF_CONDUCT.md
  66. codereview.settings
  67. CPPLINT.cfg
  68. CRYPTO_OWNERS
  69. DEPS
  70. description
  71. DIR_METADATA
  72. LICENSE
  73. LICENSE.chromium_os
  74. OWNERS
  75. PRESUBMIT.py
  76. PRESUBMIT_test.py
  77. PRESUBMIT_test_mocks.py
  78. README.md
  79. WATCHLISTS
README.md

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.