blob: 01b016ab48ef3c012896ca02a0e642510f398952 [file] [log] [blame]
// 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.
#include <set>
#include <string>
#include "base/macros.h"
#include "ui/accessibility/ax_export.h"
namespace ui {
class AXNode;
// An instance of LanguageInfo is used to record any specified language
// attributes and will eventually be extended to include required information
// for language detection.
class AX_EXPORT AXLanguageInfo {
AXLanguageInfo(const AXNode* node, std::string lang)
: node_(node), language_(lang) {}
AXLanguageInfo(const AXLanguageInfo& info, const AXNode* node)
: node_(node), language_(info.language_) {}
AXLanguageInfo(const AXLanguageInfo* info, const AXNode* node)
: node_(node), language_(info->language_) {}
~AXLanguageInfo() {}
const AXNode* node() const { return node_; }
// Get language code in BCP 47.
const std::string& language() const { return language_; }
const AXNode* const node_;
// Language code in BCP 47.
const std::string language_;
} // namespace ui