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

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

Issue 2710823003: NOCOMMIT prototype: GRC service plumbing and process priority
Patch Set: Rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp
diff --git a/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp b/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5b19fc3c790d7b0e036d3834c52520a1520e275f
--- /dev/null
+++ b/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h"
+
+#include "public/platform/InterfaceProvider.h"
+#include "public/platform/Platform.h"
+#include "services/resource_coordinator/public/interfaces/coordination_unit_provider.mojom.h"
+
+namespace blink {
+
+namespace {
+
+void onConnectionError() {}
+
+} // namespace
+
+FrameResourceCoordinator* FrameResourceCoordinator::Create(
+ InterfaceProvider* interface_provider) {
+ return new FrameResourceCoordinator(interface_provider);
+}
+
+FrameResourceCoordinator::FrameResourceCoordinator(
+ InterfaceProvider* interface_provider) {
+ interface_provider->GetInterface(mojo::MakeRequest(&service_));
+
+ service_.set_connection_error_handler(
+ ConvertToBaseCallback(WTF::Bind(&onConnectionError)));
+
+ resource_coordinator::mojom::EventPtr event =
+ resource_coordinator::mojom::Event::New();
+ event->type = resource_coordinator::mojom::EventType::kOnRendererFrameCreated;
+ service_->SendEvent(std::move(event));
+}
+
+FrameResourceCoordinator::~FrameResourceCoordinator() = default;
+
+DEFINE_TRACE(FrameResourceCoordinator) {}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698