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

Side by Side Diff: components/view_manager/public/interfaces/native_viewport.mojom

Issue 1164553004: Revert of Mandoline: Remove native_viewport.mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 "components/view_manager/public/interfaces/context_provider.mojom";
8 import "ui/mojo/geometry/geometry.mojom";
9 import "ui/mojo/events/input_events.mojom";
10
11 struct ViewportMetrics {
12 Size size;
13 // A value of 0 indicates the real value is not yet available.
14 float device_pixel_ratio = 0.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) => (ViewportMetrics metrics);
21
22 Show();
23 Hide();
24 Close();
25 SetSize(Size size);
26 SetEventDispatcher(NativeViewportEventDispatcher dispatcher);
27
28 // Requests a ContextProvider capable of producing contexts that draw to
29 // this native viewport.
30 GetContextProvider(ContextProvider& provider);
31
32 // The initial viewport metrics will be sent in the reply to the Create
33 // method. Call RequestMetrics() to receive updates when the viewport metrics
34 // change. The reply will be sent when the viewport metrics are different from
35 // the values last sent, so to receive continuous updates call this method
36 // again after receiving the callback.
37 RequestMetrics() => (ViewportMetrics metrics);
38 };
39
40 interface NativeViewportEventDispatcher {
41 OnEvent(Event event) => ();
42 };
OLDNEW
« no previous file with comments | « components/view_manager/public/interfaces/BUILD.gn ('k') | components/view_manager/public/interfaces/view_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698