summaryrefslogtreecommitdiff
path: root/chromium/components/live_caption/caption_util.h
blob: c5b395e886c27fc7afca1eb7598376061760d380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_LIVE_CAPTION_CAPTION_UTIL_H_
#define COMPONENTS_LIVE_CAPTION_CAPTION_UTIL_H_

#include "components/prefs/pref_service.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/native_theme/caption_style.h"

class PrefService;

namespace captions {

absl::optional<ui::CaptionStyle> GetCaptionStyleFromUserSettings(
    PrefService* prefs,
    bool record_metrics);

// Returns whether the Live Caption feature is supported in Chrome. This can
// depend on e.g. Chrome feature flags, platform/OS, supported CPU instructions.
bool IsLiveCaptionFeatureSupported();

}  // namespace captions

#endif  // COMPONENTS_LIVE_CAPTION_CAPTION_UTIL_H_