Skip to content

Commit

Permalink
[fuchsia] Rename fidl namespace to f1dl (flutter#4707)
Browse files Browse the repository at this point in the history
This rename is to prepare for the migration to FIDL2.
  • Loading branch information
abarth authored Feb 23, 2018
1 parent 3697845 commit 63b9dab
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions content_handler/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ App::App() {
}

context_->outgoing_services()->AddService<app::ApplicationRunner>(
[this](fidl::InterfaceRequest<app::ApplicationRunner> request) {
[this](f1dl::InterfaceRequest<app::ApplicationRunner> request) {
runner_bindings_.AddBinding(this, std::move(request));
});
}
Expand Down Expand Up @@ -131,7 +131,7 @@ void App::WaitForPlatformViewsIdsUIThread(
void App::StartApplication(
app::ApplicationPackagePtr application,
app::ApplicationStartupInfoPtr startup_info,
fidl::InterfaceRequest<app::ApplicationController> controller) {
f1dl::InterfaceRequest<app::ApplicationController> controller) {
if (controllers_.empty()) {
// Name this process after the url of the first application being launched.
base_label_ = "flutter:" + GetLabelFromURL(startup_info->launch_info->url);
Expand Down
4 changes: 2 additions & 2 deletions content_handler/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class App : public app::ApplicationRunner {
void StartApplication(
app::ApplicationPackagePtr application,
app::ApplicationStartupInfoPtr startup_info,
fidl::InterfaceRequest<app::ApplicationController> controller) override;
f1dl::InterfaceRequest<app::ApplicationController> controller) override;

void Destroy(ApplicationControllerImpl* controller);

Expand All @@ -50,7 +50,7 @@ class App : public app::ApplicationRunner {
std::unique_ptr<app::ApplicationContext> context_;
std::unique_ptr<fsl::Thread> gpu_thread_;
std::unique_ptr<fsl::Thread> io_thread_;
fidl::BindingSet<app::ApplicationRunner> runner_bindings_;
f1dl::BindingSet<app::ApplicationRunner> runner_bindings_;
std::unordered_map<ApplicationControllerImpl*,
std::unique_ptr<ApplicationControllerImpl>>
controllers_;
Expand Down
8 changes: 4 additions & 4 deletions content_handler/application_controller_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ApplicationControllerImpl::ApplicationControllerImpl(
App* app,
app::ApplicationPackagePtr application,
app::ApplicationStartupInfoPtr startup_info,
fidl::InterfaceRequest<app::ApplicationController> controller)
f1dl::InterfaceRequest<app::ApplicationController> controller)
: app_(app), binding_(this) {
if (controller.is_valid()) {
binding_.Bind(std::move(controller));
Expand All @@ -48,7 +48,7 @@ ApplicationControllerImpl::ApplicationControllerImpl(
}

service_provider_bridge_.AddService<mozart::ViewProvider>(
[this](fidl::InterfaceRequest<mozart::ViewProvider> request) {
[this](f1dl::InterfaceRequest<mozart::ViewProvider> request) {
view_provider_bindings_.AddBinding(this, std::move(request));
});

Expand Down Expand Up @@ -124,8 +124,8 @@ void ApplicationControllerImpl::SendReturnCode(int32_t return_code) {
}

void ApplicationControllerImpl::CreateView(
fidl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
fidl::InterfaceRequest<app::ServiceProvider> services) {
f1dl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
f1dl::InterfaceRequest<app::ServiceProvider> services) {
runtime_holder_->CreateView(url_, std::move(view_owner_request),
std::move(services));
}
Expand Down
10 changes: 5 additions & 5 deletions content_handler/application_controller_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApplicationControllerImpl : public app::ApplicationController,
App* app,
app::ApplicationPackagePtr application,
app::ApplicationStartupInfoPtr startup_info,
fidl::InterfaceRequest<app::ApplicationController> controller);
f1dl::InterfaceRequest<app::ApplicationController> controller);

~ApplicationControllerImpl() override;

Expand All @@ -44,8 +44,8 @@ class ApplicationControllerImpl : public app::ApplicationController,
// |mozart::ViewProvider| implementation

void CreateView(
fidl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
fidl::InterfaceRequest<app::ServiceProvider> services) override;
f1dl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
f1dl::InterfaceRequest<app::ServiceProvider> services) override;

Dart_Port GetUIIsolateMainPort();
std::string GetUIIsolateName();
Expand All @@ -57,11 +57,11 @@ class ApplicationControllerImpl : public app::ApplicationController,
fdio_ns_t* SetupNamespace(const app::FlatNamespacePtr& flat);

App* app_;
fidl::Binding<app::ApplicationController> binding_;
f1dl::Binding<app::ApplicationController> binding_;

app::ServiceProviderBridge service_provider_bridge_;

fidl::BindingSet<mozart::ViewProvider> view_provider_bindings_;
f1dl::BindingSet<mozart::ViewProvider> view_provider_bindings_;

std::string url_;
std::unique_ptr<RuntimeHolder> runtime_holder_;
Expand Down
2 changes: 1 addition & 1 deletion content_handler/rasterizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Rasterizer {
static std::unique_ptr<Rasterizer> Create();

virtual void SetScene(
fidl::InterfaceHandle<scenic::SceneManager> scene_manager,
f1dl::InterfaceHandle<scenic::SceneManager> scene_manager,
zx::eventpair import_token,
fxl::Closure metrics_changed_callback) = 0;

Expand Down
14 changes: 7 additions & 7 deletions content_handler/runtime_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ RuntimeHolder::~RuntimeHolder() {
void RuntimeHolder::Init(
fdio_ns_t* namespc,
std::unique_ptr<app::ApplicationContext> context,
fidl::InterfaceRequest<app::ServiceProvider> outgoing_services,
f1dl::InterfaceRequest<app::ServiceProvider> outgoing_services,
std::vector<char> bundle) {
FXL_DCHECK(!rasterizer_);
rasterizer_ = Rasterizer::Create();
Expand Down Expand Up @@ -193,8 +193,8 @@ void RuntimeHolder::Init(

void RuntimeHolder::CreateView(
const std::string& script_uri,
fidl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
fidl::InterfaceRequest<app::ServiceProvider> services) {
f1dl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
f1dl::InterfaceRequest<app::ServiceProvider> services) {
if (view_listener_binding_.is_bound()) {
// TODO(jeffbrown): Refactor this to support multiple view instances
// sharing the same underlying root bundle (but with different runtimes).
Expand Down Expand Up @@ -238,7 +238,7 @@ void RuntimeHolder::CreateView(
input_connection_->SetEventListener(std::move(input_listener));

// Setup the session.
fidl::InterfaceHandle<scenic::SceneManager> scene_manager;
f1dl::InterfaceHandle<scenic::SceneManager> scene_manager;
view_manager_->GetSceneManager(scene_manager.NewRequest());

blink::Threads::Gpu()->PostTask(fxl::MakeCopyable([
Expand Down Expand Up @@ -444,7 +444,7 @@ void RuntimeHolder::InitDartIoInternal() {
}

void RuntimeHolder::InitFuchsia() {
fidl::InterfaceHandle<app::ApplicationEnvironment> environment;
f1dl::InterfaceHandle<app::ApplicationEnvironment> environment;
context_->ConnectToEnvironmentService(environment.NewRequest());
fuchsia::dart::Initialize(std::move(environment),
std::move(outgoing_services_));
Expand All @@ -467,7 +467,7 @@ void RuntimeHolder::InitZircon() {
}

void RuntimeHolder::InitMozartInternal() {
fidl::InterfaceHandle<mozart::ViewContainer> view_container;
f1dl::InterfaceHandle<mozart::ViewContainer> view_container;
view_->GetContainer(view_container.NewRequest());

Dart_Handle mozart_internal =
Expand Down Expand Up @@ -558,7 +558,7 @@ bool RuntimeHolder::HandleFlutterPlatformMessage(
clipboard_->Push(text);
response->CompleteEmpty();
} else if (method->value == "Clipboard.getData") {
clipboard_->Peek([response](const ::fidl::String& text) {
clipboard_->Peek([response](const ::f1dl::String& text) {
rapidjson::StringBuffer json_buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(json_buffer);
writer.StartArray();
Expand Down
14 changes: 7 additions & 7 deletions content_handler/runtime_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class RuntimeHolder : public blink::RuntimeDelegate,

void Init(fdio_ns_t* namespc,
std::unique_ptr<app::ApplicationContext> context,
fidl::InterfaceRequest<app::ServiceProvider> outgoing_services,
f1dl::InterfaceRequest<app::ServiceProvider> outgoing_services,
std::vector<char> bundle);
void CreateView(const std::string& script_uri,
fidl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
fidl::InterfaceRequest<app::ServiceProvider> services);
f1dl::InterfaceRequest<mozart::ViewOwner> view_owner_request,
f1dl::InterfaceRequest<app::ServiceProvider> services);

Dart_Port GetUIIsolateMainPort();
std::string GetUIIsolateName();
Expand Down Expand Up @@ -111,7 +111,7 @@ class RuntimeHolder : public blink::RuntimeDelegate,
fdio_ns_t* namespc_;
int dirfd_;
std::unique_ptr<app::ApplicationContext> context_;
fidl::InterfaceRequest<app::ServiceProvider> outgoing_services_;
f1dl::InterfaceRequest<app::ServiceProvider> outgoing_services_;
std::vector<char> root_bundle_data_;
// TODO(zarah): Remove asset_store_ when flx is completely removed
fxl::RefPtr<blink::ZipAssetStore> asset_store_;
Expand All @@ -121,13 +121,13 @@ class RuntimeHolder : public blink::RuntimeDelegate,
std::unique_ptr<blink::RuntimeController> runtime_;
blink::ViewportMetrics viewport_metrics_;
mozart::ViewManagerPtr view_manager_;
fidl::Binding<mozart::ViewListener> view_listener_binding_;
fidl::Binding<mozart::InputListener> input_listener_binding_;
f1dl::Binding<mozart::ViewListener> view_listener_binding_;
f1dl::Binding<mozart::InputListener> input_listener_binding_;
mozart::InputConnectionPtr input_connection_;
mozart::ViewPtr view_;
std::unordered_set<int> down_pointers_;
mozart::InputMethodEditorPtr input_method_editor_;
fidl::Binding<mozart::InputMethodEditorClient> text_input_binding_;
f1dl::Binding<mozart::InputMethodEditorClient> text_input_binding_;
int current_text_input_client_ = 0;
fxl::TimePoint last_begin_frame_time_;
bool frame_outstanding_ = false;
Expand Down
2 changes: 1 addition & 1 deletion content_handler/session_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void SessionConnection::OnSessionError() {
FXL_CHECK(false) << "Session connection was terminated.";
}

void SessionConnection::OnSessionEvents(fidl::Array<scenic::EventPtr> events) {
void SessionConnection::OnSessionEvents(f1dl::Array<scenic::EventPtr> events) {
scenic::MetricsPtr new_metrics;
for (const auto& event : events) {
if (event->is_metrics() &&
Expand Down
2 changes: 1 addition & 1 deletion content_handler/session_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SessionConnection {
fxl::Closure metrics_changed_callback_;

void OnSessionError();
void OnSessionEvents(fidl::Array<scenic::EventPtr> events);
void OnSessionEvents(f1dl::Array<scenic::EventPtr> events);

void EnqueueClearOps();

Expand Down
2 changes: 1 addition & 1 deletion content_handler/vulkan_rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool VulkanRasterizer::IsValid() const {
}

void VulkanRasterizer::SetScene(
fidl::InterfaceHandle<scenic::SceneManager> scene_manager,
f1dl::InterfaceHandle<scenic::SceneManager> scene_manager,
zx::eventpair import_token,
fxl::Closure metrics_changed_callback) {
ASSERT_IS_GPU_THREAD;
Expand Down
2 changes: 1 addition & 1 deletion content_handler/vulkan_rasterizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class VulkanRasterizer : public Rasterizer {

bool IsValid() const;

void SetScene(fidl::InterfaceHandle<scenic::SceneManager> scene_manager,
void SetScene(f1dl::InterfaceHandle<scenic::SceneManager> scene_manager,
zx::eventpair import_token,
fxl::Closure metrics_changed_callback) override;

Expand Down

0 comments on commit 63b9dab

Please sign in to comment.