forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprerender_controller.h
31 lines (23 loc) · 984 Bytes
/
prerender_controller.h
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
// Copyright 2020 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.
#ifndef WEBLAYER_PUBLIC_PRERENDER_CONTROLLER_H_
#define WEBLAYER_PUBLIC_PRERENDER_CONTROLLER_H_
#include <string>
class GURL;
namespace weblayer {
// PrerenderController enables prerendering of urls.
// Prerendering has the same effect as adding a link rel="prerender" resource
// hint to a web page. It is implemented using NoStatePrefetch and fetches
// resources needed for a url in advance, but does not execute Javascript or
// render any part of the page in advance. For more information on
// NoStatePrefetch, see
// https://developers.google.com/web/updates/2018/07/nostate-prefetch.
class PrerenderController {
public:
virtual void Prerender(const GURL& url) = 0;
protected:
virtual ~PrerenderController() = default;
};
} // namespace weblayer
#endif // WEBLAYER_PUBLIC_PRERENDER_CONTROLLER_H_