Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Side by Side Diff: athena/resource_manager/public/resource_manager.h

Issue 513523002: Adding Baseframework of the ResourceManager (all hooks and observers) are being put in place with a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self nits Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_H_
6 #define ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_H_
7
8 #include "athena/resource_manager/memory_pressure_notifier.h"
9 #include "base/basictypes.h"
10
11 namespace athena {
12
13 // The resource manager is monitoring activity changes, low memory conditions
14 // and other events to control the activity state (pre-/un-/re-/loading them)
15 // to keep enough memory free that no jank/lag will show when new applications
16 // are loaded and / or a navigation between applications takes place.
17 class ResourceManager {
18 public:
19 // Creates the instance handling the resources. Passed is the |delegate| which
20 // works as OS abstracting delegate. The ownership is transferred to the
21 // ResourceManager.
Jun Mukai 2014/08/27 01:21:18 Seems delegate is not passed? Please update the c
Mr4D (OOO till 08-26) 2014/08/27 16:12:12 Indeed! Done.
22 static void Create();
23 static ResourceManager* Get();
24 static void Shutdown();
25
26 ResourceManager();
27 virtual ~ResourceManager();
28
29 // Unit tests can simulate MemoryPressure changes with this call.
30 virtual void SetMemoryPressureForTest(
31 MemoryPressureObserver::MemoryPressure pressure) = 0;
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(ResourceManager);
35 };
36
37 } // namespace athena
38
39 #endif // ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698