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

Unified Diff: sky/viewer/document_view.h

Issue 958673002: Added ServiceRegistry interface (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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: sky/viewer/document_view.h
diff --git a/sky/viewer/document_view.h b/sky/viewer/document_view.h
index aab629561de893a3c885274a118566f0f8d06390..c362d936f869f6305070a46af49e3bfffe8b3758 100644
--- a/sky/viewer/document_view.h
+++ b/sky/viewer/document_view.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/application/lazy_interface_ptr.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
+#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_impl.h"
#include "mojo/public/interfaces/application/application.mojom.h"
#include "mojo/services/content_handler/public/interfaces/content_handler.mojom.h"
@@ -22,6 +23,7 @@
#include "sky/engine/public/platform/ServiceProvider.h"
#include "sky/engine/public/web/WebFrameClient.h"
#include "sky/engine/public/web/WebViewClient.h"
+#include "sky/services/service_registry/service_registry.mojom.h"
#include "sky/services/testing/test_harness.mojom.h"
#include "ui/events/gestures/gesture_types.h"
@@ -71,6 +73,7 @@ class DocumentView : public blink::ServiceProvider,
TestHarnessPtr TakeTestHarness();
mojo::ScopedMessagePipeHandle TakeServicesProvidedToEmbedder();
mojo::ScopedMessagePipeHandle TakeServicesProvidedByEmbedder();
+ mojo::ScopedMessagePipeHandle TakeServiceRegistry();
private:
// WebViewClient methods:
@@ -122,8 +125,11 @@ class DocumentView : public blink::ServiceProvider,
void UpdateRootSizeAndViewportMetrics(const mojo::Rect& new_bounds);
+ void InitServiceRegistry();
+
mojo::URLResponsePtr response_;
mojo::ServiceProviderImpl exported_services_;
+ mojo::ServiceProviderPtr imported_services_;
mojo::InterfaceRequest<mojo::ServiceProvider> services_provided_to_embedder_;
mojo::ServiceProviderPtr services_provided_by_embedder_;
mojo::Shell* shell_;
@@ -135,7 +141,9 @@ class DocumentView : public blink::ServiceProvider,
scoped_ptr<LayerHost> layer_host_;
scoped_refptr<Layer> root_layer_;
RasterizerBitmap* bitmap_rasterizer_; // Used for pixel tests.
-
+ ServiceRegistryPtr service_registry_;
+ scoped_ptr<mojo::Binding<mojo::ServiceProvider>>
+ service_registry_service_provider_binding_;
base::WeakPtrFactory<DocumentView> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DocumentView);

Powered by Google App Engine
This is Rietveld 408576698