actions revamp: Open popup via ETB and ExtensionActionDelegate
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This is the integration point of ExtensionsToolbar and ETVM for Android :D
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This is the integration point of ExtensionsToolbar and ETVM for Android :D
Failing tests seem unrelated. Will take a look at the merge conflict tomorrow...
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Masa FujitaThis is the integration point of ExtensionsToolbar and ETVM for Android :D
Failing tests seem unrelated. Will take a look at the merge conflict tomorrow...
Everything should be fixed now, PTAL! (this CL is not directly related to the `ExtensionContainer` refactor)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks Masa! I mainly took a look at the cpp code. I'll look at the java side tomorrow.. but wanted to provide some feedback today (meant to send this earlier but forgot to hit send!)
const raw_ptr<extensions::ExtensionsToolbarBridge> bridge_;nit: rename to `toolbar_bridge` and update comment to reflect its for the extensions toolbar
void ShowContextMenuAsFallback() override /* */;nit: typo?
bridge_->TriggerPopup(action_id_, std::move(host));optional - separate CL: I know we have already named it extensions_toolbar_bridge, but what about re-naming it to extensions_toolbar_delegate_android? It would fit the action and menu structure of having a 'DelegateAndroid' that is used as a bridge. Then, we can have ExtensionsToolbarBridge.java
The benefit of the rename is having the same structure as the other UIs. Also, here `toolbar_delegate_android_->TriggerPopup(...)` it's more clear imo
extension_view_host_ptr));Investigate: Is ExtensionViewHost platform-agnostic? If so, would it make more sense to have this at the 'model' level?
// TODO(crbug.com/461981075): Pass a `bridge` instance instead of a nullptr.investigate: what could be the best way to pass information from 'toolbar bridge' to 'menu delegate android'?
ToolbarActionViewModel* model =
toolbar_view_model_->GetActionModelForId(action_id);
model->ExecuteUserAction(source);This is platform-agnostic, we could handle it on `ExtensionsToolbarViewModel` which owns the `ToolbarActionViewModel`:
```
toolbar_view_model_->ExecuteUserAction(action_id, source)`
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
const raw_ptr<extensions::ExtensionsToolbarBridge> bridge_;nit: rename to `toolbar_bridge` and update comment to reflect its for the extensions toolbar
Done
void ShowContextMenuAsFallback() override /* */;Masa Fujitanit: typo?
Sorry!
bridge_->TriggerPopup(action_id_, std::move(host));optional - separate CL: I know we have already named it extensions_toolbar_bridge, but what about re-naming it to extensions_toolbar_delegate_android? It would fit the action and menu structure of having a 'DelegateAndroid' that is used as a bridge. Then, we can have ExtensionsToolbarBridge.java
The benefit of the rename is having the same structure as the other UIs. Also, here `toolbar_delegate_android_->TriggerPopup(...)` it's more clear imo
`ExtensionsToolbarBridge` will also contain methods that go the opposite way (Java methods trying to get `PinnedActionIds()` etc.) so I thought it might not be ideal to name it delegate, which might imply one direction - WDYT?
ToolbarActionViewModel* model =
toolbar_view_model_->GetActionModelForId(action_id);
model->ExecuteUserAction(source);This is platform-agnostic, we could handle it on `ExtensionsToolbarViewModel` which owns the `ToolbarActionViewModel`:
```
toolbar_view_model_->ExecuteUserAction(action_id, source)`
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Sorry for delay, some Java-side comments.
// The C++ TabList dies when the selector is destroyed.We often suffer from this kind of destruction order issue... :(
That said, rather than calling destroy() here, I think we should ensure the correct destruction order in existing destroy() callsites.
public ExtensionsToolbarBridge(ChromeAndroidTask task) {Can we take Delegate in the constructor and remove @Nullable from mDelegate? Then we don't need to worry about null in triggerPopup.
ExtensionActionListContainer mContainer;Can it be `private final`?
mExtensionsToolbarBridge = extensionsToolbarBridge;Can we construct ExtensionsToolbarBridge here since this class owns it?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |