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

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

Issue 894843003: Move the RenderProcessGone IPC from RenderViewHost to RenderFrameHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Charlie's review. Created 5 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
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #include "content/browser/shared_worker/shared_worker_message_filter.h" 100 #include "content/browser/shared_worker/shared_worker_message_filter.h"
101 #include "content/browser/shared_worker/worker_storage_partition.h" 101 #include "content/browser/shared_worker/worker_storage_partition.h"
102 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 102 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
103 #include "content/browser/storage_partition_impl.h" 103 #include "content/browser/storage_partition_impl.h"
104 #include "content/browser/streams/stream_context.h" 104 #include "content/browser/streams/stream_context.h"
105 #include "content/browser/tracing/trace_message_filter.h" 105 #include "content/browser/tracing/trace_message_filter.h"
106 #include "content/browser/webui/web_ui_controller_factory_registry.h" 106 #include "content/browser/webui/web_ui_controller_factory_registry.h"
107 #include "content/common/child_process_host_impl.h" 107 #include "content/common/child_process_host_impl.h"
108 #include "content/common/child_process_messages.h" 108 #include "content/common/child_process_messages.h"
109 #include "content/common/content_switches_internal.h" 109 #include "content/common/content_switches_internal.h"
110 #include "content/common/frame_messages.h"
110 #include "content/common/gpu/gpu_memory_buffer_factory.h" 111 #include "content/common/gpu/gpu_memory_buffer_factory.h"
111 #include "content/common/gpu/gpu_messages.h" 112 #include "content/common/gpu/gpu_messages.h"
112 #include "content/common/mojo/mojo_messages.h" 113 #include "content/common/mojo/mojo_messages.h"
113 #include "content/common/resource_messages.h" 114 #include "content/common/resource_messages.h"
114 #include "content/common/view_messages.h" 115 #include "content/common/view_messages.h"
115 #include "content/public/browser/browser_context.h" 116 #include "content/public/browser/browser_context.h"
116 #include "content/public/browser/content_browser_client.h" 117 #include "content/public/browser/content_browser_client.h"
117 #include "content/public/browser/navigator_connect_context.h" 118 #include "content/public/browser/navigator_connect_context.h"
118 #include "content/public/browser/notification_service.h" 119 #include "content/public/browser/notification_service.h"
119 #include "content/public/browser/notification_types.h" 120 #include "content/public/browser/notification_types.h"
(...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 gpu_message_filter_ = NULL; 2067 gpu_message_filter_ = NULL;
2067 message_port_message_filter_ = NULL; 2068 message_port_message_filter_ = NULL;
2068 #if defined(ENABLE_BROWSER_CDMS) 2069 #if defined(ENABLE_BROWSER_CDMS)
2069 browser_cdm_manager_ = NULL; 2070 browser_cdm_manager_ = NULL;
2070 #endif 2071 #endif
2071 RemoveUserData(kSessionStorageHolderKey); 2072 RemoveUserData(kSessionStorageHolderKey);
2072 2073
2073 IDMap<IPC::Listener>::iterator iter(&listeners_); 2074 IDMap<IPC::Listener>::iterator iter(&listeners_);
2074 while (!iter.IsAtEnd()) { 2075 while (!iter.IsAtEnd()) {
2075 iter.GetCurrentValue()->OnMessageReceived( 2076 iter.GetCurrentValue()->OnMessageReceived(
2076 ViewHostMsg_RenderProcessGone(iter.GetCurrentKey(), 2077 FrameHostMsg_RenderProcessGone(iter.GetCurrentKey(),
2077 static_cast<int>(status), 2078 static_cast<int>(status),
2078 exit_code)); 2079 exit_code));
2079 iter.Advance(); 2080 iter.Advance();
2080 } 2081 }
2081 2082
2082 mojo_application_host_.reset(new MojoApplicationHost); 2083 mojo_application_host_.reset(new MojoApplicationHost);
2083 2084
2084 // It's possible that one of the calls out to the observers might have caused 2085 // It's possible that one of the calls out to the observers might have caused
2085 // this object to be no longer needed. 2086 // this object to be no longer needed.
2086 if (delayed_cleanup_needed_) 2087 if (delayed_cleanup_needed_)
2087 Cleanup(); 2088 Cleanup();
2088 2089
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 2389
2389 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2390 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2390 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2391 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2391 DCHECK_GT(worker_ref_count_, 0); 2392 DCHECK_GT(worker_ref_count_, 0);
2392 --worker_ref_count_; 2393 --worker_ref_count_;
2393 if (worker_ref_count_ == 0) 2394 if (worker_ref_count_ == 0)
2394 Cleanup(); 2395 Cleanup();
2395 } 2396 }
2396 2397
2397 } // namespace content 2398 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698