Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / prerender / prerender_config.h
blob2c6545240cd9d6aceefbe7db135d4903f743c351
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_
8 #include <string>
10 #include "base/time/time.h"
11 #include "ui/gfx/rect.h"
13 namespace prerender {
15 struct Config {
16 Config();
17 ~Config();
19 // Maximum memory use for a prerendered page until it is killed.
20 size_t max_bytes;
22 // Number of simultaneous prerender pages from link elements allowed. Enforced
23 // by PrerenderLinkManager.
24 size_t max_link_concurrency;
26 // Number of simultaneous prerender pages from link elements allowed per
27 // launching page. Enforced by PrerenderLinkManager.
28 size_t max_link_concurrency_per_launcher;
30 // Is rate limiting enabled?
31 bool rate_limit_enabled;
33 // The maximum time that a prerender can wait for launch in the
34 // PrerenderLinkManager.
35 base::TimeDelta max_wait_to_launch;
37 // The default time to live of a newly created prerender. May be shortened to
38 // abandon_time_to_live, below.
39 base::TimeDelta time_to_live;
41 // After a prerender has been abandoned by the user navigating away from the
42 // source page or otherwise mooting the launcher, how long until the prerender
43 // should be removed. This exists because a prerendered page is often
44 // navigated to through a chain of redirects; removing the prerender when the
45 // link element is removed because of navigation would destroy prerenders just
46 // before they were going to be used.
47 base::TimeDelta abandon_time_to_live;
49 // The default tab bounds used as the prerenderer tab size when the active tab
50 // cannot be accessed.
51 gfx::Rect default_tab_bounds;
53 // User agent being used as an override for the WebContents.
54 std::string user_agent_override;
56 // Is the user agent being overridden for this NavigationEntry?
57 bool is_overriding_user_agent;
60 } // namespace prerender
62 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_