Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp

Issue 2925963002: Create NetworkQuietDetector. (Closed)
Patch Set: Dont create NetworkQuietDetector when FrameResourceCoordinator is not enabled Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698