Adding Baseframework of the ResourceManager (all hooks and observers)
commitc8c38693393c172a44abdd18e4232ed1479be9bd
authorskuhne <skuhne@chromium.org>
Thu, 28 Aug 2014 00:47:30 +0000 (27 17:47 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 28 Aug 2014 00:48:13 +0000 (28 00:48 +0000)
tree95d7c12d108f935ad973afd4a34106fadac803c3
parentc99c87acd111df5c08f20e89e84e3ae1edfc4d4e
Adding Baseframework of the ResourceManager (all hooks and observers)
are being put in place with a very basic management scheme

The current ash implementation of the LowMemoryObserver polls
"/dev/chromeos-low-mem" to find if we are running out of memory.
After discussion with semenzato@ we decided that that is not precise
enough and we should rather poll the system memory information. Going
forward this has multiple benefits:
 1. it does not require special kernel handling.
 2. it also gives us information about GPU memory on chromeOS which
    will come handy once we are adding more sophisticated management.

Beside that, this CL adds the ResourceManager which hooks itself into
several components to detect changes in Activity's and their ordering
as well as memory pressure.

Note: The current management implementation itself is really primitive
and needs to be improved.

TBR for the DEPS file

BUG=381212, 403782
TEST=MemoryPressureTest.*, ResourceManagerTest.*
TBR=oshima@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#292286}
28 files changed:
athena/activity/activity_manager_impl.cc
athena/activity/activity_manager_impl.h
athena/activity/public/activity_manager.h
athena/activity/public/activity_manager_observer.h [new file with mode: 0644]
athena/athena.gyp
athena/content/app_activity.cc
athena/content/app_activity_proxy.cc
athena/content/app_activity_proxy.h
athena/content/app_activity_registry.cc
athena/content/web_activity.cc
athena/home/home_card_impl.cc
athena/main/DEPS
athena/main/athena_launcher.cc
athena/resource_manager/DEPS [new file with mode: 0644]
athena/resource_manager/OWNERS [new file with mode: 0644]
athena/resource_manager/delegate/resource_manager_delegate.cc [new file with mode: 0644]
athena/resource_manager/memory_pressure_notifier.cc [new file with mode: 0644]
athena/resource_manager/memory_pressure_notifier.h [new file with mode: 0644]
athena/resource_manager/memory_pressure_notifier_unittest.cc [new file with mode: 0644]
athena/resource_manager/public/resource_manager.h [new file with mode: 0644]
athena/resource_manager/public/resource_manager_delegate.h [new file with mode: 0644]
athena/resource_manager/resource_manager_impl.cc [new file with mode: 0644]
athena/resource_manager/resource_manager_unittest.cc [new file with mode: 0644]
athena/test/DEPS
athena/test/test_resource_manager_delegate.cc [new file with mode: 0644]
athena/wm/public/window_manager_observer.h
athena/wm/window_manager_impl.cc
athena/wm/window_manager_impl.h