| 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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 media::MediaCodecUtil::IsMediaCodecAvailable()) { | 827 media::MediaCodecUtil::IsMediaCodecAvailable()) { |
| 828 media::EnablePlatformDecoderSupport(); | 828 media::EnablePlatformDecoderSupport(); |
| 829 } | 829 } |
| 830 #endif | 830 #endif |
| 831 | 831 |
| 832 memory_pressure_listener_.reset(new base::MemoryPressureListener( | 832 memory_pressure_listener_.reset(new base::MemoryPressureListener( |
| 833 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)), | 833 base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)), |
| 834 base::Bind(&RenderThreadImpl::OnSyncMemoryPressure, | 834 base::Bind(&RenderThreadImpl::OnSyncMemoryPressure, |
| 835 base::Unretained(this)))); | 835 base::Unretained(this)))); |
| 836 | 836 |
| 837 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { | 837 if (ChildMemoryCoordinatorImpl::IsEnabled()) { |
| 838 // TODO(bashi): Revisit how to manage the lifetime of | 838 // TODO(bashi): Revisit how to manage the lifetime of |
| 839 // ChildMemoryCoordinatorImpl. | 839 // ChildMemoryCoordinatorImpl. |
| 840 // https://codereview.chromium.org/2094583002/#msg52 | 840 // https://codereview.chromium.org/2094583002/#msg52 |
| 841 mojom::MemoryCoordinatorHandlePtr parent_coordinator; | 841 mojom::MemoryCoordinatorHandlePtr parent_coordinator; |
| 842 GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&parent_coordinator)); | 842 GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&parent_coordinator)); |
| 843 memory_coordinator_ = CreateChildMemoryCoordinator( | 843 memory_coordinator_ = CreateChildMemoryCoordinator( |
| 844 std::move(parent_coordinator), this); | 844 std::move(parent_coordinator), this); |
| 845 } | 845 } |
| 846 | 846 |
| 847 int num_raster_threads = 0; | 847 int num_raster_threads = 0; |
| (...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 if (blink::mainThreadIsolate()) { | 2309 if (blink::mainThreadIsolate()) { |
| 2310 blink::mainThreadIsolate()->MemoryPressureNotification( | 2310 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2311 v8::MemoryPressureLevel::kCritical); | 2311 v8::MemoryPressureLevel::kCritical); |
| 2312 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2312 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2313 v8::MemoryPressureLevel::kCritical); | 2313 v8::MemoryPressureLevel::kCritical); |
| 2314 } | 2314 } |
| 2315 } | 2315 } |
| 2316 | 2316 |
| 2317 | 2317 |
| 2318 } // namespace content | 2318 } // namespace content |
| OLD | NEW |