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.
7 class PossibleBrowser(object):
8 """A browser that can be controlled.
10 Call Create() to launch the browser and begin manipulating it..
13 def __init__(self, browser_type, target_os, finder_options,
14 supports_tab_control):
15 self._browser_type = browser_type
16 self._target_os = target_os
17 self._finder_options = finder_options
18 self._supports_tab_control = supports_tab_control
20 self._platform_backend = None
21 self._archive_path = None
22 self._append_to_existing_wpr = False
23 self._make_javascript_deterministic = True
24 self._credentials_path = None
27 return 'PossibleBrowser(browser_type=%s)' % self.browser_type
30 def browser_type(self):
31 return self._browser_type
35 """Target OS, the browser will run on."""
36 return self._target_os
39 def finder_options(self):
40 return self._finder_options
43 def supports_tab_control(self):
44 return self._supports_tab_control
48 self._InitPlatformIfNeeded()
51 def _InitPlatformIfNeeded(self):
52 raise NotImplementedError()
55 raise NotImplementedError()
57 def SupportsOptions(self, finder_options):
58 """Tests for extension support."""
59 raise NotImplementedError()
67 def UpdateExecutableIfNeeded(self):
70 def last_modification_time(self):
73 def SetReplayArchivePath(self, archive_path, append_to_existing_wpr,
74 make_javascript_deterministic):
75 self._archive_path = archive_path
76 self._append_to_existing_wpr = append_to_existing_wpr
77 self._make_javascript_deterministic = make_javascript_deterministic
79 def SetCredentialsPath(self, credentials_path):
80 self._credentials_path = credentials_path