| 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 <vector> | 10 #include <vector> |
| (...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 #endif | 1527 #endif |
| 1528 | 1528 |
| 1529 void RenderThreadImpl::OnCreateNewSharedWorker( | 1529 void RenderThreadImpl::OnCreateNewSharedWorker( |
| 1530 const WorkerProcessMsg_CreateWorker_Params& params) { | 1530 const WorkerProcessMsg_CreateWorker_Params& params) { |
| 1531 // EmbeddedSharedWorkerStub will self-destruct. | 1531 // EmbeddedSharedWorkerStub will self-destruct. |
| 1532 new EmbeddedSharedWorkerStub(params.url, | 1532 new EmbeddedSharedWorkerStub(params.url, |
| 1533 params.name, | 1533 params.name, |
| 1534 params.content_security_policy, | 1534 params.content_security_policy, |
| 1535 params.security_policy_type, | 1535 params.security_policy_type, |
| 1536 params.pause_on_start, | 1536 params.pause_on_start, |
| 1537 params.route_id); | 1537 params.route_id, |
| 1538 params.accept_languages); |
| 1539 |
| 1538 } | 1540 } |
| 1539 | 1541 |
| 1540 void RenderThreadImpl::OnMemoryPressure( | 1542 void RenderThreadImpl::OnMemoryPressure( |
| 1541 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { | 1543 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { |
| 1542 base::allocator::ReleaseFreeMemory(); | 1544 base::allocator::ReleaseFreeMemory(); |
| 1543 | 1545 |
| 1544 // Trigger full v8 garbage collection on critical memory notification. This | 1546 // Trigger full v8 garbage collection on critical memory notification. This |
| 1545 // will potentially hang the renderer for a long time, however, when we | 1547 // will potentially hang the renderer for a long time, however, when we |
| 1546 // receive a memory pressure notification, we might be about to be killed. | 1548 // receive a memory pressure notification, we might be about to be killed. |
| 1547 if (webkit_platform_support_ && blink::mainThreadIsolate()) { | 1549 if (webkit_platform_support_ && blink::mainThreadIsolate()) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1620 hidden_widget_count_--; | 1622 hidden_widget_count_--; |
| 1621 | 1623 |
| 1622 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1624 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1623 return; | 1625 return; |
| 1624 } | 1626 } |
| 1625 | 1627 |
| 1626 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1628 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1627 } | 1629 } |
| 1628 | 1630 |
| 1629 } // namespace content | 1631 } // namespace content |
| OLD | NEW |