| OLD | NEW | 
|     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 #include "content/renderer/render_thread_impl.h" |     5 #include "content/renderer/render_thread_impl.h" | 
|     6  |     6  | 
|     7 #include <algorithm> |     7 #include <algorithm> | 
|     8 #include <limits> |     8 #include <limits> | 
|     9 #include <map> |     9 #include <map> | 
|    10 #include <utility> |    10 #include <utility> | 
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1097           make_scoped_refptr(new PendingFrameCreate( |  1097           make_scoped_refptr(new PendingFrameCreate( | 
|  1098               routing_id, std::move(frame_request), std::move(frame_host))))); |  1098               routing_id, std::move(frame_request), std::move(frame_host))))); | 
|  1099   CHECK(result.second) << "Inserting a duplicate item."; |  1099   CHECK(result.second) << "Inserting a duplicate item."; | 
|  1100 } |  1100 } | 
|  1101  |  1101  | 
|  1102 mojom::StoragePartitionService* RenderThreadImpl::GetStoragePartitionService() { |  1102 mojom::StoragePartitionService* RenderThreadImpl::GetStoragePartitionService() { | 
|  1103   return storage_partition_service_.get(); |  1103   return storage_partition_service_.get(); | 
|  1104 } |  1104 } | 
|  1105  |  1105  | 
|  1106 int RenderThreadImpl::GenerateRoutingID() { |  1106 int RenderThreadImpl::GenerateRoutingID() { | 
|  1107   int routing_id = MSG_ROUTING_NONE; |  1107   int32_t routing_id = MSG_ROUTING_NONE; | 
|  1108   Send(new ViewHostMsg_GenerateRoutingID(&routing_id)); |  1108   render_message_filter()->GenerateRoutingID(&routing_id); | 
|  1109   return routing_id; |  1109   return routing_id; | 
|  1110 } |  1110 } | 
|  1111  |  1111  | 
|  1112 void RenderThreadImpl::AddFilter(IPC::MessageFilter* filter) { |  1112 void RenderThreadImpl::AddFilter(IPC::MessageFilter* filter) { | 
|  1113   channel()->AddFilter(filter); |  1113   channel()->AddFilter(filter); | 
|  1114 } |  1114 } | 
|  1115  |  1115  | 
|  1116 void RenderThreadImpl::RemoveFilter(IPC::MessageFilter* filter) { |  1116 void RenderThreadImpl::RemoveFilter(IPC::MessageFilter* filter) { | 
|  1117   channel()->RemoveFilter(filter); |  1117   channel()->RemoveFilter(filter); | 
|  1118 } |  1118 } | 
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1991 } |  1991 } | 
|  1992 #endif |  1992 #endif | 
|  1993  |  1993  | 
|  1994 mojom::RenderFrameMessageFilter* |  1994 mojom::RenderFrameMessageFilter* | 
|  1995 RenderThreadImpl::render_frame_message_filter() { |  1995 RenderThreadImpl::render_frame_message_filter() { | 
|  1996   if (!render_frame_message_filter_) |  1996   if (!render_frame_message_filter_) | 
|  1997     GetChannel()->GetRemoteAssociatedInterface(&render_frame_message_filter_); |  1997     GetChannel()->GetRemoteAssociatedInterface(&render_frame_message_filter_); | 
|  1998   return render_frame_message_filter_.get(); |  1998   return render_frame_message_filter_.get(); | 
|  1999 } |  1999 } | 
|  2000  |  2000  | 
 |  2001 mojom::RenderMessageFilter* RenderThreadImpl::render_message_filter() { | 
 |  2002   if (!render_message_filter_) | 
 |  2003     GetChannel()->GetRemoteAssociatedInterface(&render_message_filter_); | 
 |  2004   return render_message_filter_.get(); | 
 |  2005 } | 
 |  2006  | 
|  2001 gpu::GpuChannelHost* RenderThreadImpl::GetGpuChannel() { |  2007 gpu::GpuChannelHost* RenderThreadImpl::GetGpuChannel() { | 
|  2002   if (!gpu_channel_) |  2008   if (!gpu_channel_) | 
|  2003     return nullptr; |  2009     return nullptr; | 
|  2004   if (gpu_channel_->IsLost()) |  2010   if (gpu_channel_->IsLost()) | 
|  2005     return nullptr; |  2011     return nullptr; | 
|  2006   return gpu_channel_.get(); |  2012   return gpu_channel_.get(); | 
|  2007 } |  2013 } | 
|  2008  |  2014  | 
|  2009 #if defined(ENABLE_PLUGINS) |  2015 #if defined(ENABLE_PLUGINS) | 
|  2010 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { |  2016 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { | 
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2285   if (blink::mainThreadIsolate()) { |  2291   if (blink::mainThreadIsolate()) { | 
|  2286     blink::mainThreadIsolate()->MemoryPressureNotification( |  2292     blink::mainThreadIsolate()->MemoryPressureNotification( | 
|  2287         v8::MemoryPressureLevel::kCritical); |  2293         v8::MemoryPressureLevel::kCritical); | 
|  2288     blink::MemoryPressureNotificationToWorkerThreadIsolates( |  2294     blink::MemoryPressureNotificationToWorkerThreadIsolates( | 
|  2289         v8::MemoryPressureLevel::kCritical); |  2295         v8::MemoryPressureLevel::kCritical); | 
|  2290   } |  2296   } | 
|  2291 } |  2297 } | 
|  2292  |  2298  | 
|  2293  |  2299  | 
|  2294 }  // namespace content |  2300 }  // namespace content | 
| OLD | NEW |