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

Side by Side Diff: content/browser/web_contents/render_view_host_manager.h

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts Created 7 years, 6 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 CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 // Returns the currently showing interstitial, NULL if no interstitial is 200 // Returns the currently showing interstitial, NULL if no interstitial is
201 // showing. 201 // showing.
202 InterstitialPageImpl* interstitial_page() const { return interstitial_page_; } 202 InterstitialPageImpl* interstitial_page() const { return interstitial_page_; }
203 203
204 // RenderViewHostDelegate::RendererManagement implementation. 204 // RenderViewHostDelegate::RendererManagement implementation.
205 virtual void ShouldClosePage( 205 virtual void ShouldClosePage(
206 bool for_cross_site_transition, 206 bool for_cross_site_transition,
207 bool proceed, 207 bool proceed,
208 const base::TimeTicks& proceed_time) OVERRIDE; 208 const base::TimeTicks& proceed_time) OVERRIDE;
209 virtual void OnCrossSiteResponse(int new_render_process_host_id,
210 int new_request_id) OVERRIDE;
211 209
212 // NotificationObserver implementation. 210 // NotificationObserver implementation.
213 virtual void Observe(int type, 211 virtual void Observe(int type,
214 const NotificationSource& source, 212 const NotificationSource& source,
215 const NotificationDetails& details) OVERRIDE; 213 const NotificationDetails& details) OVERRIDE;
216 214
217 // Called when a RenderViewHost is about to be deleted. 215 // Called when a RenderViewHost is about to be deleted.
218 void RenderViewDeleted(RenderViewHost* rvh); 216 void RenderViewDeleted(RenderViewHost* rvh);
219 217
220 // Returns whether the given RenderViewHost is on the list of swapped out 218 // Returns whether the given RenderViewHost is on the list of swapped out
221 // RenderViewHosts. 219 // RenderViewHosts.
222 bool IsOnSwappedOutList(RenderViewHost* rvh) const; 220 bool IsOnSwappedOutList(RenderViewHost* rvh) const;
223 221
224 // Returns the swapped out RenderViewHost for the given SiteInstance, if any. 222 // Returns the swapped out RenderViewHost for the given SiteInstance, if any.
225 RenderViewHostImpl* GetSwappedOutRenderViewHost(SiteInstance* instance); 223 RenderViewHostImpl* GetSwappedOutRenderViewHost(SiteInstance* instance);
226 224
225 // Runs the unload handler in the current page, when we know that a pending
226 // cross-process navigation is going to commit.
227 void SwapOutOldPage();
228
227 private: 229 private:
228 friend class RenderViewHostManagerTest; 230 friend class RenderViewHostManagerTest;
229 friend class TestWebContents; 231 friend class TestWebContents;
230 232
231 // Returns whether this tab should transition to a new renderer for 233 // Returns whether this tab should transition to a new renderer for
232 // cross-site URLs. Enabled unless we see the --process-per-tab command line 234 // cross-site URLs. Enabled unless we see the --process-per-tab command line
233 // switch. Can be overridden in unit tests. 235 // switch. Can be overridden in unit tests.
234 bool ShouldTransitionCrossSite(); 236 bool ShouldTransitionCrossSite();
235 237
236 // Returns true if the two navigation entries are incompatible in some way 238 // Returns true if the two navigation entries are incompatible in some way
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 InterstitialPageImpl* interstitial_page_; 322 InterstitialPageImpl* interstitial_page_;
321 323
322 NotificationRegistrar registrar_; 324 NotificationRegistrar registrar_;
323 325
324 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); 326 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager);
325 }; 327 };
326 328
327 } // namespace content 329 } // namespace content
328 330
329 #endif // CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ 331 #endif // CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698