Index: webkit/glue/dalvik_heap_size_android.h |
diff --git a/webkit/glue/dalvik_heap_size_android.h b/webkit/glue/dalvik_heap_size_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..55f9cb43db857f9bb7348f44bd845cedb68f273a |
--- /dev/null |
+++ b/webkit/glue/dalvik_heap_size_android.h |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DALVIK_VM_HEAP_SIZE_ANDROID_H_ |
+#define DALVIK_VM_HEAP_SIZE_ANDROID_H_ |
+ |
+#include <string> |
+ |
+namespace webkit_glue { |
darin (slow to review)
2012/05/14 16:23:49
nit: add a new line here
ulan
2012/05/15 12:44:03
Done.
|
+// A simple class to cache the heap size of the device. |
+class DalvikHeapSize { |
+ public: |
+ // Retrieves the Singleton. |
+ static DalvikHeapSize* GetInstance(); |
+ |
+ DalvikHeapSize(); |
+ |
+ ~DalvikHeapSize(); |
+ |
+ int HeapSizeMB() const; |
+ |
+ private: |
+ int ParseHeapSize(const std::string& str) const; |
+ int heap_size_mb_; |
+}; |
+ |
+} // webkit_glue namespace |
+ |
+#endif // DALVIK_VM_HEAP_SIZE_ANDROID_H_ |