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

Unified Diff: mojo/services/ui/views/interfaces/view_associates.mojom

Issue 1774393002: Mozart: Add ViewInspector contracts for hit testing. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: Created 4 years, 9 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/ui/views/interfaces/view_associates.mojom
diff --git a/mojo/services/ui/views/interfaces/view_associates.mojom b/mojo/services/ui/views/interfaces/view_associates.mojom
index 8b1b712d4db5c16e4bbef194937dd2cb588ec137..4fce660302fb7a7e238436fe7b0872e5faf9879a 100644
--- a/mojo/services/ui/views/interfaces/view_associates.mojom
+++ b/mojo/services/ui/views/interfaces/view_associates.mojom
@@ -6,6 +6,7 @@
module mojo.ui;
import "mojo/public/interfaces/application/service_provider.mojom";
+import "mojo/services/gfx/composition/interfaces/scene_token.mojom";
import "mojo/services/ui/views/interfaces/views.mojom";
import "mojo/services/ui/views/interfaces/view_trees.mojom";
@@ -75,5 +76,28 @@ struct ViewAssociateInfo {
// Provides a view associate with the ability to inspect and perform operations
// on the contents of views and view trees.
interface ViewInspector {
+ // Provides an interface which can be used to perform hit tests on the
+ // contents of the view tree's scene graph.
+ //
+ // The |hit_tester| will be closed if the view tree is not attached to a
+ // renderer, when it is reattached to a different renderer, or when the
+ // view tree is destroyed.
+ //
+ // The callback will be invoked the hit tester is invalidated.
+ // If |renderer_changed| is true, the client should call |GetHitTester|
+ // again to obtain a new one. Otherwise it should assume that the view
+ // tree has become unavailable (so no hit tester is available).
+ GetHitTester(ViewTreeToken view_tree_token,
+ mojo.gfx.composition.HitTester& hit_tester) =>
+ (bool renderer_changed);
+ // Given an array of scene tokens, produces an array of view tokens
+ // of equal size containing the view to which the scene belongs or null
+ // if the scene token does not belong to any view.
+ //
+ // It is safe to cache the results of this operation because a scene will
+ // only ever be associated with at most one view although a view may
+ // create several scenes during its lifetime.
+ ResolveScenes(array<mojo.gfx.composition.SceneToken> scene_tokens) =>
+ (array<ViewToken?> view_tokens);
};
« no previous file with comments | « mojo/dart/packages/mojo_services/lib/mojo/ui/view_associates.mojom.dart ('k') | services/ui/view_manager/view_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698