Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: mojo/services/window_manager/window_manager_api_unittest.cc

Issue 433513005: Pass ServiceProvider thru ViewManagerService::Embed() allowing embedder & embeddee to expose servic… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/window_manager/window_manager_api_unittest.cc
diff --git a/mojo/services/window_manager/window_manager_api_unittest.cc b/mojo/services/window_manager/window_manager_api_unittest.cc
index 017b76b826ac06920fc1bae3993ab7b13390240a..4450c3b23b5380f389dd284e753bcd03c6e498e4 100644
--- a/mojo/services/window_manager/window_manager_api_unittest.cc
+++ b/mojo/services/window_manager/window_manager_api_unittest.cc
@@ -6,6 +6,8 @@
#include "base/memory/scoped_vector.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
+#include "mojo/public/cpp/application/service_provider_impl.h"
+#include "mojo/public/interfaces/application/service_provider.mojom.h"
#include "mojo/service_manager/service_manager.h"
#include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/types.h"
@@ -37,7 +39,9 @@ bool InitEmbed(ViewManagerInitService* view_manager_init,
const std::string& url) {
bool result = false;
base::RunLoop run_loop;
- view_manager_init->Embed(url,
+ ServiceProviderPtr sp;
+ BindToProxy(new ServiceProviderImpl, &sp);
+ view_manager_init->Embed(url, sp.Pass(),
base::Bind(&ResultCallback, &result, &run_loop));
run_loop.Run();
return result;
@@ -147,7 +151,11 @@ class TestServiceLoader : public ServiceLoader,
}
// Overridden from ViewManagerDelegate:
- virtual void OnEmbed(ViewManager* view_manager, Node* root) MOJO_OVERRIDE {
+ virtual void OnEmbed(
+ ViewManager* view_manager,
+ Node* root,
+ ServiceProviderImpl* exported_services,
+ scoped_ptr<ServiceProvider> imported_services) MOJO_OVERRIDE {
root_added_callback_.Run(root);
}
virtual void OnViewManagerDisconnected(
« no previous file with comments | « mojo/services/view_manager/view_manager_unittest.cc ('k') | mojo/services/window_manager/window_manager_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698