summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/prerender.mojom
blob: 7d9760277b405ce7e94c1b8fe241cccb96df082a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// 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<url.mojom.Url> aliases);

  // Signals to a launcher that a prerender is no longer running.
  PrerenderStop(int32 prerender_id);
};