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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 305103003: Fix for 'Simple Adblock' extension crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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_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/power_monitor_message_broadcaster.h" 17 #include "content/browser/power_monitor_message_broadcaster.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/public/browser/gpu_data_manager_observer.h" 19 #include "content/public/browser/gpu_data_manager_observer.h"
20 #include "content/public/browser/navigation_controller.h"
20 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
21 #include "ipc/ipc_channel_proxy.h" 22 #include "ipc/ipc_channel_proxy.h"
22 #include "ipc/ipc_platform_file.h" 23 #include "ipc/ipc_platform_file.h"
23 #include "mojo/public/cpp/bindings/interface_ptr.h" 24 #include "mojo/public/cpp/bindings/interface_ptr.h"
24 25
25 #if defined(OS_MACOSX) 26 #if defined(OS_MACOSX)
26 #include "base/mac/scoped_cftyperef.h" 27 #include "base/mac/scoped_cftyperef.h"
27 #endif 28 #endif
28 29
29 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; 30 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void EndFrameSubscription(int route_id); 176 void EndFrameSubscription(int route_id);
176 177
177 #if defined(ENABLE_WEBRTC) 178 #if defined(ENABLE_WEBRTC)
178 // Fires the webrtc log message callback with |message|, if callback is set. 179 // Fires the webrtc log message callback with |message|, if callback is set.
179 void WebRtcLogMessage(const std::string& message); 180 void WebRtcLogMessage(const std::string& message);
180 #endif 181 #endif
181 182
182 scoped_refptr<ScreenOrientationDispatcherHost> 183 scoped_refptr<ScreenOrientationDispatcherHost>
183 screen_orientation_dispatcher_host() const; 184 screen_orientation_dispatcher_host() const;
184 185
186 // Used to extend the lifetime of the sessions until the render view
187 // in the renderer is fully closed. This is static because its also called
188 // with mock hosts as input in test cases.
jsbell 2014/06/03 16:56:39 I don't see this used in tests?
michaeln 2014/06/03 18:58:09 The RenderProcessHost used by the viewhost is a mo
189 static void ReleaseOnCloseAck(
190 RenderProcessHost* host,
191 const SessionStorageNamespaceMap& sessions,
192 int view_route_id);
193
185 // Register/unregister the host identified by the host id in the global host 194 // Register/unregister the host identified by the host id in the global host
186 // list. 195 // list.
187 static void RegisterHost(int host_id, RenderProcessHost* host); 196 static void RegisterHost(int host_id, RenderProcessHost* host);
188 static void UnregisterHost(int host_id); 197 static void UnregisterHost(int host_id);
189 198
190 // Implementation of FilterURL below that can be shared with the mock class. 199 // Implementation of FilterURL below that can be shared with the mock class.
191 static void FilterURL(RenderProcessHost* rph, bool empty_allowed, GURL* url); 200 static void FilterURL(RenderProcessHost* rph, bool empty_allowed, GURL* url);
192 201
193 // Returns true if |host| is suitable for launching a new view with |site_url| 202 // Returns true if |host| is suitable for launching a new view with |site_url|
194 // in the given |browser_context|. 203 // in the given |browser_context|.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 294
286 // Creates and adds the IO thread message filters. 295 // Creates and adds the IO thread message filters.
287 void CreateMessageFilters(); 296 void CreateMessageFilters();
288 297
289 // Control message handlers. 298 // Control message handlers.
290 void OnShutdownRequest(); 299 void OnShutdownRequest();
291 void OnDumpHandlesDone(); 300 void OnDumpHandlesDone();
292 void SuddenTerminationChanged(bool enabled); 301 void SuddenTerminationChanged(bool enabled);
293 void OnUserMetricsRecordAction(const std::string& action); 302 void OnUserMetricsRecordAction(const std::string& action);
294 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); 303 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size);
304 void OnCloseACK(int old_route_id);
jsbell 2014/06/03 16:56:39 Nit: inconsistent capitalization (Ack vs. ACK)
michaeln 2014/06/03 18:58:09 Done, going with ACK to match OnClosePageACK
295 305
296 // CompositorSurfaceBuffersSwapped handler when there's no RWH. 306 // CompositorSurfaceBuffersSwapped handler when there's no RWH.
297 void OnCompositorSurfaceBuffersSwappedNoHost( 307 void OnCompositorSurfaceBuffersSwappedNoHost(
298 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); 308 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params);
299 309
300 // Generates a command line to be used to spawn a renderer and appends the 310 // Generates a command line to be used to spawn a renderer and appends the
301 // results to |*command_line|. 311 // results to |*command_line|.
302 void AppendRendererCommandLine(base::CommandLine* command_line) const; 312 void AppendRendererCommandLine(base::CommandLine* command_line) const;
303 313
304 // Copies applicable command line switches from the given |browser_cmd| line 314 // Copies applicable command line switches from the given |browser_cmd| line
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 #if defined(OS_MACOSX) 463 #if defined(OS_MACOSX)
454 base::ScopedCFTypeRef<CFTypeRef> last_io_surface_; 464 base::ScopedCFTypeRef<CFTypeRef> last_io_surface_;
455 #endif 465 #endif
456 466
457 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 467 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
458 }; 468 };
459 469
460 } // namespace content 470 } // namespace content
461 471
462 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ 472 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698