fuchsia_workflow.dart 994 Bytes
Newer Older
1 2 3 4 5 6 7
// Copyright 2018 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 '../base/context.dart';
import '../base/platform.dart';
import '../doctor.dart';
8
import 'fuchsia_sdk.dart';
9 10

/// The [FuchsiaWorkflow] instance.
11
FuchsiaWorkflow get fuchsiaWorkflow => context.get<FuchsiaWorkflow>();
12 13 14 15 16 17 18 19 20 21 22 23

/// The Fuchsia-specific implementation of a [Workflow].
///
/// This workflow assumes development within the fuchsia source tree,
/// including a working fx command-line tool in the user's PATH.
class FuchsiaWorkflow implements Workflow {

  @override
  bool get appliesToHostPlatform => platform.isLinux || platform.isMacOS;

  @override
  bool get canListDevices {
24
    return fuchsiaArtifacts.devFinder != null;
25 26 27 28
  }

  @override
  bool get canLaunchDevices {
29
    return fuchsiaArtifacts.devFinder != null && fuchsiaArtifacts.sshConfig != null;
30 31 32 33 34
  }

  @override
  bool get canListEmulators => false;
}