page_timing_sender.h 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_TIMING_SENDER_H_
  5. #define COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_TIMING_SENDER_H_
  6. #include "components/page_load_metrics/common/page_load_metrics.mojom.h"
  7. namespace page_load_metrics {
  8. // PageTimingSender is an interface that is responsible for sending page load
  9. // timing through IPC.
  10. class PageTimingSender {
  11. public:
  12. virtual ~PageTimingSender() = default;
  13. virtual void SendTiming(
  14. const mojom::PageLoadTimingPtr& timing,
  15. const mojom::FrameMetadataPtr& metadata,
  16. const std::vector<blink::UseCounterFeature>& new_features,
  17. std::vector<mojom::ResourceDataUpdatePtr> resources,
  18. const mojom::FrameRenderDataUpdate& render_data,
  19. const mojom::CpuTimingPtr& cpu_timing,
  20. mojom::InputTimingPtr input_timing_delta,
  21. const absl::optional<blink::MobileFriendliness>& mobile_friendliness,
  22. uint32_t soft_navigation_count) = 0;
  23. virtual void SetUpSmoothnessReporting(
  24. base::ReadOnlySharedMemoryRegion shared_memory) = 0;
  25. };
  26. } // namespace page_load_metrics
  27. #endif // COMPONENTS_PAGE_LOAD_METRICS_RENDERER_PAGE_TIMING_SENDER_H_