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_LINK_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_LINK_MANAGER_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_LINK_MANAGER_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_LINK_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void OnCancelPrerender(int child_id, int prerender_id); | 57 void OnCancelPrerender(int child_id, int prerender_id); |
58 | 58 |
59 // A renderer launching <link rel=prerender ...> has navigated away from the | 59 // A renderer launching <link rel=prerender ...> has navigated away from the |
60 // launching page, the launching renderer process has crashed, or perhaps the | 60 // launching page, the launching renderer process has crashed, or perhaps the |
61 // renderer process was fast-closed when the last render view in it was | 61 // renderer process was fast-closed when the last render view in it was |
62 // closed. | 62 // closed. |
63 void OnAbandonPrerender(int child_id, int prerender_id); | 63 void OnAbandonPrerender(int child_id, int prerender_id); |
64 | 64 |
65 // If a renderer channel closes (crash, fast exit, etc...), that's effectively | 65 // If a renderer channel closes (crash, fast exit, etc...), that's effectively |
66 // an abandon of any prerenders launched by that child. | 66 // an abandon of any prerenders launched by that child. |
67 void OnChannelClosing(int child_id); | 67 void OnSenderClosing(int child_id); |
68 | 68 |
69 private: | 69 private: |
70 friend class PrerenderBrowserTest; | 70 friend class PrerenderBrowserTest; |
71 friend class PrerenderTest; | 71 friend class PrerenderTest; |
72 // WebViewTest.NoPrerenderer needs to access the private IsEmpty() method. | 72 // WebViewTest.NoPrerenderer needs to access the private IsEmpty() method. |
73 FRIEND_TEST_ALL_PREFIXES(::WebViewTest, NoPrerenderer); | 73 FRIEND_TEST_ALL_PREFIXES(::WebViewTest, NoPrerenderer); |
74 | 74 |
75 struct LinkPrerender { | 75 struct LinkPrerender { |
76 LinkPrerender(int launcher_child_id, | 76 LinkPrerender(int launcher_child_id, |
77 int prerender_id, | 77 int prerender_id, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Helper object to manage prerenders which are launched by other prerenders | 168 // Helper object to manage prerenders which are launched by other prerenders |
169 // and must be deferred until the launcher is swapped in. | 169 // and must be deferred until the launcher is swapped in. |
170 scoped_ptr<PendingPrerenderManager> pending_prerender_manager_; | 170 scoped_ptr<PendingPrerenderManager> pending_prerender_manager_; |
171 | 171 |
172 DISALLOW_COPY_AND_ASSIGN(PrerenderLinkManager); | 172 DISALLOW_COPY_AND_ASSIGN(PrerenderLinkManager); |
173 }; | 173 }; |
174 | 174 |
175 } // namespace prerender | 175 } // namespace prerender |
176 | 176 |
177 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_LINK_MANAGER_H_ | 177 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_LINK_MANAGER_H_ |
OLD | NEW |