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