0

[Fuchsia] Remove viewsv1::ViewProvider impl from WebComponent

viewsv1 dependencies have been removed from topaz, so WebComponent
doesn't need to support it anymore.

Bug: 899348
Change-Id: Icd666bcbd00b8bbb52ccd1948b4d977e83bab40b
Reviewed-on: https://chromium-review.googlesource.com/c/1487848
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635297}
This commit is contained in:
Sergey Ulanov
2019-02-25 22:55:44 +00:00
committed by Commit Bot
parent 3ce01116b6
commit bfd2f1819f
3 changed files with 1 additions and 28 deletions

@ -18,7 +18,6 @@ source_set("common") {
deps = [
"//base",
"//third_party/fuchsia-sdk/sdk:ui_app",
"//third_party/fuchsia-sdk/sdk:ui_viewsv1",
"//url",
]
public_deps = [

@ -66,10 +66,6 @@ WebComponent::WebComponent(
view_provider_binding_ = std::make_unique<
base::fuchsia::ScopedServiceBinding<fuchsia::ui::app::ViewProvider>>(
startup_context()->public_services(), this);
legacy_view_provider_binding_ =
std::make_unique<base::fuchsia::ScopedServiceBinding<
fuchsia::ui::viewsv1::ViewProvider>>(
startup_context()->public_services(), this);
}
}
@ -96,16 +92,6 @@ void WebComponent::CreateView(
view_is_bound_ = true;
}
void WebComponent::CreateView(
fidl::InterfaceRequest<fuchsia::ui::viewsv1token::ViewOwner> view_owner,
fidl::InterfaceRequest<fuchsia::sys::ServiceProvider> services) {
// Cast the ViewOwner request to view_token. This is temporary hack for
// ViewsV2 transition. This version of CreateView() will be removed in the
// future.
CreateView(zx::eventpair(view_owner.TakeChannel().release()),
std::move(services), nullptr);
}
void WebComponent::DestroyComponent(int termination_exit_code,
fuchsia::sys::TerminationReason reason) {
termination_reason_ = reason;

@ -7,7 +7,6 @@
#include <fuchsia/sys/cpp/fidl.h>
#include <fuchsia/ui/app/cpp/fidl.h>
#include <fuchsia/ui/viewsv1/cpp/fidl.h>
#include <lib/fidl/cpp/binding.h>
#include <lib/fidl/cpp/binding_set.h>
#include <memory>
@ -29,11 +28,8 @@ class WebContentRunner;
// resources and service bindings. Runners for specialized web-based content
// (e.g. Cast applications) can extend this class to configure the Frame to
// their needs, publish additional APIs, etc.
// TODO(crbug.com/899348): Remove fuchsia::ui::viewsv1::ViewProvider after
// SCN-1033 is closed.
class WebComponent : public fuchsia::sys::ComponentController,
public fuchsia::ui::app::ViewProvider,
public fuchsia::ui::viewsv1::ViewProvider {
public fuchsia::ui::app::ViewProvider {
public:
// Creates a WebComponent encapsulating a web.Frame. A ViewProvider service
// will be published to the service-directory specified by |startup_context|,
@ -64,11 +60,6 @@ class WebComponent : public fuchsia::sys::ComponentController,
fidl::InterfaceHandle<fuchsia::sys::ServiceProvider> outgoing_services)
override;
// fuchsia::ui::viewsv1::ViewProvider implementation.
void CreateView(
fidl::InterfaceRequest<fuchsia::ui::viewsv1token::ViewOwner> view_owner,
fidl::InterfaceRequest<fuchsia::sys::ServiceProvider> services) override;
// Reports the supplied exit-code and reason to the |controller_binding_| and
// requests that the |runner_| delete this component.
virtual void DestroyComponent(int termination_exit_code,
@ -98,9 +89,6 @@ class WebComponent : public fuchsia::sys::ComponentController,
std::unique_ptr<
base::fuchsia::ScopedServiceBinding<fuchsia::ui::app::ViewProvider>>
view_provider_binding_;
std::unique_ptr<
base::fuchsia::ScopedServiceBinding<fuchsia::ui::viewsv1::ViewProvider>>
legacy_view_provider_binding_;
// Termination reason and exit-code to be reported via the
// sys::ComponentController::OnTerminated event.