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

Side by Side Diff: content/browser/renderer_host/render_process_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: Rebase + addressed some of Nasko's comments Created 6 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) 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_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/process/process.h" 14 #include "base/process/process.h"
15 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
16 #include "content/browser/child_process_launcher.h" 16 #include "content/browser/child_process_launcher.h"
17 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 17 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
18 #include "content/browser/power_monitor_message_broadcaster.h" 18 #include "content/browser/power_monitor_message_broadcaster.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/public/browser/global_request_id.h"
21 #include "content/public/browser/gpu_data_manager_observer.h" 20 #include "content/public/browser/gpu_data_manager_observer.h"
22 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
23 #include "ipc/ipc_channel_proxy.h" 22 #include "ipc/ipc_channel_proxy.h"
24 #include "ipc/ipc_platform_file.h" 23 #include "ipc/ipc_platform_file.h"
25 #include "ui/surface/transport_dib.h" 24 #include "ui/surface/transport_dib.h"
26 25
27 class CommandLine; 26 class CommandLine;
28 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; 27 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;
29 28
30 namespace base { 29 namespace base {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 virtual void AddFilter(BrowserMessageFilter* filter) OVERRIDE; 117 virtual void AddFilter(BrowserMessageFilter* filter) OVERRIDE;
119 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; 118 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE;
120 virtual bool FastShutdownStarted() const OVERRIDE; 119 virtual bool FastShutdownStarted() const OVERRIDE;
121 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; 120 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE;
122 virtual void ResumeRequestsForView(int route_id) OVERRIDE; 121 virtual void ResumeRequestsForView(int route_id) OVERRIDE;
123 virtual void FilterURL(bool empty_allowed, GURL* url) OVERRIDE; 122 virtual void FilterURL(bool empty_allowed, GURL* url) OVERRIDE;
124 #if defined(ENABLE_WEBRTC) 123 #if defined(ENABLE_WEBRTC)
125 virtual void EnableAecDump(const base::FilePath& file) OVERRIDE; 124 virtual void EnableAecDump(const base::FilePath& file) OVERRIDE;
126 virtual void DisableAecDump() OVERRIDE; 125 virtual void DisableAecDump() OVERRIDE;
127 #endif 126 #endif
127 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id)
128 OVERRIDE;
128 129
129 // IPC::Sender via RenderProcessHost. 130 // IPC::Sender via RenderProcessHost.
130 virtual bool Send(IPC::Message* msg) OVERRIDE; 131 virtual bool Send(IPC::Message* msg) OVERRIDE;
131 132
132 // IPC::Listener via RenderProcessHost. 133 // IPC::Listener via RenderProcessHost.
133 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 134 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
134 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 135 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
135 virtual void OnChannelError() OVERRIDE; 136 virtual void OnChannelError() OVERRIDE;
136 137
137 // ChildProcessLauncher::Client implementation. 138 // ChildProcessLauncher::Client implementation.
138 virtual void OnProcessLaunched() OVERRIDE; 139 virtual void OnProcessLaunched() OVERRIDE;
139 140
140 scoped_refptr<AudioRendererHost> audio_renderer_host() const; 141 scoped_refptr<AudioRendererHost> audio_renderer_host() const;
141 142
142 // Tells the ResourceDispatcherHost to resume a deferred navigation without
143 // transferring it to a new renderer process.
144 void ResumeDeferredNavigation(const GlobalRequestID& request_id);
145
146 // Call this function when it is evident that the child process is actively 143 // Call this function when it is evident that the child process is actively
147 // performing some operation, for example if we just received an IPC message. 144 // performing some operation, for example if we just received an IPC message.
148 void mark_child_process_activity_time() { 145 void mark_child_process_activity_time() {
149 child_process_activity_time_ = base::TimeTicks::Now(); 146 child_process_activity_time_ = base::TimeTicks::Now();
150 } 147 }
151 148
152 // Returns the current number of active views in this process. Excludes 149 // Returns the current number of active views in this process. Excludes
153 // any RenderViewHosts that are swapped out. 150 // any RenderViewHosts that are swapped out.
154 int GetActiveViewCount(); 151 int GetActiveViewCount();
155 152
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 388
392 // Lives on the browser's ChildThread. 389 // Lives on the browser's ChildThread.
393 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 390 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
394 391
395 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 392 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
396 }; 393 };
397 394
398 } // namespace content 395 } // namespace content
399 396
400 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 397 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698