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

Side by Side Diff: mojo/services/native_viewport/public/interfaces/native_viewport.mojom

Issue 861683003: Move services code brought in from Mojo to live under //third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module mojo;
6
7 import "geometry/public/interfaces/geometry.mojom";
8 import "gpu/public/interfaces/command_buffer.mojom";
9 import "input_events/public/interfaces/input_events.mojom";
10 import "surfaces/public/interfaces/surface_id.mojom";
11
12 struct ViewportMetrics {
13 Size size;
14 float device_pixel_ratio = 1.0;
15 };
16
17 interface NativeViewport {
18 // TODO(sky): having a create function is awkward. Should there be a factory
19 // to create the NativeViewport that takes the size?
20 Create(Size size) => (uint64 native_viewport_id, ViewportMetrics metrics);
21
22 Show();
23 Hide();
24 Close();
25 SetSize(Size size);
26 SubmittedFrame(SurfaceId surface_id);
27 SetEventDispatcher(NativeViewportEventDispatcher dispatcher);
28
29 // The initial viewport metrics will be sent in the reply to the Create
30 // method. Call RequestMetrics() to receive updates when the viewport metrics
31 // change. The reply will be sent when the viewport metrics are different from
32 // the values last sent, so to receive continuous updates call this method
33 // again after receiving the callback.
34 RequestMetrics() => (ViewportMetrics metrics);
35 };
36
37 interface NativeViewportEventDispatcher {
38 OnEvent(Event event) => ();
39 };
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/public/interfaces/BUILD.gn ('k') | mojo/services/navigation/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698