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

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

Issue 8392041: Prerendered tabs use the same SessionStorage namespace as the tab that triggered the prerender. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove check 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/prerender/prerender_final_status.h" 16 #include "chrome/browser/prerender/prerender_final_status.h"
17 #include "content/browser/tab_contents/tab_contents_observer.h" 17 #include "content/browser/tab_contents/tab_contents_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 19
20 class Profile; 20 class Profile;
21 class RenderViewHost; 21 class RenderViewHost;
22 class RenderViewHostDelegate; 22 class RenderViewHostDelegate;
23 class SessionStorageNamespace;
23 class TabContents; 24 class TabContents;
24 class TabContentsWrapper; 25 class TabContentsWrapper;
25 struct FaviconURL; 26 struct FaviconURL;
26 struct ViewHostMsg_FrameNavigate_Params; 27 struct ViewHostMsg_FrameNavigate_Params;
27 28
28 namespace base { 29 namespace base {
29 class ProcessMetrics; 30 class ProcessMetrics;
30 } 31 }
31 32
32 namespace gfx { 33 namespace gfx {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }; 80 };
80 typedef std::list<PendingPrerenderData> PendingPrerenderList; 81 typedef std::list<PendingPrerenderData> PendingPrerenderList;
81 82
82 virtual ~PrerenderContents(); 83 virtual ~PrerenderContents();
83 84
84 bool Init(); 85 bool Init();
85 86
86 static Factory* CreateFactory(); 87 static Factory* CreateFactory();
87 88
88 // |source_render_view_host| is the RenderViewHost that initiated 89 // |source_render_view_host| is the RenderViewHost that initiated
89 // prerendering. It must be non-NULL and have its own view. It is used 90 // prerendering.
90 // solely to determine the window bounds while prerendering. 91 virtual void StartPrerendering(
91 virtual void StartPrerendering(const RenderViewHost* source_render_view_host); 92 const RenderViewHost* source_render_view_host,
93 SessionStorageNamespace* session_storage_namespace);
92 94
93 // Verifies that the prerendering is not using too many resources, and kills 95 // Verifies that the prerendering is not using too many resources, and kills
94 // it if not. 96 // it if not.
95 void DestroyWhenUsingTooManyResources(); 97 void DestroyWhenUsingTooManyResources();
96 98
97 RenderViewHost* render_view_host_mutable(); 99 RenderViewHost* render_view_host_mutable();
98 const RenderViewHost* render_view_host() const; 100 const RenderViewHost* render_view_host() const;
99 101
100 ViewHostMsg_FrameNavigate_Params* navigate_params() { 102 ViewHostMsg_FrameNavigate_Params* navigate_params() {
101 return navigate_params_.get(); 103 return navigate_params_.get();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 310
309 // Offset by which to offset prerendered pages 311 // Offset by which to offset prerendered pages
310 static const int32 kPrerenderPageIdOffset = 10; 312 static const int32 kPrerenderPageIdOffset = 10;
311 313
312 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 314 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
313 }; 315 };
314 316
315 } // namespace prerender 317 } // namespace prerender
316 318
317 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 319 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698