Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / core / possible_app.py
1 # Copyright 2012 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
6 class PossibleApp(object):
7   """A factory class that can be used to create a running instance of app.
8
9   Call Create() to launch the app and begin manipulating it.
10   """
11
12   def __init__(self, app_type, target_os):
13     self._app_type = app_type
14     self._target_os = target_os
15     self._platform = None
16     self._platform_backend = None
17
18   def __repr__(self):
19     return 'PossibleApp(app_type=%s)' % self.app_type
20
21   @property
22   def app_type(self):
23     return self._app_type
24
25   @property
26   def target_os(self):
27     """Target OS, the app will run on."""
28     return self._target_os
29
30   @property
31   def platform(self):
32     self._InitPlatformIfNeeded()
33     return self._platform
34
35   def _InitPlatformIfNeeded(self):
36     raise NotImplementedError()
37
38   def Create(self, finder_options):
39     raise NotImplementedError()
40
41   def SupportsOptions(self, finder_options):
42     """Tests for extension support."""
43     raise NotImplementedError()