| // 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 content.mojom; |
| |
| import "mojo/public/mojom/base/unguessable_token.mojom"; |
| import "url/mojom/url.mojom"; |
| |
| // The primary interface an application uses to drive a top-level, navigable |
| // content object. Typically this would correspond to e.g. a browser tab, but |
| // it is not strictly necessary that the contents have any graphical presence |
| // within the client application. |
| interface NavigableContents { |
| // Initiates a navigation to |url|. |
| Navigate(url.mojom.Url url); |
| |
| // Creates a visual representation of the navigated contents, which is |
| // maintained by the Content Service. Responds with a |embed_token| which can |
| // be given to Mus in order to authorize embedding of that visual |
| // representation within the client application's own window tree. |
| // |
| // |in_service_process| must be true iff the client calling this method is |
| // running in the same process as the Content Service. This can be known in |
| // the client by calling |
| // |NavigableContentsView::IsClientRunningInServiceProcess()|. |
| // |
| // TODO(https://crbug.com/874143): Remove the |in_service_process| flag once |
| // we have more widely available UI Service support. |
| CreateView(bool in_service_process) |
| => (mojo_base.mojom.UnguessableToken embed_token); |
| }; |
| |
| // A client interface used by the Content Service to push contents-scoped events |
| // back to the application. |
| interface NavigableContentsClient { |
| // Notifies the client that the NavigableContents has stopped loading |
| // resources pertaining to a prior navigation request. |
| DidStopLoading(); |
| }; |