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

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

Issue 11571037: Pass load events from prerenders to launching elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to fix build Created 7 years, 11 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 private: 69 private:
70 DISALLOW_COPY_AND_ASSIGN(Factory); 70 DISALLOW_COPY_AND_ASSIGN(Factory);
71 }; 71 };
72 72
73 class Observer { 73 class Observer {
74 public: 74 public:
75 // Signals that the prerender has started running. 75 // Signals that the prerender has started running.
76 virtual void OnPrerenderStart(PrerenderContents* contents) = 0; 76 virtual void OnPrerenderStart(PrerenderContents* contents) = 0;
77 77
78 // Signals that the prerender has had its load event.
79 virtual void OnPrerenderStopLoading(PrerenderContents* contents);
80
78 // Signals that the prerender has stopped running. 81 // Signals that the prerender has stopped running.
79 virtual void OnPrerenderStop(PrerenderContents* contents) = 0; 82 virtual void OnPrerenderStop(PrerenderContents* contents) = 0;
80 83
81 // Signals the discovery, through redirects, of a new alias for this 84 // Signals the discovery, through redirects, of a new alias for this
82 // prerender. 85 // prerender.
83 virtual void OnPrerenderAddAlias(PrerenderContents* contents, 86 virtual void OnPrerenderAddAlias(PrerenderContents* contents,
84 const GURL& alias_url); 87 const GURL& alias_url);
85 88
86 // Signals that this prerender has just become a MatchComplete replacement. 89 // Signals that this prerender has just become a MatchComplete replacement.
87 virtual void OnPrerenderCreatedMatchCompleteReplacement( 90 virtual void OnPrerenderCreatedMatchCompleteReplacement(
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 PrerenderContents(PrerenderManager* prerender_manager, 288 PrerenderContents(PrerenderManager* prerender_manager,
286 Profile* profile, 289 Profile* profile,
287 const GURL& url, 290 const GURL& url,
288 const content::Referrer& referrer, 291 const content::Referrer& referrer,
289 Origin origin, 292 Origin origin,
290 uint8 experiment_id); 293 uint8 experiment_id);
291 294
292 // These call out to methods on our Observers, using our observer_list_. Note 295 // These call out to methods on our Observers, using our observer_list_. Note
293 // that NotifyPrerenderStop() also clears the observer list. 296 // that NotifyPrerenderStop() also clears the observer list.
294 void NotifyPrerenderStart(); 297 void NotifyPrerenderStart();
298 void NotifyPrerenderStopLoading();
295 void NotifyPrerenderStop(); 299 void NotifyPrerenderStop();
296 void NotifyPrerenderAddAlias(const GURL& alias_url); 300 void NotifyPrerenderAddAlias(const GURL& alias_url);
297 void NotifyPrerenderCreatedMatchCompleteReplacement( 301 void NotifyPrerenderCreatedMatchCompleteReplacement(
298 PrerenderContents* replacement); 302 PrerenderContents* replacement);
299 303
300 // Called whenever a RenderViewHost is created for prerendering. Only called 304 // Called whenever a RenderViewHost is created for prerendering. Only called
301 // once the RenderViewHost has a RenderView and RenderWidgetHostView. 305 // once the RenderViewHost has a RenderView and RenderWidgetHostView.
302 virtual void OnRenderViewHostCreated( 306 virtual void OnRenderViewHostCreated(
303 content::RenderViewHost* new_render_view_host); 307 content::RenderViewHost* new_render_view_host);
304 308
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 425
422 // Caches pages to be added to the history. 426 // Caches pages to be added to the history.
423 AddPageVector add_page_vector_; 427 AddPageVector add_page_vector_;
424 428
425 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 429 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
426 }; 430 };
427 431
428 } // namespace prerender 432 } // namespace prerender
429 433
430 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 434 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698