if (!is_android) {Would it make sense to replace guards like this with something like `if(!skip_android_unmigrated_actor_files)` which is set to true in the Android build. That way we can ensure the migration is complete when that flag is removed vs. missing an `is_android` flag which could be easy to do in a more generic buildfile. (though IDK, I guess that just moves that onus from then to now...)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (!skip_android_unmigrated_actor_files) {
sources += [
"actor_border_view_controller.cc",
"actor_border_view_controller.h",
"actor_overlay_handler.cc",
"actor_overlay_handler.h",
"actor_overlay_ui.cc",
"actor_overlay_ui.h",
"actor_overlay_web_view.cc",
"actor_overlay_web_view.h",
"actor_ui_state_manager_prefs.cc",
"actor_ui_state_manager_prefs.h",
"actor_ui_tab_controller.cc",
"actor_ui_tab_controller.h",
"actor_ui_tab_controller_interface.cc",
"actor_ui_tab_controller_interface.h",
"actor_ui_window_controller.cc",
"actor_ui_window_controller.h",
"handoff_button_controller.cc",
"handoff_button_controller.h",
]
deps += [
"//chrome/app/vector_icons",
"//chrome/browser/actor/resources:browser_resources",
"//chrome/browser/actor/ui:ui_event_utils",
"//chrome/browser/profiles:profile",
"//chrome/browser/resources/actor_overlay:resources",
"//chrome/browser/ui/browser_window",
"//chrome/browser/ui/tabs:tab_strip",
"//chrome/browser/ui/tabs:tabs_public",
"//chrome/browser/ui/toasts",
"//chrome/browser/ui/toasts/api:toasts",
"//chrome/browser/ui/views/frame:immersive_mode_controller",
"//chrome/browser/ui/views/interaction",
"//chrome/browser/ui/webui:webui_util",
"//chrome/common",
"//content/public/browser",
"//third_party/abseil-cpp:absl",
"//ui/base/unowned_user_data",
"//ui/views",
"//ui/views/controls/webview",
"//ui/webui",
]
# TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
# enable the diagnostic by removing this line.
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
if (enable_glic) {
deps += [ "//chrome/browser/glic" ]
}
}Maybe split these into different targets? One for the base UI controller logic and another for the UI implementation on desktop platforms?
You can come up with better names, but something like:
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Would it make sense to replace guards like this with something like `if(!skip_android_unmigrated_actor_files)` which is set to true in the Android build. That way we can ensure the migration is complete when that flag is removed vs. missing an `is_android` flag which could be easy to do in a more generic buildfile. (though IDK, I guess that just moves that onus from then to now...)
Done
there is still some ongoing discussion on how much ui we can reuse. for example we might reuse the overlay implementation on android as well. so its not desktop_ui permanently. there are files in few different states:
It feels more appropriate to have them marked as unmigrated now and then once we decide, split the targets to desktop and android. This helps track the status of the migration and work needed. Else we would be going down the rabbit hole of deciding each file's final target?
cc @haile...@google.com
I anticipate that once we have the overlay implementation decided, we would migrate these files related. then split the logic and implementation and create targets
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
for (const auto& tab : GetTabs(task_id)) {
if (auto* tab_controller = ActorUiTabControllerInterface::From(tab)) {
tab_controller->OnUiTabStateChange(ui_tab_state,
base::BindOnce(&LogUiChangeError));
}
}since the tab controller is marked unmigrated for now, should we also add the BUILDFLAG check here? and everywhere else ActorUiTabControllerInterface is used.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Seems reasonable to me but kmg@, boujane@, chstne@ would be the experts here so will defer the rest to them.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Do you need to know your implementation details to make progress on dividing up this build target? It seems possible to draw a few component boundaries and separate those into different targets. There's a boundary between UiEventDispatcher and ActorUiStateManager, for example. You could probably also pull the overlay out into its own component. That seems more productive than adding temporary branches to the BUILD rules.
for (const auto& tab : GetTabs(task_id)) {
if (auto* tab_controller = ActorUiTabControllerInterface::From(tab)) {
tab_controller->OnUiTabStateChange(ui_tab_state,
base::BindOnce(&LogUiChangeError));
}
}since the tab controller is marked unmigrated for now, should we also add the BUILDFLAG check here? and everywhere else ActorUiTabControllerInterface is used.
thanks. Maybe we could incldue the interface also in the build. didn't notice the calls. But i am going OOO so will let Linda take over and fix this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Linda Wang would like Kevin Graney, Salvador Guerrero Ramos, Abe Boujane, Christine Ying and Min Qin to review this change.
Enable actor UI interface to build on Android
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Quick update on this about the overlay impl; we decided to reuse the desktop overlay structure/files. We are hoping it should work out of the box + some extra detail polish/changes. FYI @linda...@google.com
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |