This used to be an alias to:
```cxx
using BubbleAnchor = std::variant<std::nullptr_t, View*, ui::TrackedElement*>;
```
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1ba6a69579ba3b5f5925ff77a390be5a99d748e7
commit 1ba6a69579ba3b5f5925ff77a390be5a99d748e7
Author: Maks Orlovich <morlovich@chromium.org>
Date: Tue Apr 7 11:33:31 2026 -0700
Make BubbleAnchor an own class.
The variant implementation has a property that seems very unfortunate:
it has 3 possible places it can store nullptr, which makes it tricky to
reason about and work with, e.g.:
BubbleAnchor Foo() {
if (View* view = Bar()) {
return view;
}
return nullptr;
}
is not equivalent to: BubbleAnchor Foo() {
return Bar();
}
It's also somewhat awkward to use, and can't be forward declared.
The class wrapper normalizes the nulls. It also gives it is own
header (and can be forward declared).
Change-Id: I2aacb894ee995af7fd012f2762826cd30f277179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7647509
Reviewed-by: Dana Fried <dfried@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1610910}