| 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> |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void Destroy(FinalStatus reason); | 153 void Destroy(FinalStatus reason); |
| 154 | 154 |
| 155 // Applies all the URL history encountered during prerendering to the | 155 // Applies all the URL history encountered during prerendering to the |
| 156 // new tab. | 156 // new tab. |
| 157 void CommitHistory(TabContentsWrapper* tab); | 157 void CommitHistory(TabContentsWrapper* tab); |
| 158 | 158 |
| 159 int32 starting_page_id() { return starting_page_id_; } | 159 int32 starting_page_id() { return starting_page_id_; } |
| 160 | 160 |
| 161 base::Value* GetAsValue() const; | 161 base::Value* GetAsValue() const; |
| 162 | 162 |
| 163 // Returns whether a pending cross-site navigation is happening. |
| 164 // This could happen with renderer-issued navigations, such as a |
| 165 // MouseEvent being dispatched by a link to a website installed as an app. |
| 166 bool IsCrossSiteNavigationPending() const; |
| 167 |
| 163 protected: | 168 protected: |
| 164 PrerenderContents(PrerenderManager* prerender_manager, | 169 PrerenderContents(PrerenderManager* prerender_manager, |
| 165 PrerenderTracker* prerender_tracker, | 170 PrerenderTracker* prerender_tracker, |
| 166 Profile* profile, | 171 Profile* profile, |
| 167 const GURL& url, | 172 const GURL& url, |
| 168 const GURL& referrer, | 173 const GURL& referrer, |
| 169 Origin origin, | 174 Origin origin, |
| 170 uint8 experiment_id); | 175 uint8 experiment_id); |
| 171 | 176 |
| 172 NotificationRegistrar& notification_registrar() { | 177 NotificationRegistrar& notification_registrar() { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 280 |
| 276 // Offset by which to offset prerendered pages | 281 // Offset by which to offset prerendered pages |
| 277 static const int32 kPrerenderPageIdOffset = 10; | 282 static const int32 kPrerenderPageIdOffset = 10; |
| 278 | 283 |
| 279 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 284 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
| 280 }; | 285 }; |
| 281 | 286 |
| 282 } // namespace prerender | 287 } // namespace prerender |
| 283 | 288 |
| 284 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 289 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
| OLD | NEW |