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_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 | 7 |
| 8 #include <set> |
8 #include <string> | 9 #include <string> |
9 #include <utility> | 10 #include <utility> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "base/values.h" | 18 #include "base/values.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 207 |
207 base::TimeTicks load_start_time() const { return load_start_time_; } | 208 base::TimeTicks load_start_time() const { return load_start_time_; } |
208 | 209 |
209 // Indicates whether this prerendered page can be used for the provided | 210 // Indicates whether this prerendered page can be used for the provided |
210 // |url| and |session_storage_namespace|. | 211 // |url| and |session_storage_namespace|. |
211 bool Matches( | 212 bool Matches( |
212 const GURL& url, | 213 const GURL& url, |
213 const content::SessionStorageNamespace* session_storage_namespace) const; | 214 const content::SessionStorageNamespace* session_storage_namespace) const; |
214 | 215 |
215 // content::WebContentsObserver implementation. | 216 // content::WebContentsObserver implementation. |
| 217 virtual void RenderFrameCreated( |
| 218 content::RenderFrameHost* render_frame_host) OVERRIDE; |
| 219 virtual void RenderFrameDeleted( |
| 220 content::RenderFrameHost* render_frame_host) OVERRIDE; |
216 virtual void DidStopLoading( | 221 virtual void DidStopLoading( |
217 content::RenderViewHost* render_view_host) OVERRIDE; | 222 content::RenderViewHost* render_view_host) OVERRIDE; |
218 virtual void DidStartProvisionalLoadForFrame( | 223 virtual void DidStartProvisionalLoadForFrame( |
219 int64 frame_id, | 224 int64 frame_id, |
220 int64 parent_frame_id, | 225 int64 parent_frame_id, |
221 bool is_main_frame, | 226 bool is_main_frame, |
222 const GURL& validated_url, | 227 const GURL& validated_url, |
223 bool is_error_page, | 228 bool is_error_page, |
224 bool is_iframe_srcdoc, | 229 bool is_iframe_srcdoc, |
225 content::RenderViewHost* render_view_host) OVERRIDE; | 230 content::RenderViewHost* render_view_host) OVERRIDE; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 433 |
429 typedef std::vector<history::HistoryAddPageArgs> AddPageVector; | 434 typedef std::vector<history::HistoryAddPageArgs> AddPageVector; |
430 | 435 |
431 // Caches pages to be added to the history. | 436 // Caches pages to be added to the history. |
432 AddPageVector add_page_vector_; | 437 AddPageVector add_page_vector_; |
433 | 438 |
434 // The alias session storage namespace for this prerender. | 439 // The alias session storage namespace for this prerender. |
435 scoped_refptr<content::SessionStorageNamespace> | 440 scoped_refptr<content::SessionStorageNamespace> |
436 alias_session_storage_namespace; | 441 alias_session_storage_namespace; |
437 | 442 |
| 443 // The RenderFrameHosts for prerender_contents_. |
| 444 std::set<content::RenderFrameHost*> render_frame_hosts_; |
| 445 |
438 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 446 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
439 }; | 447 }; |
440 | 448 |
441 } // namespace prerender | 449 } // namespace prerender |
442 | 450 |
443 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 451 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
OLD | NEW |