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

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

Issue 6263014: Add Perceived PageLoad Time (PPLT) metrics for Prerender Experiments,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 RenderViewHost* render_view_host() { return render_view_host_; } 44 RenderViewHost* render_view_host() { return render_view_host_; }
45 // Allows replacing of the RenderViewHost owned by this class, including 45 // Allows replacing of the RenderViewHost owned by this class, including
46 // replacing with a NULL value. When a caller uses this, the caller will 46 // replacing with a NULL value. When a caller uses this, the caller will
47 // own (and is responsible for freeing) the old RVH. 47 // own (and is responsible for freeing) the old RVH.
48 void set_render_view_host(RenderViewHost* rvh) { render_view_host_ = rvh; } 48 void set_render_view_host(RenderViewHost* rvh) { render_view_host_ = rvh; }
49 ViewHostMsg_FrameNavigate_Params* navigate_params() { 49 ViewHostMsg_FrameNavigate_Params* navigate_params() {
50 return navigate_params_.get(); 50 return navigate_params_.get();
51 } 51 }
52 string16 title() const { return title_; } 52 string16 title() const { return title_; }
53 int32 page_id() const { return page_id_; } 53 int32 page_id() const { return page_id_; }
54 bool has_stopped_loading() const { return has_stopped_loading_; }
54 55
55 // Indicates whether this prerendered page can be used for the provided 56 // Indicates whether this prerendered page can be used for the provided
56 // URL, i.e. whether there is a match. 57 // URL, i.e. whether there is a match.
57 bool MatchesURL(const GURL& url) const; 58 bool MatchesURL(const GURL& url) const;
58 59
59 // RenderViewHostDelegate implementation. 60 // RenderViewHostDelegate implementation.
60 virtual RenderViewHostDelegate::View* GetViewDelegate(); 61 virtual RenderViewHostDelegate::View* GetViewDelegate();
61 virtual const GURL& GetURL() const; 62 virtual const GURL& GetURL() const;
62 virtual ViewType::Type GetRenderViewType() const; 63 virtual ViewType::Type GetRenderViewType() const;
63 virtual int GetBrowserWindowID() const; 64 virtual int GetBrowserWindowID() const;
64 virtual void DidNavigate(RenderViewHost* render_view_host, 65 virtual void DidNavigate(RenderViewHost* render_view_host,
65 const ViewHostMsg_FrameNavigate_Params& params); 66 const ViewHostMsg_FrameNavigate_Params& params);
66 virtual void UpdateTitle(RenderViewHost* render_view_host, 67 virtual void UpdateTitle(RenderViewHost* render_view_host,
67 int32 page_id, 68 int32 page_id,
68 const std::wstring& title); 69 const std::wstring& title);
69 virtual WebPreferences GetWebkitPrefs(); 70 virtual WebPreferences GetWebkitPrefs();
70 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); 71 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params);
71 virtual void RunJavaScriptMessage(const std::wstring& message, 72 virtual void RunJavaScriptMessage(const std::wstring& message,
72 const std::wstring& default_prompt, 73 const std::wstring& default_prompt,
73 const GURL& frame_url, 74 const GURL& frame_url,
74 const int flags, 75 const int flags,
75 IPC::Message* reply_msg, 76 IPC::Message* reply_msg,
76 bool* did_suppress_message); 77 bool* did_suppress_message);
77 virtual void Close(RenderViewHost* render_view_host); 78 virtual void Close(RenderViewHost* render_view_host);
79 virtual void DidStopLoading();
78 virtual RendererPreferences GetRendererPrefs(Profile* profile) const; 80 virtual RendererPreferences GetRendererPrefs(Profile* profile) const;
79 81
80 // RenderViewHostDelegate::View 82 // RenderViewHostDelegate::View
81 virtual void CreateNewWindow( 83 virtual void CreateNewWindow(
82 int route_id, 84 int route_id,
83 const ViewHostMsg_CreateWindow_Params& params); 85 const ViewHostMsg_CreateWindow_Params& params);
84 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type); 86 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type);
85 virtual void CreateNewFullscreenWidget( 87 virtual void CreateNewFullscreenWidget(
86 int route_id, WebKit::WebPopupType popup_type); 88 int route_id, WebKit::WebPopupType popup_type);
87 virtual void ShowCreatedWindow(int route_id, 89 virtual void ShowCreatedWindow(int route_id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 string16 title_; 179 string16 title_;
178 int32 page_id_; 180 int32 page_id_;
179 GURL url_; 181 GURL url_;
180 NotificationRegistrar registrar_; 182 NotificationRegistrar registrar_;
181 183
182 // A vector of URLs that this prerendered page matches against. 184 // A vector of URLs that this prerendered page matches against.
183 // This array can contain more than element as a result of redirects, 185 // This array can contain more than element as a result of redirects,
184 // such as HTTP redirects or javascript redirects. 186 // such as HTTP redirects or javascript redirects.
185 std::vector<GURL> alias_urls_; 187 std::vector<GURL> alias_urls_;
186 188
189 bool has_stopped_loading_;
190
187 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 191 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
188 }; 192 };
189 193
190 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 194 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | chrome/browser/tab_contents/tab_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698