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

Unified Diff: mojo/services/native_viewport/public/interfaces/native_viewport.mojom

Issue 878933005: Remove NativeViewportClient (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/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();
-};

Powered by Google App Engine
This is Rietveld 408576698