Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[fuchsia] Migrate to new RealmBuilder API #39175

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,16 @@ bool PortableUITest::HasViewConnected(zx_koid_t view_ref_koid) {
}

void PortableUITest::LaunchClient() {
scene_provider_ = realm_->Connect<fuchsia::ui::test::scene::Controller>();
scene_provider_ =
realm_->component().Connect<fuchsia::ui::test::scene::Controller>();
scene_provider_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from test scene provider: "
<< &zx_status_get_string;
});

fuchsia::ui::test::scene::ControllerAttachClientViewRequest request;
request.set_view_provider(realm_->Connect<fuchsia::ui::app::ViewProvider>());
request.set_view_provider(
realm_->component().Connect<fuchsia::ui::app::ViewProvider>());
scene_provider_->RegisterViewTreeWatcher(view_tree_watcher_.NewRequest(),
[]() {});
scene_provider_->AttachClientView(
Expand Down Expand Up @@ -214,7 +216,8 @@ void PortableUITest::LaunchClientWithEmbeddedView() {

void PortableUITest::RegisterTouchScreen() {
FML_LOG(INFO) << "Registering fake touch screen";
input_registry_ = realm_->Connect<fuchsia::ui::test::input::Registry>();
input_registry_ =
realm_->component().Connect<fuchsia::ui::test::input::Registry>();
input_registry_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from input helper: " << &zx_status_get_string;
});
Expand All @@ -232,7 +235,8 @@ void PortableUITest::RegisterTouchScreen() {

void PortableUITest::RegisterMouse() {
FML_LOG(INFO) << "Registering fake mouse";
input_registry_ = realm_->Connect<fuchsia::ui::test::input::Registry>();
input_registry_ =
realm_->component().Connect<fuchsia::ui::test::input::Registry>();
input_registry_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from input helper: " << &zx_status_get_string;
});
Expand All @@ -249,7 +253,8 @@ void PortableUITest::RegisterMouse() {

void PortableUITest::RegisterKeyboard() {
FML_LOG(INFO) << "Registering fake keyboard";
input_registry_ = realm_->Connect<fuchsia::ui::test::input::Registry>();
input_registry_ =
realm_->component().Connect<fuchsia::ui::test::input::Registry>();
input_registry_.set_error_handler([](auto) {
FML_LOG(ERROR) << "Error from input helper: " << &zx_status_get_string;
});
Expand Down