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

Unified Diff: content/public/browser/render_process_host_utils.h

Issue 2857263003: Task Manager should listen to WebContentsObserver::RenderFrameCreated. (Closed)
Patch Set: . 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
Index: content/public/browser/render_process_host_utils.h
diff --git a/content/public/browser/render_process_host_utils.h b/content/public/browser/render_process_host_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..beecbcfb535e0db351573b5d7e66bd24c9a21d13
--- /dev/null
+++ b/content/public/browser/render_process_host_utils.h
@@ -0,0 +1,26 @@
+// 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.
+
+#ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_UTILS_H_
+#define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_UTILS_H_
+
+#include "base/callback.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class RenderProcessHost;
+
+// Posts |task|, if |render_process_host| is ready or when it becomes ready (see
+// RenderProcessHost::IsReady method). The |task| might not run at all (e.g. if
+// |render_process_host| is destroyed before becoming ready). This function can
+// only be called on the browser's UI thread (and the |task| will be posted back
+// on the UI thread).
+CONTENT_EXPORT void PostTaskWhenRenderProcessHostIsReady(
+ RenderProcessHost* render_process_host,
+ base::OnceClosure task);
Łukasz Anforowicz 2017/05/06 00:16:45 Also - please shout if you think I should add a te
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698