Chromium Code Reviews| 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_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_TRACKER_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_TRACKER_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 typedef std::map<ChildRouteIdPair, RenderViewInfo> FinalStatusMap; | 78 typedef std::map<ChildRouteIdPair, RenderViewInfo> FinalStatusMap; |
| 79 // List of throttled requests. | 79 // List of throttled requests. |
| 80 typedef std::vector<base::WeakPtr<PrerenderResourceThrottle> > | 80 typedef std::vector<base::WeakPtr<PrerenderResourceThrottle> > |
| 81 ResourceThrottleList; | 81 ResourceThrottleList; |
| 82 // Set of throttled requests. | 82 // Set of throttled requests. |
| 83 typedef std::map<ChildRouteIdPair, ResourceThrottleList> ResourceThrottleMap; | 83 typedef std::map<ChildRouteIdPair, ResourceThrottleList> ResourceThrottleMap; |
| 84 struct PendingSwapThrottleData { | 84 struct PendingSwapThrottleData { |
| 85 explicit PendingSwapThrottleData(const GURL& swap_url); | 85 explicit PendingSwapThrottleData(const GURL& swap_url); |
| 86 ~PendingSwapThrottleData(); | 86 ~PendingSwapThrottleData(); |
| 87 GURL url; | 87 GURL url; |
| 88 base::WeakPtr<PrerenderPendingSwapThrottle> throttle; | 88 std::vector<base::WeakPtr<PrerenderPendingSwapThrottle> > throttles; |
|
tburkard
2014/01/16 05:46:43
While the other vector is necessary, I think this
jam
2014/01/16 06:39:48
ah, I missed that, you're right this is orthogonal
davidben
2014/01/16 18:06:00
Hrm. Actually, I think it might be possible in som
jam
2014/01/16 18:12:26
I don't follow. Can you tell me exactly which meth
davidben
2014/01/16 19:41:02
Hrm. So, I started out writing out this very long
| |
| 89 }; | 89 }; |
| 90 // Set of throttles for pending swaps. The key is the routing ID pair | 90 // Set of throttles for pending swaps. The key is the routing ID pair |
| 91 // of a RenderFrame. | 91 // of a RenderFrame. |
| 92 typedef std::map<ChildRouteIdPair, PendingSwapThrottleData> | 92 typedef std::map<ChildRouteIdPair, PendingSwapThrottleData> |
| 93 PendingSwapThrottleMap; | 93 PendingSwapThrottleMap; |
| 94 | 94 |
| 95 // From PrerenderContents::Observer: | 95 // From PrerenderContents::Observer: |
| 96 virtual void OnPrerenderStart(PrerenderContents* prerender_contents) OVERRIDE; | 96 virtual void OnPrerenderStart(PrerenderContents* prerender_contents) OVERRIDE; |
| 97 virtual void OnPrerenderStop(PrerenderContents* prerender_contents) OVERRIDE; | 97 virtual void OnPrerenderStop(PrerenderContents* prerender_contents) OVERRIDE; |
| 98 | 98 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 120 // Map of pending prerender swaps and their associated throttles, | 120 // Map of pending prerender swaps and their associated throttles, |
| 121 // maintained on the IO thread. | 121 // maintained on the IO thread. |
| 122 PendingSwapThrottleMap pending_swap_throttle_map_; | 122 PendingSwapThrottleMap pending_swap_throttle_map_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(PrerenderTracker); | 124 DISALLOW_COPY_AND_ASSIGN(PrerenderTracker); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace prerender | 127 } // namespace prerender |
| 128 | 128 |
| 129 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TRACKER_H_ | 129 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_TRACKER_H_ |
| OLD | NEW |