1# Copyright 2024 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5from __future__ import annotations 6 7from typing import TYPE_CHECKING 8 9if TYPE_CHECKING: 10 from crossbench.path import AnyPathLike, LocalPath 11 from crossbench.plt.base import Platform 12 13 14class RemotePlatformMixin: 15 16 def __init__(self, host_platform: Platform): 17 super().__init__() 18 self._host_platform: Platform = host_platform 19 20 @property 21 def is_remote(self) -> bool: 22 return True 23 24 @property 25 def host_platform(self) -> Platform: 26 return self._host_platform 27 28 def host_path(self, path: AnyPathLike) -> LocalPath: 29 return self._host_platform.local_path(path) 30