caption_util.h 839 B

1234567891011121314151617181920212223242526
  1. // Copyright 2020 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. #ifndef COMPONENTS_LIVE_CAPTION_CAPTION_UTIL_H_
  5. #define COMPONENTS_LIVE_CAPTION_CAPTION_UTIL_H_
  6. #include "components/prefs/pref_service.h"
  7. #include "third_party/abseil-cpp/absl/types/optional.h"
  8. #include "ui/native_theme/caption_style.h"
  9. class PrefService;
  10. namespace captions {
  11. absl::optional<ui::CaptionStyle> GetCaptionStyleFromUserSettings(
  12. PrefService* prefs,
  13. bool record_metrics);
  14. // Returns whether the Live Caption feature is supported in Chrome. This can
  15. // depend on e.g. Chrome feature flags, platform/OS, supported CPU instructions.
  16. bool IsLiveCaptionFeatureSupported();
  17. } // namespace captions
  18. #endif // COMPONENTS_LIVE_CAPTION_CAPTION_UTIL_H_