Chromium Code Reviews| Index: content/public/browser/render_frame_host.h |
| diff --git a/content/public/browser/render_frame_host.h b/content/public/browser/render_frame_host.h |
| index f7d7cb1303ef94bfd5222098383cf75c99742a40..3972e6fd5b70cb50c0bc6c56fc511aad7b041eb0 100644 |
| --- a/content/public/browser/render_frame_host.h |
| +++ b/content/public/browser/render_frame_host.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include "base/callback_forward.h" |
| +#include "base/unguessable_token.h" |
| #include "build/build_config.h" |
| #include "content/common/content_export.h" |
| #include "content/public/common/console_message_level.h" |
| @@ -59,6 +60,12 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
| // Returns a RenderFrameHost given its accessibility tree ID. |
| static RenderFrameHost* FromAXTreeID(int ax_tree_id); |
| +#if defined(OS_ANDROID) |
| + // Returns a RenderFrameHost given its AndroidOverlay routing token. |
| + static RenderFrameHost* FromOverlayRoutingToken( |
| + const base::UnguessableToken& token); |
| +#endif |
| + |
| ~RenderFrameHost() override {} |
| // Returns the route id for this frame. |
| @@ -67,6 +74,16 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
| // Returns the accessibility tree ID for this RenderFrameHost. |
| virtual int GetAXTreeID() = 0; |
| +#if defined(OS_ANDROID) |
| + // Returns an unguessable token for this RFHI. This provides a temporary way |
| + // to identify a RenderFrameHost that's compatible with IPC. Else, one needs |
| + // to send pid + RoutingID, but one cannot send pid. One can get it from the |
| + // channel, but this makes it much harder to get wrong. |
| + // Once media switches to mojo, we should be able to remove this in favor of |
| + // sending a mojo overlay factory. |
| + virtual const base::UnguessableToken& GetOverlayRoutingToken() = 0; |
|
boliu
2017/03/30 22:42:02
ditto about public
liberato (no reviews please)
2017/04/04 17:49:28
Done.
|
| +#endif |
| + |
| // Returns the SiteInstance grouping all RenderFrameHosts that have script |
| // access to this RenderFrameHost, and must therefore live in the same |
| // process. |