Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Side by Side Diff: chrome/browser/prerender/prerender_contents.h

Issue 10978016: Remove two functions on WebContentsDelegate which didn't belong in content. They were only called f… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 namespace base { 27 namespace base {
28 class ProcessMetrics; 28 class ProcessMetrics;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 class RenderViewHost; 32 class RenderViewHost;
33 class SessionStorageNamespace; 33 class SessionStorageNamespace;
34 class WebContents; 34 class WebContents;
35 } 35 }
36 36
37 namespace history {
38 struct HistoryAddPageArgs;
39 }
40
37 namespace prerender { 41 namespace prerender {
38 42
39 class PrerenderHandle; 43 class PrerenderHandle;
40 class PrerenderManager; 44 class PrerenderManager;
41 class PrerenderRenderViewHostObserver; 45 class PrerenderRenderViewHostObserver;
42 class PrerenderTracker; 46 class PrerenderTracker;
43 47
44 class PrerenderContents : public content::NotificationObserver, 48 class PrerenderContents : public content::NotificationObserver,
45 public content::WebContentsObserver { 49 public content::WebContentsObserver {
46 public: 50 public:
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 TabContents* prerender_contents() const { 202 TabContents* prerender_contents() const {
199 return prerender_contents_.get(); 203 return prerender_contents_.get();
200 } 204 }
201 205
202 TabContents* ReleasePrerenderContents(); 206 TabContents* ReleasePrerenderContents();
203 207
204 // Sets the final status, calls OnDestroy and adds |this| to the 208 // Sets the final status, calls OnDestroy and adds |this| to the
205 // PrerenderManager's pending deletes list. 209 // PrerenderManager's pending deletes list.
206 void Destroy(FinalStatus reason); 210 void Destroy(FinalStatus reason);
207 211
212 // Called by the history tab helper with the information that it woudl have
213 // added to the history service had this web contents not been used for
214 // prerendering.
215 void DidNavigate(const history::HistoryAddPageArgs& add_page_args);
216
208 // Applies all the URL history encountered during prerendering to the 217 // Applies all the URL history encountered during prerendering to the
209 // new tab. 218 // new tab.
210 void CommitHistory(TabContents* tab); 219 void CommitHistory(TabContents* tab);
211 220
212 base::Value* GetAsValue() const; 221 base::Value* GetAsValue() const;
213 222
214 // Returns whether a pending cross-site navigation is happening. 223 // Returns whether a pending cross-site navigation is happening.
215 // This could happen with renderer-issued navigations, such as a 224 // This could happen with renderer-issued navigations, such as a
216 // MouseEvent being dispatched by a link to a website installed as an app. 225 // MouseEvent being dispatched by a link to a website installed as an app.
217 bool IsCrossSiteNavigationPending() const; 226 bool IsCrossSiteNavigationPending() const;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 385
377 // List of all pages the prerendered page has tried to prerender. 386 // List of all pages the prerendered page has tried to prerender.
378 std::vector<PendingPrerenderInfo> pending_prerenders_; 387 std::vector<PendingPrerenderInfo> pending_prerenders_;
379 388
380 // The process that created the child id. 389 // The process that created the child id.
381 int creator_child_id_; 390 int creator_child_id_;
382 391
383 // The size of the WebView from the launching page. 392 // The size of the WebView from the launching page.
384 gfx::Size size_; 393 gfx::Size size_;
385 394
395 typedef std::vector<history::HistoryAddPageArgs> AddPageVector;
396
397 // Caches pages to be added to the history.
398 AddPageVector add_page_vector_;
399
386 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 400 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
387 }; 401 };
388 402
389 } // namespace prerender 403 } // namespace prerender
390 404
391 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 405 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698