Add discardable memory emulation for non-android/mac platforms
commitcef6c76ff40bf74edbcf8df0a19dc0c08fb7daca
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 30 Oct 2013 16:33:30 +0000 (30 16:33 +0000)
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 30 Oct 2013 16:33:30 +0000 (30 16:33 +0000)
tree56d1e3257dc3bea4d04dbaa36b84b4fd655c7c50
parent1bc20daed0a965dadbe4a140ee53057a1dac280a
Add discardable memory emulation for non-android/mac platforms

Adds support for emulated discardable memory. The memory is managed by a
provider which listens for memory pressure notifications from the platform.

Currently, only android pushes these notifications, but in future patches, we
will apply pressure on other platforms in certain situations (e.g., when a tab
gets backgrounded).

BUG=237681

Review URL: https://codereview.chromium.org/17106004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231845 0039d316-1c4b-4281-b951-d872f2087c98
15 files changed:
base/base.gyp
base/base.gypi
base/containers/mru_cache.h
base/memory/discardable_memory.cc [deleted file]
base/memory/discardable_memory.h
base/memory/discardable_memory_android.cc
base/memory/discardable_memory_emulated.cc [new file with mode: 0644]
base/memory/discardable_memory_mac.cc
base/memory/discardable_memory_provider.cc [new file with mode: 0644]
base/memory/discardable_memory_provider.h [new file with mode: 0644]
base/memory/discardable_memory_provider_unittest.cc [new file with mode: 0644]
base/memory/discardable_memory_unittest.cc
build/common.gypi
skia/ext/SkDiscardableMemory_chrome.cc
webkit/child/webkitplatformsupport_child_impl.cc