| 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 // IPC messages for page load metrics. | 5 // IPC messages for page load metrics. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "chrome/common/page_load_metrics/page_load_metrics_param_traits.h" |
| 9 #include "chrome/common/page_load_metrics/page_load_timing.h" | 10 #include "chrome/common/page_load_metrics/page_load_timing.h" |
| 10 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
| 11 | 12 |
| 12 #define IPC_MESSAGE_START PageLoadMetricsMsgStart | 13 #define IPC_MESSAGE_START PageLoadMetricsMsgStart |
| 13 | 14 |
| 14 // See comments in page_load_timing.h for details on each field. | 15 // See comments in page_load_timing.h for details on each field. |
| 15 | 16 |
| 16 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::DocumentTiming) | 17 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::mojom::DocumentTiming) |
| 17 IPC_STRUCT_TRAITS_MEMBER(dom_content_loaded_event_start) | 18 IPC_STRUCT_TRAITS_MEMBER(dom_content_loaded_event_start) |
| 18 IPC_STRUCT_TRAITS_MEMBER(load_event_start) | 19 IPC_STRUCT_TRAITS_MEMBER(load_event_start) |
| 19 IPC_STRUCT_TRAITS_MEMBER(first_layout) | 20 IPC_STRUCT_TRAITS_MEMBER(first_layout) |
| 20 IPC_STRUCT_TRAITS_END() | 21 IPC_STRUCT_TRAITS_END() |
| 21 | 22 |
| 22 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::PaintTiming) | 23 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::mojom::PaintTiming) |
| 23 IPC_STRUCT_TRAITS_MEMBER(first_paint) | 24 IPC_STRUCT_TRAITS_MEMBER(first_paint) |
| 24 IPC_STRUCT_TRAITS_MEMBER(first_text_paint) | 25 IPC_STRUCT_TRAITS_MEMBER(first_text_paint) |
| 25 IPC_STRUCT_TRAITS_MEMBER(first_image_paint) | 26 IPC_STRUCT_TRAITS_MEMBER(first_image_paint) |
| 26 IPC_STRUCT_TRAITS_MEMBER(first_contentful_paint) | 27 IPC_STRUCT_TRAITS_MEMBER(first_contentful_paint) |
| 27 IPC_STRUCT_TRAITS_MEMBER(first_meaningful_paint) | 28 IPC_STRUCT_TRAITS_MEMBER(first_meaningful_paint) |
| 28 IPC_STRUCT_TRAITS_END() | 29 IPC_STRUCT_TRAITS_END() |
| 29 | 30 |
| 30 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::ParseTiming) | 31 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::mojom::ParseTiming) |
| 31 IPC_STRUCT_TRAITS_MEMBER(parse_start) | 32 IPC_STRUCT_TRAITS_MEMBER(parse_start) |
| 32 IPC_STRUCT_TRAITS_MEMBER(parse_stop) | 33 IPC_STRUCT_TRAITS_MEMBER(parse_stop) |
| 33 IPC_STRUCT_TRAITS_MEMBER(parse_blocked_on_script_load_duration) | 34 IPC_STRUCT_TRAITS_MEMBER(parse_blocked_on_script_load_duration) |
| 34 IPC_STRUCT_TRAITS_MEMBER( | 35 IPC_STRUCT_TRAITS_MEMBER( |
| 35 parse_blocked_on_script_load_from_document_write_duration) | 36 parse_blocked_on_script_load_from_document_write_duration) |
| 36 IPC_STRUCT_TRAITS_MEMBER(parse_blocked_on_script_execution_duration) | 37 IPC_STRUCT_TRAITS_MEMBER(parse_blocked_on_script_execution_duration) |
| 37 IPC_STRUCT_TRAITS_MEMBER( | 38 IPC_STRUCT_TRAITS_MEMBER( |
| 38 parse_blocked_on_script_execution_from_document_write_duration) | 39 parse_blocked_on_script_execution_from_document_write_duration) |
| 39 IPC_STRUCT_TRAITS_END() | 40 IPC_STRUCT_TRAITS_END() |
| 40 | 41 |
| 41 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::StyleSheetTiming) | 42 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::mojom::StyleSheetTiming) |
| 42 IPC_STRUCT_TRAITS_MEMBER(author_style_sheet_parse_duration_before_fcp) | 43 IPC_STRUCT_TRAITS_MEMBER(author_style_sheet_parse_duration_before_fcp) |
| 43 IPC_STRUCT_TRAITS_MEMBER(update_style_duration_before_fcp) | 44 IPC_STRUCT_TRAITS_MEMBER(update_style_duration_before_fcp) |
| 44 IPC_STRUCT_TRAITS_END() | 45 IPC_STRUCT_TRAITS_END() |
| 45 | 46 |
| 46 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::PageLoadTiming) | 47 // page_load_metrics::mojom::PageLoadTiming has custom ParamTraits. |
| 47 IPC_STRUCT_TRAITS_MEMBER(navigation_start) | |
| 48 IPC_STRUCT_TRAITS_MEMBER(response_start) | |
| 49 IPC_STRUCT_TRAITS_MEMBER(document_timing) | |
| 50 IPC_STRUCT_TRAITS_MEMBER(paint_timing) | |
| 51 IPC_STRUCT_TRAITS_MEMBER(parse_timing) | |
| 52 IPC_STRUCT_TRAITS_MEMBER(style_sheet_timing) | |
| 53 IPC_STRUCT_TRAITS_END() | |
| 54 | 48 |
| 55 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::PageLoadMetadata) | 49 IPC_STRUCT_TRAITS_BEGIN(page_load_metrics::mojom::PageLoadMetadata) |
| 56 IPC_STRUCT_TRAITS_MEMBER(behavior_flags) | 50 IPC_STRUCT_TRAITS_MEMBER(behavior_flags) |
| 57 IPC_STRUCT_TRAITS_END() | 51 IPC_STRUCT_TRAITS_END() |
| 58 | 52 |
| 59 // Sent from renderer to browser process when the PageLoadTiming for the | 53 // Sent from renderer to browser process when the PageLoadTiming for the |
| 60 // associated frame changed. | 54 // associated frame changed. |
| 61 IPC_MESSAGE_ROUTED2(PageLoadMetricsMsg_TimingUpdated, | 55 IPC_MESSAGE_ROUTED2(PageLoadMetricsMsg_TimingUpdated, |
| 62 page_load_metrics::PageLoadTiming, | 56 page_load_metrics::mojom::PageLoadTiming, |
| 63 page_load_metrics::PageLoadMetadata) | 57 page_load_metrics::mojom::PageLoadMetadata) |
| OLD | NEW |