Commit 16530946 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

content-service: removes support for remote-view

ui/views/mus is going away, which means remote-view is about to be removed.

BUG=958241
TEST=covered by tests

Change-Id: I7e82de5838e7c98fb161d2aa9c4620f0b6d917f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603743Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658357}
parent b33fa5be
......@@ -28,7 +28,6 @@
#include "ui/accessibility/ax_node.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/aura/window.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/canvas.h"
#include "ui/views/background.h"
#include "ui/views/layout/fill_layout.h"
......@@ -122,8 +121,6 @@ class SearchResultAnswerCardView::AnswerCardResultView
params->background_color = SK_ColorTRANSPARENT;
contents_ = std::make_unique<content::NavigableContents>(
contents_factory_.get(), std::move(params));
if (features::IsUsingWindowService())
contents_->ForceUseWindowService();
contents_->AddObserver(this);
}
......
......@@ -6,7 +6,6 @@
#include "ash/assistant/ui/assistant_ui_constants.h"
#include "base/base64.h"
#include "ui/base/ui_base_features.h"
namespace ash {
......@@ -66,8 +65,6 @@ void AssistantCardElement::Processor::Process() {
contents_ = std::make_unique<content::NavigableContents>(
contents_factory_, std::move(contents_params));
if (features::IsUsingWindowService())
contents_->ForceUseWindowService();
// Observe |contents_| so that we are notified when loading is complete.
contents_->AddObserver(this);
......
......@@ -16,7 +16,6 @@
#include "base/callback.h"
#include "services/content/public/cpp/navigable_contents_view.h"
#include "ui/aura/window.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
......@@ -146,8 +145,6 @@ void AssistantWebView::OnDeepLinkReceived(
contents_ = std::make_unique<content::NavigableContents>(
contents_factory_.get(), std::move(contents_params));
if (features::IsUsingWindowService())
contents_->ForceUseWindowService();
// We observe |contents_| so that we can handle events from the underlying
// web contents.
......
......@@ -3,7 +3,6 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//services/content/public/features.gni")
source_set("impl") {
visibility = [
......@@ -29,7 +28,6 @@ source_set("impl") {
public_deps = [
"//base",
"//services/content/public/cpp:buildflags",
"//services/service_manager/public/cpp",
"//ui/gfx",
]
......@@ -49,10 +47,6 @@ source_set("impl") {
if (use_aura) {
deps += [ "//ui/aura" ]
}
if (enable_remote_navigable_contents_view) {
deps += [ "//ui/views/mus/remote_view:remote_view_provider" ]
}
}
}
......
......@@ -6,24 +6,14 @@
#include "base/bind.h"
#include "services/content/navigable_contents_delegate.h"
#include "services/content/public/cpp/buildflags.h"
#include "services/content/public/cpp/navigable_contents_view.h"
#include "services/content/service.h"
#include "services/content/service_delegate.h"
#if defined(TOOLKIT_VIEWS)
#include "ui/views/controls/native/native_view_host.h" // nogncheck
#if defined(USE_AURA)
#include "ui/aura/window.h" // nogncheck
#endif
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
#include "ui/base/ui_base_features.h" // nogncheck
#include "ui/views/mus/remote_view/remote_view_provider.h" // nogncheck
#endif
#endif // defined(TOOLKIT_VIEWS)
namespace content {
NavigableContentsImpl::NavigableContentsImpl(
......@@ -58,36 +48,6 @@ void NavigableContentsImpl::GoBack(
delegate_->GoBack(std::move(callback));
}
void NavigableContentsImpl::CreateView(bool use_window_service,
CreateViewCallback callback) {
DCHECK(native_content_view_);
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
if (use_window_service) {
remote_view_provider_ =
std::make_unique<views::RemoteViewProvider>(native_content_view_);
remote_view_provider_->GetEmbedToken(
base::BindOnce(&NavigableContentsImpl::OnEmbedTokenReceived,
base::Unretained(this), std::move(callback)));
return;
}
#else
if (use_window_service) {
DLOG(ERROR) << "Remote NavigableContentsView clients are not supported on "
<< "this platform.";
return;
}
#endif
// Create and stash a new callback (indexed by token) which the in-process
// client library can use to establish an "embedding" of the contents' view.
auto token = base::UnguessableToken::Create();
NavigableContentsView::RegisterInProcessEmbedCallback(
token, base::BindOnce(&NavigableContentsImpl::EmbedInProcessClientView,
weak_ptr_factory_.GetWeakPtr()));
std::move(callback).Run(token);
}
void NavigableContentsImpl::Focus() {
delegate_->Focus();
}
......@@ -96,30 +56,4 @@ void NavigableContentsImpl::FocusThroughTabTraversal(bool reverse) {
delegate_->FocusThroughTabTraversal(reverse);
}
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
void NavigableContentsImpl::OnEmbedTokenReceived(
CreateViewCallback callback,
const base::UnguessableToken& token) {
#if defined(TOOLKIT_VIEWS) && defined(USE_AURA)
DCHECK(native_content_view_);
native_content_view_->Show();
#endif // defined(TOOLKIT_VIEWS) && defined(USE_AURA)
std::move(callback).Run(token);
}
#endif // BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
void NavigableContentsImpl::EmbedInProcessClientView(
NavigableContentsView* view) {
DCHECK(native_content_view_);
#if defined(TOOLKIT_VIEWS) && defined(USE_AURA)
view->native_view()->AddChild(native_content_view_);
native_content_view_->Show();
#else
// TODO(https://crbug.com/855092): Support embedding of other native client
// views without Views + Aura.
NOTREACHED()
<< "NavigableContents views are currently only supported on Views UI.";
#endif
}
} // namespace content
......@@ -12,20 +12,14 @@
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/content/public/cpp/buildflags.h"
#include "services/content/public/mojom/navigable_contents.mojom.h"
#include "services/content/public/mojom/navigable_contents_factory.mojom.h"
#include "ui/gfx/native_widget_types.h"
namespace views {
class RemoteViewProvider;
}
namespace content {
class Service;
class NavigableContentsDelegate;
class NavigableContentsView;
// This is the state which backs an individual NavigableContents owned by some
// client of the Content Service. In terms of the classical Content API, this is
......@@ -43,20 +37,9 @@ class NavigableContentsImpl : public mojom::NavigableContents {
// mojom::NavigableContents:
void Navigate(const GURL& url, mojom::NavigateParamsPtr params) override;
void GoBack(mojom::NavigableContents::GoBackCallback callback) override;
void CreateView(bool in_service_process,
CreateViewCallback callback) override;
void Focus() override;
void FocusThroughTabTraversal(bool reverse) override;
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
void OnEmbedTokenReceived(CreateViewCallback callback,
const base::UnguessableToken& token);
#endif
// Used (indirectly) by the client library when run in the same process as the
// service. See the |CreateView()| implementation for details.
void EmbedInProcessClientView(NavigableContentsView* view);
Service* const service_;
mojo::Receiver<mojom::NavigableContents> receiver_;
......@@ -64,10 +47,6 @@ class NavigableContentsImpl : public mojom::NavigableContents {
std::unique_ptr<NavigableContentsDelegate> delegate_;
gfx::NativeView native_content_view_;
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
std::unique_ptr<views::RemoteViewProvider> remote_view_provider_;
#endif
base::WeakPtrFactory<NavigableContentsImpl> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(NavigableContentsImpl);
......
......@@ -2,12 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//services/content/public/features.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW=$enable_remote_navigable_contents_view" ]
}
import("//build/config/ui.gni")
component("cpp") {
output_name = "content_service_cpp"
......@@ -28,7 +23,6 @@ component("cpp") {
defines = [ "IS_CONTENT_SERVICE_CPP_IMPL" ]
public_deps = [
":buildflags",
"//base",
"//net",
"//services/content/public/mojom",
......@@ -43,13 +37,6 @@ component("cpp") {
deps = []
if (toolkit_views) {
deps += [ "//ui/views" ]
if (enable_remote_navigable_contents_view) {
deps += [
"//services/ws/public/mojom",
"//ui/views/mus/remote_view:remote_view_host",
]
}
}
if (use_aura) {
......
......@@ -34,10 +34,6 @@ void NavigableContents::RemoveObserver(NavigableContentsObserver* observer) {
NavigableContentsView* NavigableContents::GetView() {
if (!view_) {
view_ = base::WrapUnique(new NavigableContentsView(this));
contents_->CreateView(
ShouldUseWindowService(),
base::BindOnce(&NavigableContents::OnEmbedTokenReceived,
base::Unretained(this)));
}
return view_.get();
}
......@@ -64,18 +60,6 @@ void NavigableContents::FocusThroughTabTraversal(bool reverse) {
contents_->FocusThroughTabTraversal(reverse);
}
void NavigableContents::ForceUseWindowService() {
// This should only be called before |view_| is created.
DCHECK(!view_);
force_use_window_service_ = true;
}
bool NavigableContents::ShouldUseWindowService() const {
return !NavigableContentsView::IsClientRunningInServiceProcess() ||
force_use_window_service_;
}
void NavigableContents::ClearViewFocus() {
if (view_)
view_->ClearNativeFocus();
......@@ -115,10 +99,4 @@ void NavigableContents::UpdateContentAXTree(const ui::AXTreeID& id) {
view_->NotifyAccessibilityTreeChange();
}
void NavigableContents::OnEmbedTokenReceived(
const base::UnguessableToken& token) {
DCHECK(view_);
view_->EmbedUsingToken(token);
}
} // namespace content
......@@ -70,13 +70,6 @@ class COMPONENT_EXPORT(CONTENT_SERVICE_CPP) NavigableContents
// being done via Tab-key cycling or a similar mechanism.
void FocusThroughTabTraversal(bool reverse);
// Force NavigableContents to use Window Service for embedding. Note this must
// be called before its view is created.
void ForceUseWindowService();
// Whether to use Window Service for embedding.
bool ShouldUseWindowService() const;
private:
// mojom::NavigableContentsClient:
void ClearViewFocus() override;
......@@ -92,8 +85,6 @@ class COMPONENT_EXPORT(CONTENT_SERVICE_CPP) NavigableContents
bool from_user_gesture) override;
void UpdateContentAXTree(const ui::AXTreeID& id) override;
void OnEmbedTokenReceived(const base::UnguessableToken& token);
mojo::Remote<mojom::NavigableContents> contents_;
mojo::Receiver<mojom::NavigableContentsClient> client_receiver_;
std::unique_ptr<NavigableContentsView> view_;
......@@ -102,8 +93,6 @@ class COMPONENT_EXPORT(CONTENT_SERVICE_CPP) NavigableContents
ui::AXTreeID content_ax_tree_id_;
bool force_use_window_service_ = false;
DISALLOW_COPY_AND_ASSIGN(NavigableContents);
};
......
......@@ -4,14 +4,11 @@
#include "services/content/public/cpp/navigable_contents_view.h"
#include <map>
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/no_destructor.h"
#include "base/synchronization/atomic_flag.h"
#include "base/unguessable_token.h"
#include "services/content/public/cpp/buildflags.h"
#include "services/content/public/cpp/navigable_contents.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
......@@ -20,13 +17,6 @@
#include "ui/views/focus/focus_manager.h" // nogncheck
#include "ui/views/layout/fill_layout.h" // nogncheck
#include "ui/views/view.h" // nogncheck
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
#include "services/ws/public/mojom/window_tree_constants.mojom.h" // nogncheck
#include "ui/base/ui_base_features.h" // nogncheck
#include "ui/views/controls/native/native_view_host.h" // nogncheck
#include "ui/views/mus/remote_view/remote_view_host.h" // nogncheck
#endif // BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
#endif // defined(TOOLKIT_VIEWS)
#if defined(USE_AURA)
......@@ -38,32 +28,11 @@ namespace content {
namespace {
using InProcessEmbeddingMap =
std::map<base::UnguessableToken,
base::OnceCallback<void(NavigableContentsView*)>>;
InProcessEmbeddingMap& GetInProcessEmbeddingMap() {
static base::NoDestructor<InProcessEmbeddingMap> embedding_map;
return *embedding_map;
}
base::AtomicFlag& GetInServiceProcessFlag() {
static base::NoDestructor<base::AtomicFlag> in_service_process;
return *in_service_process;
}
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
std::unique_ptr<NavigableContentsView::RemoteViewManager>&
GetRemoteViewManager() {
static base::NoDestructor<
std::unique_ptr<NavigableContentsView::RemoteViewManager>>
manager;
return *manager;
}
#endif // BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
#if defined(TOOLKIT_VIEWS) && defined(USE_AURA)
// Keeps child windows sized to the same bounds as the owning window.
......@@ -163,18 +132,6 @@ void NavigableContentsView::NotifyAccessibilityTreeChange() {
NavigableContentsView::NavigableContentsView(NavigableContents* contents)
: contents_(contents) {
#if defined(TOOLKIT_VIEWS) && defined(USE_AURA)
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
if (contents_->ShouldUseWindowService()) {
RemoteViewManager* manager = GetRemoteViewManager().get();
if (manager)
view_ = manager->CreateRemoteViewHost();
else
view_ = std::make_unique<views::RemoteViewHost>();
view_->set_owned_by_client();
return;
}
#endif // BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
window_ = std::make_unique<aura::Window>(nullptr);
window_->set_owned_by_parent(false);
window_->SetName("NavigableContentsViewWindow");
......@@ -187,61 +144,4 @@ NavigableContentsView::NavigableContentsView(NavigableContents* contents)
#endif // defined(TOOLKIT_VIEWS) && defined(USE_AURA)
}
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
// static
void NavigableContentsView::SetRemoteViewManager(
std::unique_ptr<RemoteViewManager> manager) {
GetRemoteViewManager() = std::move(manager);
}
#endif // BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
void NavigableContentsView::EmbedUsingToken(
const base::UnguessableToken& token) {
#if defined(TOOLKIT_VIEWS)
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
if (contents_->ShouldUseWindowService()) {
RemoteViewManager* manager = GetRemoteViewManager().get();
if (manager) {
manager->EmbedUsingToken(view_.get(), token);
} else {
constexpr uint32_t kEmbedFlags =
ws::mojom::kEmbedFlagEmbedderInterceptsEvents |
ws::mojom::kEmbedFlagEmbedderControlsVisibility;
static_cast<views::RemoteViewHost*>(view_.get())
->EmbedUsingToken(token, kEmbedFlags, base::DoNothing());
}
return;
}
#endif // BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
DCHECK(IsClientRunningInServiceProcess());
// |token| should already have an embed callback entry in the in-process
// callback map, injected by the in-process Content Service implementation.
auto& embeddings = GetInProcessEmbeddingMap();
auto it = embeddings.find(token);
if (it == embeddings.end()) {
DLOG(ERROR) << "Unable to embed with unknown token " << token.ToString();
return;
}
// Invoke a callback provided by the Content Service's host environment. This
// should parent a web content view to our own |view()|, as well as set
// |native_view_| to the corresponding web contents' own NativeView.
auto callback = std::move(it->second);
embeddings.erase(it);
std::move(callback).Run(this);
#endif // defined(TOOLKIT_VIEWS)
}
// static
void NavigableContentsView::RegisterInProcessEmbedCallback(
const base::UnguessableToken& token,
base::OnceCallback<void(NavigableContentsView*)> callback) {
GetInProcessEmbeddingMap()[token] = std::move(callback);
}
} // namespace content
......@@ -9,8 +9,6 @@
#include "base/callback.h"
#include "base/component_export.h"
#include "base/unguessable_token.h"
#include "services/content/public/cpp/buildflags.h"
#include "ui/gfx/native_widget_types.h"
#if defined(TOOLKIT_VIEWS) && defined(USE_AURA)
......@@ -39,29 +37,6 @@ class NavigableContentsImpl;
// Views UI on Aura.
class COMPONENT_EXPORT(CONTENT_SERVICE_CPP) NavigableContentsView {
public:
#if BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
// May be used if the Content Service client is running within a process whose
// UI environment requires a different remote View implementation from
// the default one. For example, on Chrome OS when Ash and the Window Service
// are running in the same process, the default implementation
// (views::RemoteViewHost) will not work.
class RemoteViewManager {
public:
virtual ~RemoteViewManager() {}
// Creates a new NativeViewHost suitable for remote embedding.
virtual std::unique_ptr<views::NativeViewHost> CreateRemoteViewHost() = 0;
// Initiates an embedding of a remote client -- identified by |token| --
// within |view_host|. Note that |view_host| is always an object returned by
// |CreateRemoteViewHost()| on the same RemoteViewManager.
virtual void EmbedUsingToken(views::NativeViewHost* view_host,
const base::UnguessableToken& token) = 0;
};
static void SetRemoteViewManager(std::unique_ptr<RemoteViewManager> manager);
#endif
~NavigableContentsView();
// Used to set/query whether the calling process is the same process in which
......@@ -91,16 +66,6 @@ class COMPONENT_EXPORT(CONTENT_SERVICE_CPP) NavigableContentsView {
explicit NavigableContentsView(NavigableContents* contents_);
// Establishes a hierarchical relationship between this view's native UI
// object and another native UI object within the Content Service.
void EmbedUsingToken(const base::UnguessableToken& token);
// Used by the service directly when running in the same process. Establishes
// a way for an embed token to be used without the UI service.
static void RegisterInProcessEmbedCallback(
const base::UnguessableToken& token,
base::OnceCallback<void(NavigableContentsView*)> callback);
NavigableContents* const contents_;
#if defined(TOOLKIT_VIEWS) && defined(USE_AURA)
......
......@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/unguessable_token.h"
#include "services/content/public/cpp/navigable_contents_view.h"
#include "services/content/public/cpp/test/fake_navigable_contents_factory.h"
......@@ -43,14 +42,6 @@ void FakeNavigableContents::GoBack(
std::move(callback).Run(false /* success */);
}
void FakeNavigableContents::CreateView(bool in_service_process,
CreateViewCallback callback) {
auto token = base::UnguessableToken::Create();
NavigableContentsView::RegisterInProcessEmbedCallback(token,
base::DoNothing());
std::move(callback).Run(token);
}
void FakeNavigableContents::Focus() {}
void FakeNavigableContents::FocusThroughTabTraversal(bool reverse) {}
......
......@@ -40,8 +40,6 @@ class FakeNavigableContents : public mojom::NavigableContents {
// mojom::NavigableContents:
void Navigate(const GURL& url, mojom::NavigateParamsPtr params) override;
void GoBack(mojom::NavigableContents::GoBackCallback callback) override;
void CreateView(bool in_service_process,
CreateViewCallback callback) override;
void Focus() override;
void FocusThroughTabTraversal(bool reverse) override;
......
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/ui.gni")
declare_args() {
# Determines whether or not the Content Service should support remote
# (i.e., out-of-process) clients embedding NavigableContentsViews within their
# UI. If this is false, only clients in the same process as the Content
# Service may use NavigableContentsView.
#
# Currently only supported on Chrome OS, where |toolkit_views| is implied and
# the UI service (i.e. Mus) is available.
enable_remote_navigable_contents_view = is_chromeos
}
assert(!enable_remote_navigable_contents_view || toolkit_views)
......@@ -4,7 +4,6 @@
module content.mojom;
import "mojo/public/mojom/base/unguessable_token.mojom";
import "services/network/public/mojom/network_param.mojom";
import "ui/accessibility/mojom/ax_tree_id.mojom";
import "ui/base/mojo/window_open_disposition.mojom";
......@@ -32,20 +31,6 @@ interface NavigableContents {
// navigation attempt will fail if the history stack is empty.
GoBack() => (bool success);
// Creates a visual representation of the navigated contents, which is
// maintained by the Content Service. Responds with a |embed_token| which can
// be given to Mus in order to authorize embedding of that visual
// representation within the client application's own window tree.
//
// |use_window_service| is true when the client calling this method wants to
// use Window Service for embedding. This is the case when the client and the
// Content Service are using different window trees.
//
// TODO(https://crbug.com/874143): Remove the |use_window_service| flag once
// we have more widely available UI Service support.
CreateView(bool use_window_service)
=> (mojo_base.mojom.UnguessableToken embed_token);
// Attempts to transfer global input focus to the navigated contents if they
// have an active visual representation.
Focus();
......
......@@ -3,7 +3,6 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//services/content/public/features.gni")
component("simple_browser") {
public = [
......@@ -39,10 +38,6 @@ component("simple_browser") {
deps += [ "//ui/aura" ]
}
if (enable_remote_navigable_contents_view) {
deps += [ "//ui/views/mus" ]
}
if (is_linux) {
public_deps += [
"//components/services/font/public/cpp",
......
......@@ -11,10 +11,6 @@
#include "third_party/skia/include/ports/SkFontConfigInterface.h" // nogncheck
#endif
#if defined(USE_AURA) && BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
#include "ui/views/mus/aura_init.h" // nogncheck
#endif
namespace simple_browser {
SimpleBrowserService::SimpleBrowserService(
......@@ -31,18 +27,6 @@ void SimpleBrowserService::OnStart() {
font_loader_ =
sk_make_sp<font_service::FontLoader>(service_binding_.GetConnector());
SkFontConfigInterface::SetGlobal(font_loader_);
#endif
#if defined(USE_AURA) && BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
views::AuraInit::InitParams params;
params.connector = service_binding_.GetConnector();
params.identity = service_binding_.identity();
params.register_path_provider = false;
aura_init_ = views::AuraInit::Create(params);
CHECK(aura_init_);
#else
NOTREACHED() << "Remote UI embedding not supported on this platform.";
#endif
}
......
......@@ -11,7 +11,6 @@
#include "base/component_export.h"
#include "base/macros.h"
#include "build/build_config.h"
#include "services/content/public/cpp/buildflags.h"
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/cpp/service_binding.h"
#include "services/service_manager/public/mojom/service.mojom.h"
......@@ -20,10 +19,6 @@
#include "components/services/font/public/cpp/font_loader.h" // nogncheck
#endif
namespace views {
class AuraInit;
}
namespace simple_browser {
class Window;
......@@ -57,10 +52,6 @@ class COMPONENT_EXPORT(SIMPLE_BROWSER) SimpleBrowserService
service_manager::ServiceBinding service_binding_;
const UIInitializationMode ui_initialization_mode_;
#if defined(USE_AURA) && BUILDFLAG(ENABLE_REMOTE_NAVIGABLE_CONTENTS_VIEW)
std::unique_ptr<views::AuraInit> aura_init_;
#endif
std::unique_ptr<Window> window_;
DISALLOW_COPY_AND_ASSIGN(SimpleBrowserService);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment