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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nasko's comments Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h"
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 #include "content/public/browser/render_frame_host.h" 13 #include "content/public/browser/render_frame_host.h"
13 14
14 class GURL; 15 class GURL;
15 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 16 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
16 17
17 namespace base { 18 namespace base {
18 class FilePath; 19 class FilePath;
19 } 20 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 72
72 // Hack to get this subframe to swap out, without yet moving over all the 73 // Hack to get this subframe to swap out, without yet moving over all the
73 // SwapOut state and machinery from RenderViewHost. 74 // SwapOut state and machinery from RenderViewHost.
74 void SwapOut(); 75 void SwapOut();
75 void OnSwappedOut(bool timed_out); 76 void OnSwappedOut(bool timed_out);
76 bool is_swapped_out() { return is_swapped_out_; } 77 bool is_swapped_out() { return is_swapped_out_; }
77 void set_swapped_out(bool is_swapped_out) { 78 void set_swapped_out(bool is_swapped_out) {
78 is_swapped_out_ = is_swapped_out; 79 is_swapped_out_ = is_swapped_out;
79 } 80 }
80 81
82 // Sets the RVH for |this| as pending shutdown. |on_swap_out| will be called
83 // when the swap out ack is received.
Charlie Reis 2014/01/31 19:11:55 nit: SwapOutACK
clamy 2014/02/05 14:21:42 Done.
84 void SetPendingShutdown(const base::Closure& on_swap_out);
85
81 protected: 86 protected:
82 friend class RenderFrameHostFactory; 87 friend class RenderFrameHostFactory;
83 88
84 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 89 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
85 // should be the abstraction needed here, but we need RenderViewHost to pass 90 // should be the abstraction needed here, but we need RenderViewHost to pass
86 // into WebContentsObserver::FrameDetached for now. 91 // into WebContentsObserver::FrameDetached for now.
87 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 92 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
88 RenderFrameHostDelegate* delegate, 93 RenderFrameHostDelegate* delegate,
89 FrameTree* frame_tree, 94 FrameTree* frame_tree,
90 FrameTreeNode* frame_tree_node, 95 FrameTreeNode* frame_tree_node,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 144
140 int routing_id_; 145 int routing_id_;
141 bool is_swapped_out_; 146 bool is_swapped_out_;
142 147
143 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 148 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
144 }; 149 };
145 150
146 } // namespace content 151 } // namespace content
147 152
148 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 153 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698