| // Copyright 2018 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. |
| |
| module blink.mojom; |
| |
| import "mojo/public/mojom/base/unguessable_token.mojom"; |
| import "url/mojom/url.mojom"; |
| |
| enum PortalActivationStatus { |
| // Portal has been successfully activated. |
| kSuccess, |
| // Operation is not supported by the embedder. |
| kNotSupported, |
| }; |
| |
| // The Portal interface is used by the renderer to interact with the Portal. |
| interface Portal { |
| // Initializes a portal. Must be called immediately after creating the |
| // interface. |token| is the unique token representing the portal. This token |
| // will be used by the content layer when referencing the portal. |
| Init() => (mojo_base.mojom.UnguessableToken token); |
| |
| // Navigates the portal to |url|. |
| Navigate(url.mojom.Url url); |
| |
| // When a portal is activated, it'll replace the current tab with the portal. |
| Activate() => (PortalActivationStatus result); |
| }; |