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