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 module mojo; | 5 module mojo; |
6 | 6 |
7 import "components/view_manager/public/interfaces/surface_id.mojom"; | 7 import "components/view_manager/public/interfaces/surface_id.mojom"; |
8 import "components/view_manager/public/interfaces/native_viewport.mojom"; | |
9 import "components/view_manager/public/interfaces/view_manager_constants.mojom"; | 8 import "components/view_manager/public/interfaces/view_manager_constants.mojom"; |
10 import "mojo/application/public/interfaces/service_provider.mojom"; | 9 import "mojo/application/public/interfaces/service_provider.mojom"; |
11 import "network/public/interfaces/url_loader.mojom"; | 10 import "network/public/interfaces/url_loader.mojom"; |
12 import "ui/mojo/events/input_events.mojom"; | 11 import "ui/mojo/events/input_events.mojom"; |
13 import "ui/mojo/geometry/geometry.mojom"; | 12 import "ui/mojo/geometry/geometry.mojom"; |
14 | 13 |
| 14 struct ViewportMetrics { |
| 15 Size size_in_pixels; |
| 16 // A value of 0 indicates the real value is not yet available. |
| 17 float device_pixel_ratio = 0.0; |
| 18 }; |
| 19 |
15 struct ViewData { | 20 struct ViewData { |
16 uint32 parent_id; | 21 uint32 parent_id; |
17 uint32 view_id; | 22 uint32 view_id; |
18 mojo.Rect bounds; | 23 mojo.Rect bounds; |
19 map<string, array<uint8>> properties; | 24 map<string, array<uint8>> properties; |
20 // True if this view is visible. The view may not be drawn on screen (see | 25 // True if this view is visible. The view may not be drawn on screen (see |
21 // drawn for specifics). | 26 // drawn for specifics). |
22 bool visible; | 27 bool visible; |
23 // True if this view is drawn on screen. A view is drawn if attached to the | 28 // True if this view is drawn on screen. A view is drawn if attached to the |
24 // root and all ancestors (including this view) are visible. | 29 // root and all ancestors (including this view) are visible. |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 246 |
242 // Invoked when a view property is changed. If this change is a removal, | 247 // Invoked when a view property is changed. If this change is a removal, |
243 // |new_data| is null. | 248 // |new_data| is null. |
244 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); | 249 OnViewSharedPropertyChanged(uint32 view, string name, array<uint8>? new_data); |
245 | 250 |
246 // Invoked when an event is targeted at the specified view. | 251 // Invoked when an event is targeted at the specified view. |
247 OnViewInputEvent(uint32 view, mojo.Event event) => (); | 252 OnViewInputEvent(uint32 view, mojo.Event event) => (); |
248 | 253 |
249 OnViewFocused(uint32 focused_view_id); | 254 OnViewFocused(uint32 focused_view_id); |
250 }; | 255 }; |
OLD | NEW |