| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #include "platform/instrumentation/resource_coordinator/FrameResourceCoordinator
.h" | 5 #include "platform/instrumentation/resource_coordinator/FrameResourceCoordinator
.h" |
| 6 | 6 |
| 7 #include "public/platform/InterfaceProvider.h" | 7 #include "public/platform/InterfaceProvider.h" |
| 8 #include "public/platform/Platform.h" | 8 #include "public/platform/Platform.h" |
| 9 #include "services/resource_coordinator/public/cpp/resource_coordinator_features
.h" | 9 #include "services/resource_coordinator/public/cpp/resource_coordinator_features
.h" |
| 10 #include "services/resource_coordinator/public/interfaces/coordination_unit_prov
ider.mojom-blink.h" | 10 #include "services/resource_coordinator/public/interfaces/coordination_unit_prov
ider.mojom-blink.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 ConvertToBaseCallback(WTF::Bind(&onConnectionError))); | 36 ConvertToBaseCallback(WTF::Bind(&onConnectionError))); |
| 37 | 37 |
| 38 resource_coordinator::mojom::blink::EventPtr event = | 38 resource_coordinator::mojom::blink::EventPtr event = |
| 39 resource_coordinator::mojom::blink::Event::New(); | 39 resource_coordinator::mojom::blink::Event::New(); |
| 40 event->type = resource_coordinator::mojom::EventType::kOnRendererFrameCreated; | 40 event->type = resource_coordinator::mojom::EventType::kOnRendererFrameCreated; |
| 41 service_->SendEvent(std::move(event)); | 41 service_->SendEvent(std::move(event)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 FrameResourceCoordinator::~FrameResourceCoordinator() = default; | 44 FrameResourceCoordinator::~FrameResourceCoordinator() = default; |
| 45 | 45 |
| 46 void FrameResourceCoordinator::SendEvent( |
| 47 const resource_coordinator::mojom::blink::EventType& event_type) { |
| 48 resource_coordinator::mojom::blink::EventPtr event = |
| 49 resource_coordinator::mojom::blink::Event::New(); |
| 50 event->type = event_type; |
| 51 |
| 52 service_->SendEvent(std::move(event)); |
| 53 } |
| 54 |
| 46 DEFINE_TRACE(FrameResourceCoordinator) {} | 55 DEFINE_TRACE(FrameResourceCoordinator) {} |
| 47 | 56 |
| 48 } // namespace blink | 57 } // namespace blink |
| OLD | NEW |