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

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

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review 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
« no previous file with comments | « mojo/services/html_viewer/html_viewer.cc ('k') | mojo/services/navigation/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..75757c21f4814f24f81243e2ff2377b2f9c5b936 100644
--- a/mojo/services/native_viewport/public/interfaces/native_viewport.mojom
+++ b/mojo/services/native_viewport/public/interfaces/native_viewport.mojom
@@ -14,26 +14,26 @@ 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);
+
Show();
Hide();
Close();
SetSize(Size size);
SubmittedFrame(SurfaceId surface_id);
SetEventDispatcher(NativeViewportEventDispatcher dispatcher);
+
+ // The initial viewport metrics will be sent in the reply to the Create
+ // method. Call RequestMetrics() to receive updates when the viewport metrics
+ // change. The reply will be sent when the viewport metrics are different from
+ // the values last sent, so to receive continuous updates call this method
+ // again after receiving the callback.
+ RequestMetrics() => (ViewportMetrics metrics);
};
interface NativeViewportEventDispatcher {
OnEvent(Event event) => ();
};
-
-interface NativeViewportClient {
- // OnMetricsAvailable() is sent at least once after the callback from Create()
- // is called.
- OnMetricsChanged(ViewportMetrics metrics);
- OnDestroyed();
-};
« no previous file with comments | « mojo/services/html_viewer/html_viewer.cc ('k') | mojo/services/navigation/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698