| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 [DartUriBase="mojo/services/native_viewport/public/interfaces"] |
| 5 module mojo; | 6 module mojo; |
| 6 | 7 |
| 7 import "geometry/public/interfaces/geometry.mojom"; | 8 import "geometry/public/interfaces/geometry.mojom"; |
| 8 import "gpu/public/interfaces/context_provider.mojom"; | 9 import "gpu/public/interfaces/context_provider.mojom"; |
| 9 import "input_events/public/interfaces/input_events.mojom"; | 10 import "input_events/public/interfaces/input_events.mojom"; |
| 10 | 11 |
| 11 struct ViewportMetrics { | 12 struct ViewportMetrics { |
| 12 Size size; | 13 Size size; |
| 13 float device_pixel_ratio = 1.0; | 14 float device_pixel_ratio = 1.0; |
| 14 }; | 15 }; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 32 // method. Call RequestMetrics() to receive updates when the viewport metrics | 33 // method. Call RequestMetrics() to receive updates when the viewport metrics |
| 33 // change. The reply will be sent when the viewport metrics are different from | 34 // change. The reply will be sent when the viewport metrics are different from |
| 34 // the values last sent, so to receive continuous updates call this method | 35 // the values last sent, so to receive continuous updates call this method |
| 35 // again after receiving the callback. | 36 // again after receiving the callback. |
| 36 RequestMetrics() => (ViewportMetrics metrics); | 37 RequestMetrics() => (ViewportMetrics metrics); |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 interface NativeViewportEventDispatcher { | 40 interface NativeViewportEventDispatcher { |
| 40 OnEvent(Event event) => (); | 41 OnEvent(Event event) => (); |
| 41 }; | 42 }; |
| OLD | NEW |