| 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 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 | 1757 |
| 1758 void RenderThreadImpl::OnProcessPurgeAndSuspend() { | 1758 void RenderThreadImpl::OnProcessPurgeAndSuspend() { |
| 1759 ChildThreadImpl::OnProcessPurgeAndSuspend(); | 1759 ChildThreadImpl::OnProcessPurgeAndSuspend(); |
| 1760 if (is_renderer_suspended_) | 1760 if (is_renderer_suspended_) |
| 1761 return; | 1761 return; |
| 1762 // TODO(hajimehoshi): Implement purging e.g. cache (crbug/607077) | 1762 // TODO(hajimehoshi): Implement purging e.g. cache (crbug/607077) |
| 1763 is_renderer_suspended_ = true; | 1763 is_renderer_suspended_ = true; |
| 1764 renderer_scheduler_->SuspendRenderer(); | 1764 renderer_scheduler_->SuspendRenderer(); |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 void RenderThreadImpl::OnProcessResume() { |
| 1768 ChildThreadImpl::OnProcessResume(); |
| 1769 if (!is_renderer_suspended_) |
| 1770 return; |
| 1771 |
| 1772 is_renderer_suspended_ = false; |
| 1773 renderer_scheduler_->ResumeRenderer(); |
| 1774 } |
| 1775 |
| 1767 void RenderThreadImpl::OnCreateNewFrame(FrameMsg_NewFrame_Params params) { | 1776 void RenderThreadImpl::OnCreateNewFrame(FrameMsg_NewFrame_Params params) { |
| 1768 // Debug cases of https://crbug.com/626802. | 1777 // Debug cases of https://crbug.com/626802. |
| 1769 base::debug::SetCrashKeyValue("newframe_routing_id", | 1778 base::debug::SetCrashKeyValue("newframe_routing_id", |
| 1770 base::IntToString(params.routing_id)); | 1779 base::IntToString(params.routing_id)); |
| 1771 base::debug::SetCrashKeyValue("newframe_proxy_id", | 1780 base::debug::SetCrashKeyValue("newframe_proxy_id", |
| 1772 base::IntToString(params.proxy_routing_id)); | 1781 base::IntToString(params.proxy_routing_id)); |
| 1773 base::debug::SetCrashKeyValue("newframe_opener_id", | 1782 base::debug::SetCrashKeyValue("newframe_opener_id", |
| 1774 base::IntToString(params.opener_routing_id)); | 1783 base::IntToString(params.opener_routing_id)); |
| 1775 base::debug::SetCrashKeyValue("newframe_parent_id", | 1784 base::debug::SetCrashKeyValue("newframe_parent_id", |
| 1776 base::IntToString(params.parent_routing_id)); | 1785 base::IntToString(params.parent_routing_id)); |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 if (blink::mainThreadIsolate()) { | 2318 if (blink::mainThreadIsolate()) { |
| 2310 blink::mainThreadIsolate()->MemoryPressureNotification( | 2319 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2311 v8::MemoryPressureLevel::kCritical); | 2320 v8::MemoryPressureLevel::kCritical); |
| 2312 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2321 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2313 v8::MemoryPressureLevel::kCritical); | 2322 v8::MemoryPressureLevel::kCritical); |
| 2314 } | 2323 } |
| 2315 } | 2324 } |
| 2316 | 2325 |
| 2317 | 2326 |
| 2318 } // namespace content | 2327 } // namespace content |
| OLD | NEW |