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

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

Issue 8540025: Prerendering: Add MatchComplete PPLT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 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 <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 RenderViewHost* render_view_host_mutable(); 99 RenderViewHost* render_view_host_mutable();
100 const RenderViewHost* render_view_host() const; 100 const RenderViewHost* render_view_host() const;
101 101
102 ViewHostMsg_FrameNavigate_Params* navigate_params() { 102 ViewHostMsg_FrameNavigate_Params* navigate_params() {
103 return navigate_params_.get(); 103 return navigate_params_.get();
104 } 104 }
105 string16 title() const { return title_; } 105 string16 title() const { return title_; }
106 int32 page_id() const { return page_id_; } 106 int32 page_id() const { return page_id_; }
107 GURL icon_url() const { return icon_url_; } 107 GURL icon_url() const { return icon_url_; }
108 const GURL& prerender_url() const { return prerender_url_; } 108 const GURL& prerender_url() const { return prerender_url_; }
109 const GURL& referrer() const { return referrer_; }
109 bool has_stopped_loading() const { return has_stopped_loading_; } 110 bool has_stopped_loading() const { return has_stopped_loading_; }
110 bool prerendering_has_started() const { return prerendering_has_started_; } 111 bool prerendering_has_started() const { return prerendering_has_started_; }
111 112
112 // Sets the parameter to the value of the associated RenderViewHost's child id 113 // Sets the parameter to the value of the associated RenderViewHost's child id
113 // and returns a boolean indicating the validity of that id. 114 // and returns a boolean indicating the validity of that id.
114 virtual bool GetChildId(int* child_id) const; 115 virtual bool GetChildId(int* child_id) const;
115 116
116 // Sets the parameter to the value of the associated RenderViewHost's route id 117 // Sets the parameter to the value of the associated RenderViewHost's route id
117 // and returns a boolean indicating the validity of that id. 118 // and returns a boolean indicating the validity of that id.
118 virtual bool GetRouteId(int* route_id) const; 119 virtual bool GetRouteId(int* route_id) const;
119 120
120 // Set the final status for how the PrerenderContents was used. This 121 // Set the final status for how the PrerenderContents was used. This
121 // should only be called once, and should be called before the prerender 122 // should only be called once, and should be called before the prerender
122 // contents are destroyed. 123 // contents are destroyed.
123 void set_final_status(FinalStatus final_status); 124 void set_final_status(FinalStatus final_status);
124 FinalStatus final_status() const { return final_status_; } 125 FinalStatus final_status() const { return final_status_; }
125 126
126 Origin origin() const { return origin_; } 127 Origin origin() const { return origin_; }
128 uint8 experiment_id() const { return experiment_id_; }
127 129
128 base::TimeTicks load_start_time() const { return load_start_time_; } 130 base::TimeTicks load_start_time() const { return load_start_time_; }
129 131
130 // Indicates whether this prerendered page can be used for the provided 132 // Indicates whether this prerendered page can be used for the provided
131 // URL, i.e. whether there is a match. |matching_url| is optional and will be 133 // URL, i.e. whether there is a match. |matching_url| is optional and will be
132 // set to the URL that is found as a match if it is provided. 134 // set to the URL that is found as a match if it is provided.
133 bool MatchesURL(const GURL& url, GURL* matching_url) const; 135 bool MatchesURL(const GURL& url, GURL* matching_url) const;
134 136
135 void OnJSOutOfMemory(); 137 void OnJSOutOfMemory();
136 bool ShouldSuppressDialogs(); 138 bool ShouldSuppressDialogs();
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 312
311 // Offset by which to offset prerendered pages 313 // Offset by which to offset prerendered pages
312 static const int32 kPrerenderPageIdOffset = 10; 314 static const int32 kPrerenderPageIdOffset = 10;
313 315
314 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 316 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
315 }; 317 };
316 318
317 } // namespace prerender 319 } // namespace prerender
318 320
319 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 321 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698