OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 module sky; | 5 module sky; |
6 | 6 |
7 import "sky/services/engine/input_event.mojom"; | 7 import "sky/services/engine/input_event.mojom"; |
8 | 8 |
| 9 struct ViewportMetrics { |
| 10 int32 physical_width; |
| 11 int32 physical_height; |
| 12 float device_pixel_ratio = 1.0; |
| 13 double padding_top; |
| 14 double padding_right; |
| 15 double padding_bottom; |
| 16 double padding_left; |
| 17 }; |
| 18 |
9 interface SkyEngine { | 19 interface SkyEngine { |
10 OnViewportMetricsChanged(int32 width, int32 height, float device_pixel_ratio); | 20 OnViewportMetricsChanged(ViewportMetrics metrics); |
11 OnInputEvent(InputEvent event); | 21 OnInputEvent(InputEvent event); |
12 | 22 |
13 RunFromNetwork(string url); | 23 RunFromNetwork(string url); |
14 RunFromFile(string main, string package_root); | 24 RunFromFile(string main, string package_root); |
15 RunFromSnapshot(string path); | 25 RunFromSnapshot(string path); |
16 RunFromBundle(string path); | 26 RunFromBundle(string path); |
17 }; | 27 }; |
OLD | NEW |