// 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. module chrome.mojom; import "url/mojom/url.mojom"; interface PrerenderCanceler { // Message sent from the renderer to the browser to notify it of a // window.print() call which should cancel the prerender. The message is sent // only when the renderer is prerendering. CancelPrerenderForPrinting(); // Cancels prerendering because of an unsupported method. CancelPrerenderForUnsupportedMethod(); // Cancels prerendering because of an unsupported scheme. CancelPrerenderForUnsupportedScheme(url.mojom.Url url); // Cancels prerendering because of a synchronous deferred redirect. CancelPrerenderForSyncDeferredRedirect(); }; // PrerenderDispatcher Messages // These are messages sent from the browser to the renderer in relation to // running prerenders. interface PrerenderDispatcher { // Signals to launcher that a prerender is running. PrerenderStart(int32 prerender_id); // Signals to launcher that a prerender is running. PrerenderStopLoading(int32 prerender_id); // Signals to launcher that a prerender has had it's 'domcontentloaded' event. PrerenderDomContentLoaded(int32 prerender_id); // Signals to a launcher that a new alias has been added to a prerender. PrerenderAddAlias(url.mojom.Url alias); // Signals to a launcher that a new alias has been added to a prerender. PrerenderRemoveAliases(array aliases); // Signals to a launcher that a prerender is no longer running. PrerenderStop(int32 prerender_id); };