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
   27
   28
   29
   30
   31
   32

content / common / mac / attributed_string_type_converters.h [blame]

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_COMMON_MAC_ATTRIBUTED_STRING_TYPE_CONVERTERS_H_
#define CONTENT_COMMON_MAC_ATTRIBUTED_STRING_TYPE_CONVERTERS_H_

#include "content/common/content_export.h"
#include "ui/base/mojom/attributed_string.mojom.h"
#include "ui/gfx/range/range.h"

#include <CoreFoundation/CoreFoundation.h>

namespace mojo {

template <>
struct CONTENT_EXPORT
    TypeConverter<CFAttributedStringRef, ui::mojom::AttributedStringPtr> {
  static CFAttributedStringRef Convert(
      const ui::mojom::AttributedStringPtr& mojo_attributed_string);
};

template <>
struct CONTENT_EXPORT
    TypeConverter<ui::mojom::AttributedStringPtr, CFAttributedStringRef> {
  static ui::mojom::AttributedStringPtr Convert(
      const CFAttributedStringRef cf_attributed_string);
};

}  // namespace mojo

#endif  // CONTENT_COMMON_MAC_ATTRIBUTED_STRING_TYPE_CONVERTERS_H_