| 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 // delayed, and handles all conditions which would cancel a pending swap. | 471 // delayed, and handles all conditions which would cancel a pending swap. |
| 472 class PendingSwap : public content::WebContentsObserver { | 472 class PendingSwap : public content::WebContentsObserver { |
| 473 public: | 473 public: |
| 474 PendingSwap(PrerenderManager* manager, | 474 PendingSwap(PrerenderManager* manager, |
| 475 content::WebContents* target_contents, | 475 content::WebContents* target_contents, |
| 476 PrerenderData* prerender_data, | 476 PrerenderData* prerender_data, |
| 477 const GURL& url, | 477 const GURL& url, |
| 478 bool should_replace_current_entry); | 478 bool should_replace_current_entry); |
| 479 virtual ~PendingSwap(); | 479 virtual ~PendingSwap(); |
| 480 | 480 |
| 481 content::WebContents* target_contents() const; | |
| 482 void set_swap_successful(bool swap_successful) { | 481 void set_swap_successful(bool swap_successful) { |
| 483 swap_successful_ = swap_successful; | 482 swap_successful_ = swap_successful; |
| 484 } | 483 } |
| 485 | 484 |
| 486 void BeginSwap(); | 485 void BeginSwap(); |
| 487 | 486 |
| 488 // content::WebContentsObserver implementation. | 487 // content::WebContentsObserver implementation. |
| 489 virtual void AboutToNavigateRenderView( | 488 virtual void AboutToNavigateRenderView( |
| 490 content::RenderViewHost* render_view_host) OVERRIDE; | 489 content::RenderViewHost* render_view_host) OVERRIDE; |
| 491 virtual void ProvisionalChangeToMainFrameUrl( | 490 virtual void ProvisionalChangeToMainFrameUrl( |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 bool cookie_store_loaded_; | 752 bool cookie_store_loaded_; |
| 754 | 753 |
| 755 base::Closure on_cookie_store_loaded_cb_for_testing_; | 754 base::Closure on_cookie_store_loaded_cb_for_testing_; |
| 756 | 755 |
| 757 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 756 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 758 }; | 757 }; |
| 759 | 758 |
| 760 } // namespace prerender | 759 } // namespace prerender |
| 761 | 760 |
| 762 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 761 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |