Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / tools / memory_inspector / memory_inspector / __init__.py
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 import os
6 import sys
7
8
9 ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
10
11
12 def RegisterAllBackends():
13   """Registers all the known backends."""
14   from memory_inspector.backends import android_backend
15   from memory_inspector.core import backends
16   backends.Register(android_backend.AndroidBackend())
17
18
19 def _IncludeDeps():
20   """Imports all the project dependencies."""
21   chromium_dir = os.path.abspath(os.path.join(ROOT_DIR, os.pardir, os.pardir))
22   assert(os.path.isdir(chromium_dir)), 'Cannot find chromium ' + chromium_dir
23
24   sys.path += [
25       ROOT_DIR,
26
27       # Include all dependencies.
28       os.path.join(chromium_dir, 'build', 'android'),  # For pylib.
29   ]
30
31 _IncludeDeps()