| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 8 #include "base/time.h" | 10 #include "base/time.h" |
| 9 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 10 | 12 |
| 11 namespace prerender { | 13 namespace prerender { |
| 12 | 14 |
| 13 struct Config { | 15 struct Config { |
| 14 Config(); | 16 Config(); |
| 15 | 17 |
| 16 // Maximum memory use for a prerendered page until it is killed. | 18 // Maximum memory use for a prerendered page until it is killed. |
| 17 size_t max_bytes; | 19 size_t max_bytes; |
| 18 | 20 |
| 19 // Number of simultaneous prendered pages allowed. | 21 // Number of simultaneous prendered pages allowed. |
| 20 unsigned int max_elements; | 22 size_t max_concurrency; |
| 21 | 23 |
| 22 // Is rate limiting enabled? | 24 // Is rate limiting enabled? |
| 23 bool rate_limit_enabled; | 25 bool rate_limit_enabled; |
| 24 | 26 |
| 25 // Maximum age for a prerendered page until it is removed. | 27 // Maximum age for a prerendered page until it is removed. |
| 26 base::TimeDelta max_age; | 28 base::TimeDelta max_age; |
| 27 | 29 |
| 28 // Is https allowed? | 30 // Is https allowed? |
| 29 bool https_allowed; | 31 bool https_allowed; |
| 30 | 32 |
| 31 // The default tab bounds used as the prerenderer tab size when the active tab | 33 // The default tab bounds used as the prerenderer tab size when the active tab |
| 32 // cannot be accessed. | 34 // cannot be accessed. |
| 33 gfx::Rect default_tab_bounds; | 35 gfx::Rect default_tab_bounds; |
| 34 | 36 |
| 35 // User agent being used as an override for the WebContents. | 37 // User agent being used as an override for the WebContents. |
| 36 std::string user_agent_override; | 38 std::string user_agent_override; |
| 37 | 39 |
| 38 // Is the user agent being overridden for this NavigationEntry? | 40 // Is the user agent being overridden for this NavigationEntry? |
| 39 bool is_overriding_user_agent; | 41 bool is_overriding_user_agent; |
| 40 }; | 42 }; |
| 41 | 43 |
| 42 } // namespace prerender | 44 } // namespace prerender |
| 43 | 45 |
| 44 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ | 46 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ |
| 47 |
| OLD | NEW |