Chromium Code Reviews| 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_ |