| 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 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 } | 1419 } |
| 1420 #endif | 1420 #endif |
| 1421 | 1421 |
| 1422 void RenderThreadImpl::OnCreateNewSharedWorker( | 1422 void RenderThreadImpl::OnCreateNewSharedWorker( |
| 1423 const WorkerProcessMsg_CreateWorker_Params& params) { | 1423 const WorkerProcessMsg_CreateWorker_Params& params) { |
| 1424 // EmbeddedSharedWorkerStub will self-destruct. | 1424 // EmbeddedSharedWorkerStub will self-destruct. |
| 1425 new EmbeddedSharedWorkerStub(params.url, | 1425 new EmbeddedSharedWorkerStub(params.url, |
| 1426 params.name, | 1426 params.name, |
| 1427 params.content_security_policy, | 1427 params.content_security_policy, |
| 1428 params.security_policy_type, | 1428 params.security_policy_type, |
| 1429 params.pause_on_start, |
| 1429 params.route_id); | 1430 params.route_id); |
| 1430 } | 1431 } |
| 1431 | 1432 |
| 1432 void RenderThreadImpl::OnMemoryPressure( | 1433 void RenderThreadImpl::OnMemoryPressure( |
| 1433 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { | 1434 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { |
| 1434 base::allocator::ReleaseFreeMemory(); | 1435 base::allocator::ReleaseFreeMemory(); |
| 1435 | 1436 |
| 1436 if (memory_pressure_level == | 1437 if (memory_pressure_level == |
| 1437 base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) { | 1438 base::MemoryPressureListener::MEMORY_PRESSURE_CRITICAL) { |
| 1438 // Trigger full v8 garbage collection on critical memory notification. | 1439 // Trigger full v8 garbage collection on critical memory notification. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 hidden_widget_count_--; | 1519 hidden_widget_count_--; |
| 1519 | 1520 |
| 1520 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1521 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1521 return; | 1522 return; |
| 1522 } | 1523 } |
| 1523 | 1524 |
| 1524 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1525 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1525 } | 1526 } |
| 1526 | 1527 |
| 1527 } // namespace content | 1528 } // namespace content |
| OLD | NEW |