Index: mojo/services/native_viewport/public/interfaces/native_viewport.mojom |
diff --git a/mojo/services/native_viewport/public/interfaces/native_viewport.mojom b/mojo/services/native_viewport/public/interfaces/native_viewport.mojom |
index 72d3c9d299326d78ba4697b404de46bec1ed0fda..6a1733378f4ac112b00ec7599fe5b34cf2a8a8be 100644 |
--- a/mojo/services/native_viewport/public/interfaces/native_viewport.mojom |
+++ b/mojo/services/native_viewport/public/interfaces/native_viewport.mojom |
@@ -14,11 +14,12 @@ struct ViewportMetrics { |
float device_pixel_ratio = 1.0; |
}; |
-[Client=NativeViewportClient] |
interface NativeViewport { |
// TODO(sky): having a create function is awkward. Should there be a factory |
// to create the NativeViewport that takes the size? |
- Create(Size size) => (uint64 native_viewport_id); |
+ Create(Size size) => (uint64 native_viewport_id, ViewportMetrics metrics); |
+ // Request updated metrics, when they become available. |
+ RequestMetrics() => (ViewportMetrics metrics); |
sky
2015/01/28 19:17:33
With this model how would someone know when the me
|
Show(); |
Hide(); |
Close(); |
@@ -30,10 +31,3 @@ interface NativeViewport { |
interface NativeViewportEventDispatcher { |
OnEvent(Event event) => (); |
}; |
- |
-interface NativeViewportClient { |
- // OnMetricsAvailable() is sent at least once after the callback from Create() |
- // is called. |
- OnMetricsChanged(ViewportMetrics metrics); |
- OnDestroyed(); |
-}; |