summaryrefslogtreecommitdiffstats
path: root/mandoline
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-06-09 19:30:43 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-10 02:31:33 +0000
commit4f36e252548209ff1a9d7e2cb7102030091e5bde (patch)
tree59808a7d2dfbd53c7e62f23ed59db4350922c69d /mandoline
parenta3f9ce68305e886bbe39f0391dc16e9e4f77839d (diff)
downloadchromium_src-4f36e252548209ff1a9d7e2cb7102030091e5bde.zip
chromium_src-4f36e252548209ff1a9d7e2cb7102030091e5bde.tar.gz
chromium_src-4f36e252548209ff1a9d7e2cb7102030091e5bde.tar.bz2
Removes ServiceProviders from ViewManager::Embed
We're left with the following: . Embed(ViewManagerClientPtr client) . EmbedAllowingReembed(mojo::URLRequestPtr request): this variant walks the frame tree for the first ancestor marked as an embed root and asks it for the ViewManagerclient to embed. BUG=497855 TEST=covered by tests R=ben@chromium.org Review URL: https://codereview.chromium.org/1166123005 Cr-Commit-Position: refs/heads/master@{#333660}
Diffstat (limited to 'mandoline')
-rw-r--r--mandoline/tab/BUILD.gn7
-rw-r--r--mandoline/tab/DEPS1
-rw-r--r--mandoline/tab/frame_apptest.cc4
-rw-r--r--mandoline/tab/frame_connection.cc27
-rw-r--r--mandoline/tab/frame_connection.h49
-rw-r--r--mandoline/tab/frame_services.cc31
-rw-r--r--mandoline/tab/frame_services.h38
-rw-r--r--mandoline/ui/browser/BUILD.gn2
-rw-r--r--mandoline/ui/browser/browser.cc77
-rw-r--r--mandoline/ui/browser/browser.h23
-rw-r--r--mandoline/ui/browser/merged_service_provider.cc35
-rw-r--r--mandoline/ui/browser/merged_service_provider.h41
-rw-r--r--mandoline/ui/browser/view_embedder.mojom5
-rw-r--r--mandoline/ui/omnibox/omnibox_impl.cc6
-rw-r--r--mandoline/ui/omnibox/omnibox_impl.h4
15 files changed, 127 insertions, 223 deletions
diff --git a/mandoline/tab/BUILD.gn b/mandoline/tab/BUILD.gn
index 2ba6298..5009438 100644
--- a/mandoline/tab/BUILD.gn
+++ b/mandoline/tab/BUILD.gn
@@ -8,8 +8,8 @@ source_set("tab") {
sources = [
"frame.cc",
"frame.h",
- "frame_services.cc",
- "frame_services.h",
+ "frame_connection.cc",
+ "frame_connection.h",
"frame_tree.cc",
"frame_tree.h",
"frame_tree_delegate.h",
@@ -20,8 +20,9 @@ source_set("tab") {
"//base",
"//components/view_manager/public/cpp",
"//mandoline/tab/public/interfaces",
- "//mojo/application/public/cpp",
+ "//mojo/application/public/cpp:sources",
"//mojo/application/public/interfaces",
+ "//mojo/services/network/public/interfaces",
"//third_party/mojo/src/mojo/public/cpp/bindings",
]
}
diff --git a/mandoline/tab/DEPS b/mandoline/tab/DEPS
index b13593c..192c8b5 100644
--- a/mandoline/tab/DEPS
+++ b/mandoline/tab/DEPS
@@ -1,5 +1,6 @@
include_rules = [
"+components/view_manager/public",
"+mojo/application/public",
+ "+mojo/services/network/public/interfaces",
"+third_party/mojo/src/mojo/public",
]
diff --git a/mandoline/tab/frame_apptest.cc b/mandoline/tab/frame_apptest.cc
index 4c1ec9d..d71e20c 100644
--- a/mandoline/tab/frame_apptest.cc
+++ b/mandoline/tab/frame_apptest.cc
@@ -90,9 +90,7 @@ class FrameTest : public mojo::test::ApplicationTestBase,
ApplicationDelegate* GetApplicationDelegate() override { return this; }
// Overridden from ViewManagerDelegate:
- void OnEmbed(View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override {
+ void OnEmbed(View* root) override {
most_recent_view_manager_ = root->view_manager();
QuitRunLoop();
}
diff --git a/mandoline/tab/frame_connection.cc b/mandoline/tab/frame_connection.cc
new file mode 100644
index 0000000..36e6234
--- /dev/null
+++ b/mandoline/tab/frame_connection.cc
@@ -0,0 +1,27 @@
+// Copyright 2015 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.
+
+#include "mandoline/tab/frame_connection.h"
+
+#include "mojo/application/public/cpp/application_connection.h"
+#include "mojo/application/public/cpp/application_impl.h"
+
+namespace mandoline {
+
+FrameConnection::FrameConnection() : application_connection_(nullptr) {
+}
+
+FrameConnection::~FrameConnection() {
+}
+
+void FrameConnection::Init(mojo::ApplicationImpl* app,
+ mojo::URLRequestPtr request,
+ mojo::ViewManagerClientPtr* view_manage_client) {
+ DCHECK(!application_connection_);
+ application_connection_ = app->ConnectToApplication(request.Pass());
+ application_connection_->ConnectToService(view_manage_client);
+ application_connection_->ConnectToService(&frame_tree_client_);
+}
+
+} // namespace mandoline
diff --git a/mandoline/tab/frame_connection.h b/mandoline/tab/frame_connection.h
new file mode 100644
index 0000000..2ff44f8
--- /dev/null
+++ b/mandoline/tab/frame_connection.h
@@ -0,0 +1,49 @@
+// Copyright 2015 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.
+
+#ifndef MANDOLINE_TAB_FRAME_CONNECTION_H_
+#define MANDOLINE_TAB_FRAME_CONNECTION_H_
+
+#include "base/basictypes.h"
+#include "components/view_manager/public/interfaces/view_manager.mojom.h"
+#include "mandoline/tab/frame_user_data.h"
+#include "mandoline/tab/public/interfaces/frame_tree.mojom.h"
+#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
+
+namespace mojo {
+class ApplicationConnection;
+class ApplicationImpl;
+}
+
+namespace mandoline {
+
+// FrameConnection is a FrameUserData that manages the connection to a
+// particular frame. It is also responsible for obtaining the necessary
+// services from the remote side.
+class FrameConnection : public FrameUserData {
+ public:
+ FrameConnection();
+ ~FrameConnection() override;
+
+ void Init(mojo::ApplicationImpl* app,
+ mojo::URLRequestPtr request,
+ mojo::ViewManagerClientPtr* view_manage_client);
+
+ FrameTreeClient* frame_tree_client() { return frame_tree_client_.get(); }
+
+ mojo::ApplicationConnection* application_connection() {
+ return application_connection_;
+ }
+
+ private:
+ FrameTreeClientPtr frame_tree_client_;
+ // TODO(sky): needs to be destroyed when connection lost.
+ mojo::ApplicationConnection* application_connection_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameConnection);
+};
+
+} // namespace mandoline
+
+#endif // MANDOLINE_TAB_FRAME_CONNECTION_H_
diff --git a/mandoline/tab/frame_services.cc b/mandoline/tab/frame_services.cc
deleted file mode 100644
index ea64a41..0000000
--- a/mandoline/tab/frame_services.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2015 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.
-
-#include "mandoline/tab/frame_services.h"
-
-#include "mojo/application/public/cpp/connect.h"
-
-namespace mandoline {
-
-FrameServices::FrameServices() {
-}
-
-FrameServices::~FrameServices() {
-}
-
-void FrameServices::Init(
- mojo::InterfaceRequest<mojo::ServiceProvider>* services,
- mojo::ServiceProviderPtr* exposed_services) {
- *services = GetProxy(&services_).Pass();
-
- if (exposed_services) {
- mojo::ServiceProviderPtr exposed_services_ptr;
- exposed_services_.Bind(GetProxy(&exposed_services_ptr));
- *exposed_services = exposed_services_ptr.Pass();
- }
-
- mojo::ConnectToService(services_.get(), &frame_tree_client_);
-}
-
-} // namespace mandoline
diff --git a/mandoline/tab/frame_services.h b/mandoline/tab/frame_services.h
deleted file mode 100644
index fc7ea65..0000000
--- a/mandoline/tab/frame_services.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 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.
-
-#ifndef MANDOLINE_TAB_FRAME_SERVICES_H_
-#define MANDOLINE_TAB_FRAME_SERVICES_H_
-
-#include "base/basictypes.h"
-#include "mandoline/tab/frame_user_data.h"
-#include "mandoline/tab/public/interfaces/frame_tree.mojom.h"
-#include "mojo/application/public/cpp/service_provider_impl.h"
-
-namespace mandoline {
-
-// FrameServices is a FrameUserData that manages the ServiceProviders exposed
-// to each client. It is also responsible for obtaining the FrameTreeClient
-// from the remote side.
-class FrameServices : public FrameUserData {
- public:
- FrameServices();
- ~FrameServices() override;
-
- void Init(mojo::InterfaceRequest<mojo::ServiceProvider>* services,
- mojo::ServiceProviderPtr* exposed_services);
-
- FrameTreeClient* frame_tree_client() { return frame_tree_client_.get(); }
-
- private:
- mojo::ServiceProviderImpl exposed_services_;
- mojo::ServiceProviderPtr services_;
- FrameTreeClientPtr frame_tree_client_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameServices);
-};
-
-} // namespace mandoline
-
-#endif // MANDOLINE_TAB_FRAME_SERVICES_H_
diff --git a/mandoline/ui/browser/BUILD.gn b/mandoline/ui/browser/BUILD.gn
index 2d5908ba..9b09815 100644
--- a/mandoline/ui/browser/BUILD.gn
+++ b/mandoline/ui/browser/BUILD.gn
@@ -26,8 +26,6 @@ source_set("lib") {
sources = [
"browser.cc",
"browser.h",
- "merged_service_provider.cc",
- "merged_service_provider.h",
"navigator_host_impl.cc",
"navigator_host_impl.h",
]
diff --git a/mandoline/ui/browser/browser.cc b/mandoline/ui/browser/browser.cc
index 50c774c..b357dfd 100644
--- a/mandoline/ui/browser/browser.cc
+++ b/mandoline/ui/browser/browser.cc
@@ -9,10 +9,9 @@
#include "components/view_manager/public/cpp/view.h"
#include "components/view_manager/public/cpp/view_manager_init.h"
#include "mandoline/tab/frame.h"
-#include "mandoline/tab/frame_services.h"
+#include "mandoline/tab/frame_connection.h"
#include "mandoline/tab/frame_tree.h"
#include "mandoline/ui/browser/browser_ui.h"
-#include "mandoline/ui/browser/merged_service_provider.h"
#include "mojo/application/public/cpp/application_runner.h"
#include "mojo/common/common_type_converters.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
@@ -39,7 +38,6 @@ Browser::Browser()
omnibox_(nullptr),
navigator_host_(this),
app_(nullptr) {
- exposed_services_impl_.AddService<mojo::NavigatorHost>(this);
}
Browser::~Browser() {
@@ -50,7 +48,7 @@ Browser::~Browser() {
}
void Browser::ReplaceContentWithRequest(mojo::URLRequestPtr request) {
- Embed(request.Pass(), nullptr, nullptr);
+ Embed(request.Pass());
}
void Browser::Initialize(mojo::ApplicationImpl* app) {
@@ -84,10 +82,7 @@ bool Browser::ConfigureOutgoingConnection(
return true;
}
-void Browser::OnEmbed(
- mojo::View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) {
+void Browser::OnEmbed(mojo::View* root) {
// Browser does not support being embedded more than once.
CHECK(!root_);
@@ -113,24 +108,26 @@ void Browser::OnEmbed(
// Now that we're ready, either load a pending url or the default url.
if (pending_request_) {
- Embed(pending_request_.Pass(), services.Pass(), exposed_services.Pass());
+ Embed(pending_request_.Pass());
} else if (!default_url_.empty()) {
mojo::URLRequestPtr request(mojo::URLRequest::New());
request->url = mojo::String::From(default_url_);
- Embed(request.Pass(), services.Pass(), exposed_services.Pass());
+ Embed(request.Pass());
}
}
-bool Browser::OnWillEmbed(
- mojo::View* view,
- mojo::InterfaceRequest<mojo::ServiceProvider>* services,
- mojo::ServiceProviderPtr* exposed_services) {
+void Browser::OnEmbedForDescendant(mojo::View* view,
+ mojo::URLRequestPtr request,
+ mojo::ViewManagerClientPtr* client) {
// TODO(sky): move this to Frame/FrameTree.
Frame* frame = Frame::FindFirstFrameAncestor(view);
if (!frame) {
// TODO(sky): add requestor url so that we can return false if it's not
// an app we expect.
- return true;
+ mojo::ApplicationConnection* connection =
+ app_->ConnectToApplication(request.Pass());
+ connection->ConnectToService(client);
+ return;
}
Frame* parent = frame;
@@ -141,12 +138,11 @@ bool Browser::OnWillEmbed(
frame = nullptr;
}
- scoped_ptr<FrameServices> frame_services(new FrameServices);
- frame_services->Init(services, exposed_services);
- FrameTreeClient* frame_tree_client = frame_services->frame_tree_client();
- frame_tree_->CreateAndAddFrame(view, parent, frame_tree_client,
- frame_services.Pass());
- return true;
+ scoped_ptr<FrameConnection> frame_connection(new FrameConnection);
+ frame_connection->Init(app_, request.Pass(), client);
+ frame_tree_->CreateAndAddFrame(view, parent,
+ frame_connection->frame_tree_client(),
+ frame_connection.Pass());
}
void Browser::OnViewManagerDestroyed(mojo::ViewManager* view_manager) {
@@ -168,12 +164,10 @@ void Browser::OpenURL(const mojo::String& url) {
ReplaceContentWithRequest(request.Pass());
}
-void Browser::Embed(mojo::URLRequestPtr request,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) {
- std::string string_url = request->url.To<std::string>();
+void Browser::Embed(mojo::URLRequestPtr request) {
+ const std::string string_url = request->url.To<std::string>();
if (string_url == "mojo:omnibox") {
- ShowOmnibox(request.Pass(), services.Pass(), exposed_services.Pass());
+ ShowOmnibox(request.Pass());
return;
}
@@ -191,17 +185,15 @@ void Browser::Embed(mojo::URLRequestPtr request,
if (changed)
ui_->OnURLChanged();
- merged_service_provider_.reset(
- new MergedServiceProvider(exposed_services.Pass(), this));
- scoped_ptr<FrameServices> frame_services(new FrameServices);
- // TODO(sky): FrameServices and MergedServiceProvider need to be combined.
- // TODO(sky): FrameServices needs to man in the middle services.
- frame_services->Init(&services, nullptr);
- FrameTreeClient* frame_tree_client = frame_services->frame_tree_client();
- frame_tree_.reset(new FrameTree(content_, nullptr, frame_tree_client,
- frame_services.Pass()));
- content_->Embed(request.Pass(), services.Pass(),
- merged_service_provider_->GetServiceProviderPtr().Pass());
+ scoped_ptr<FrameConnection> frame_connection(new FrameConnection);
+ mojo::ViewManagerClientPtr view_manager_client;
+ frame_connection->Init(app_, request.Pass(), &view_manager_client);
+ frame_connection->application_connection()->AddService<mojo::NavigatorHost>(
+ this);
+ frame_tree_.reset(new FrameTree(content_, nullptr,
+ frame_connection->frame_tree_client(),
+ frame_connection.Pass()));
+ content_->Embed(view_manager_client.Pass());
navigator_host_.RecordNavigation(gurl.spec());
}
@@ -216,17 +208,18 @@ void Browser::Create(mojo::ApplicationConnection* connection,
view_embedder_bindings_.AddBinding(this, request.Pass());
}
-void Browser::ShowOmnibox(
- mojo::URLRequestPtr request,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) {
+void Browser::ShowOmnibox(mojo::URLRequestPtr request) {
if (!omnibox_) {
omnibox_ = root_->view_manager()->CreateView();
root_->AddChild(omnibox_);
omnibox_->SetVisible(true);
omnibox_->SetBounds(root_->bounds());
}
- omnibox_->Embed(request.Pass(), services.Pass(), exposed_services.Pass());
+ mojo::ViewManagerClientPtr view_manager_client;
+ mojo::ApplicationConnection* connection =
+ app_->ConnectToApplication(request.Pass());
+ connection->ConnectToService(&view_manager_client);
+ omnibox_->Embed(view_manager_client.Pass());
}
} // namespace mandoline
diff --git a/mandoline/ui/browser/browser.h b/mandoline/ui/browser/browser.h
index 3728f3a..47cc0a3 100644
--- a/mandoline/ui/browser/browser.h
+++ b/mandoline/ui/browser/browser.h
@@ -15,7 +15,6 @@
#include "mojo/application/public/cpp/application_delegate.h"
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/connect.h"
-#include "mojo/application/public/cpp/service_provider_impl.h"
#include "mojo/common/weak_binding_set.h"
#include "ui/mojo/events/input_events.mojom.h"
#include "url/gurl.h"
@@ -28,7 +27,6 @@ namespace mandoline {
class BrowserUI;
class FrameTree;
-class MergedServiceProvider;
class Browser : public mojo::ApplicationDelegate,
public mojo::ViewManagerDelegate,
@@ -57,12 +55,10 @@ class Browser : public mojo::ApplicationDelegate,
mojo::ApplicationConnection* connection) override;
// Overridden from mojo::ViewManagerDelegate:
- void OnEmbed(mojo::View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override;
- bool OnWillEmbed(mojo::View* view,
- mojo::InterfaceRequest<mojo::ServiceProvider>* services,
- mojo::ServiceProviderPtr* exposed_services) override;
+ void OnEmbed(mojo::View* root) override;
+ void OnEmbedForDescendant(mojo::View* view,
+ mojo::URLRequestPtr request,
+ mojo::ViewManagerClientPtr* client) override;
void OnViewManagerDestroyed(mojo::ViewManager* view_manager) override;
// Overridden from ViewManagerRootClient:
@@ -72,9 +68,7 @@ class Browser : public mojo::ApplicationDelegate,
void OpenURL(const mojo::String& url) override;
// Overridden from ViewEmbedder:
- void Embed(mojo::URLRequestPtr request,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override;
+ void Embed(mojo::URLRequestPtr request) override;
// Overridden from mojo::InterfaceFactory<mojo::NavigatorHost>:
void Create(mojo::ApplicationConnection* connection,
@@ -84,9 +78,7 @@ class Browser : public mojo::ApplicationDelegate,
void Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<ViewEmbedder> request) override;
- void ShowOmnibox(mojo::URLRequestPtr request,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services);
+ void ShowOmnibox(mojo::URLRequestPtr request);
scoped_ptr<mojo::ViewManagerInit> view_manager_init_;
@@ -98,9 +90,6 @@ class Browser : public mojo::ApplicationDelegate,
std::string default_url_;
mojo::URLRequestPtr pending_request_;
- mojo::ServiceProviderImpl exposed_services_impl_;
- scoped_ptr<MergedServiceProvider> merged_service_provider_;
-
mojo::WeakBindingSet<ViewEmbedder> view_embedder_bindings_;
NavigatorHostImpl navigator_host_;
diff --git a/mandoline/ui/browser/merged_service_provider.cc b/mandoline/ui/browser/merged_service_provider.cc
deleted file mode 100644
index fe4a83a..0000000
--- a/mandoline/ui/browser/merged_service_provider.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2015 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.
-
-#include "mandoline/ui/browser/merged_service_provider.h"
-
-namespace mandoline {
-
-MergedServiceProvider::MergedServiceProvider(
- mojo::ServiceProviderPtr exposed_services,
- mojo::InterfaceFactory<mojo::NavigatorHost>* factory)
- : exposed_services_(exposed_services.Pass()), factory_(factory) {
-}
-
-MergedServiceProvider::~MergedServiceProvider() {
-}
-
-mojo::ServiceProviderPtr MergedServiceProvider::GetServiceProviderPtr() {
- mojo::ServiceProviderPtr sp;
- binding_.reset(new mojo::Binding<mojo::ServiceProvider>(this, GetProxy(&sp)));
- return sp.Pass();
-}
-
-void MergedServiceProvider::ConnectToService(
- const mojo::String& interface_name,
- mojo::ScopedMessagePipeHandle pipe) {
- if (interface_name == mojo::NavigatorHost::Name_) {
- factory_->Create(nullptr,
- mojo::MakeRequest<mojo::NavigatorHost>(pipe.Pass()));
- } else if (exposed_services_.get()) {
- exposed_services_->ConnectToService(interface_name, pipe.Pass());
- }
-}
-
-} // namespace mandoline
diff --git a/mandoline/ui/browser/merged_service_provider.h b/mandoline/ui/browser/merged_service_provider.h
deleted file mode 100644
index 20a94d5..0000000
--- a/mandoline/ui/browser/merged_service_provider.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2015 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.
-
-#ifndef MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_
-#define MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "mandoline/services/navigation/public/interfaces/navigation.mojom.h"
-#include "mojo/application/public/cpp/interface_factory.h"
-#include "mojo/application/public/interfaces/service_provider.mojom.h"
-#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
-
-namespace mandoline {
-
-// Used to wrap the second incoming WindowManager Embed() "exposed_services"
-// parameter with a new ServiceProvider that adds the Browser's
-// NavigatorHost service.
-class MergedServiceProvider : public mojo::ServiceProvider {
- public:
- MergedServiceProvider(mojo::ServiceProviderPtr exposed_services,
- mojo::InterfaceFactory<mojo::NavigatorHost>* factory);
- ~MergedServiceProvider() override;
-
- mojo::ServiceProviderPtr GetServiceProviderPtr();
-
- private:
- // mojo::ServiceProvider:
- void ConnectToService(const mojo::String& interface_name,
- mojo::ScopedMessagePipeHandle pipe) override;
-
- mojo::ServiceProviderPtr exposed_services_;
- mojo::InterfaceFactory<mojo::NavigatorHost>* factory_;
- scoped_ptr<mojo::Binding<ServiceProvider>> binding_;
-
- DISALLOW_COPY_AND_ASSIGN(MergedServiceProvider);
-};
-
-} // namespace mandoline
-
-#endif // MANDOLINE_UI_BROWSER_MERGED_SERVICE_PROVIDER_H_
diff --git a/mandoline/ui/browser/view_embedder.mojom b/mandoline/ui/browser/view_embedder.mojom
index c71bb5e..693dfee 100644
--- a/mandoline/ui/browser/view_embedder.mojom
+++ b/mandoline/ui/browser/view_embedder.mojom
@@ -4,11 +4,8 @@
module mandoline;
-import "mojo/application/public/interfaces/service_provider.mojom";
import "network/public/interfaces/url_loader.mojom";
interface ViewEmbedder {
- Embed(mojo.URLRequest request,
- mojo.ServiceProvider&? services,
- mojo.ServiceProvider? exposed_services);
+ Embed(mojo.URLRequest request);
};
diff --git a/mandoline/ui/omnibox/omnibox_impl.cc b/mandoline/ui/omnibox/omnibox_impl.cc
index edeef04..0509693 100644
--- a/mandoline/ui/omnibox/omnibox_impl.cc
+++ b/mandoline/ui/omnibox/omnibox_impl.cc
@@ -51,9 +51,7 @@ bool OmniboxImpl::ConfigureOutgoingConnection(
////////////////////////////////////////////////////////////////////////////////
// OmniboxImpl, mojo::ViewManagerDelegate implementation:
-void OmniboxImpl::OnEmbed(mojo::View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) {
+void OmniboxImpl::OnEmbed(mojo::View* root) {
if (!aura_init_.get()) {
aura_init_.reset(new AuraInit(app_impl_->shell()));
edit_ = new views::Textfield;
@@ -138,7 +136,7 @@ void OmniboxImpl::ShowForURL(const mojo::String& url) {
url_ = url;
mojo::URLRequestPtr request(mojo::URLRequest::New());
request->url = mojo::String::From("mojo:omnibox");
- view_embedder_->Embed(request.Pass(), nullptr, nullptr);
+ view_embedder_->Embed(request.Pass());
}
} // namespace mandoline
diff --git a/mandoline/ui/omnibox/omnibox_impl.h b/mandoline/ui/omnibox/omnibox_impl.h
index d6206d4..249b6dd 100644
--- a/mandoline/ui/omnibox/omnibox_impl.h
+++ b/mandoline/ui/omnibox/omnibox_impl.h
@@ -41,9 +41,7 @@ class OmniboxImpl : public mojo::ApplicationDelegate,
mojo::ApplicationConnection* connection) override;
// Overridden from mojo::ViewManagerDelegate:
- void OnEmbed(mojo::View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override;
+ void OnEmbed(mojo::View* root) override;
void OnViewManagerDestroyed(mojo::ViewManager* view_manager) override;
// Overridden from views::LayoutManager: