OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "chrome/browser/prerender/prerender_final_status.h" | 13 #include "chrome/browser/prerender/prerender_final_status.h" |
14 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 14 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
15 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" | 15 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" |
| 16 #include "chrome/common/icon_messages.h" |
16 #include "chrome/common/view_types.h" | 17 #include "chrome/common/view_types.h" |
17 #include "chrome/common/window_container_type.h" | 18 #include "chrome/common/window_container_type.h" |
18 #include "content/browser/renderer_host/render_view_host_delegate.h" | 19 #include "content/browser/renderer_host/render_view_host_delegate.h" |
19 #include "content/common/notification_registrar.h" | 20 #include "content/common/notification_registrar.h" |
20 #include "webkit/glue/window_open_disposition.h" | 21 #include "webkit/glue/window_open_disposition.h" |
21 | 22 |
22 class TabContents; | 23 class TabContents; |
23 struct WebPreferences; | 24 struct WebPreferences; |
24 struct ViewHostMsg_FrameNavigate_Params; | 25 struct ViewHostMsg_FrameNavigate_Params; |
25 | 26 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 friend class PrerenderContentsFactoryImpl; | 194 friend class PrerenderContentsFactoryImpl; |
194 | 195 |
195 // Message handlers. | 196 // Message handlers. |
196 void OnDidStartProvisionalLoadForFrame(int64 frame_id, | 197 void OnDidStartProvisionalLoadForFrame(int64 frame_id, |
197 bool main_frame, | 198 bool main_frame, |
198 const GURL& url); | 199 const GURL& url); |
199 void OnDidRedirectProvisionalLoad(int32 page_id, | 200 void OnDidRedirectProvisionalLoad(int32 page_id, |
200 const GURL& source_url, | 201 const GURL& source_url, |
201 const GURL& target_url); | 202 const GURL& target_url); |
202 | 203 |
203 void OnUpdateFaviconURL(int32 page_id, const GURL& icon_url); | 204 void OnUpdateFaviconURL(int32 page_id, const std::vector<FaviconURL>& urls); |
204 | 205 |
205 // Adds an alias URL, for one of the many redirections. Returns whether | 206 // Adds an alias URL, for one of the many redirections. Returns whether |
206 // the URL is valid. | 207 // the URL is valid. |
207 bool AddAliasURL(const GURL& url); | 208 bool AddAliasURL(const GURL& url); |
208 | 209 |
209 // Remove |this| from the PrerenderManager, set a final status, and | 210 // Remove |this| from the PrerenderManager, set a final status, and |
210 // delete |this|. | 211 // delete |this|. |
211 void Destroy(FinalStatus reason); | 212 void Destroy(FinalStatus reason); |
212 | 213 |
213 // Returns the ProcessMetrics for the render process, if it exists. | 214 // Returns the ProcessMetrics for the render process, if it exists. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // Maximum amount of private memory that may be used per PrerenderContents, | 269 // Maximum amount of private memory that may be used per PrerenderContents, |
269 // in MB. | 270 // in MB. |
270 static const int kMaxPrerenderPrivateMB = 100; | 271 static const int kMaxPrerenderPrivateMB = 100; |
271 | 272 |
272 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 273 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
273 }; | 274 }; |
274 | 275 |
275 } // prerender | 276 } // prerender |
276 | 277 |
277 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 278 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
OLD | NEW |