| Index: tools/chrome_remote_control/chrome_remote_control/browser.py
|
| diff --git a/tools/chrome_remote_control/chrome_remote_control/browser.py b/tools/chrome_remote_control/chrome_remote_control/browser.py
|
| index e90bf9eaf8ce39e060d0157e29f937751684b09f..334853301e2e2758475053942fb45c44ba46288b 100644
|
| --- a/tools/chrome_remote_control/chrome_remote_control/browser.py
|
| +++ b/tools/chrome_remote_control/chrome_remote_control/browser.py
|
| @@ -1,6 +1,9 @@
|
| # 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.
|
| +import os
|
| +
|
| +from chrome_remote_control import replay_server
|
| from chrome_remote_control import temporary_http_server
|
|
|
| class Browser(object):
|
| @@ -43,3 +46,13 @@ class Browser(object):
|
|
|
| def CreateTemporaryHTTPServer(self, path):
|
| return temporary_http_server.TemporaryHTTPServer(self._backend, path)
|
| +
|
| + @classmethod
|
| + def CanUseReplayServer(cls, archive_path, use_record_mode):
|
| + return os.path.isfile(archive_path) or use_record_mode
|
| +
|
| + def CreateReplayServer(self, archive_path, use_record_mode):
|
| + replay_class = replay_server.DoNothingReplayServer
|
| + if self.CanUseReplayServer(archive_path, use_record_mode):
|
| + replay_class = replay_server.ReplayServer
|
| + return replay_class(self._backend, archive_path, use_record_mode)
|
|
|