blob: c1cf36815713ddf79469d53ee50330a649cf5e11 [file] [log] [blame]
Ian Vollick213fbd02017-08-11 04:20:031// Copyright 2017 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
5#ifndef CHROME_BROWSER_VR_ELEMENTS_TEXT_H_
6#define CHROME_BROWSER_VR_ELEMENTS_TEXT_H_
7
8#include <memory>
9
Biao She767d39e32017-08-23 23:23:3110#include "base/callback.h"
Ian Vollick213fbd02017-08-11 04:20:0311#include "chrome/browser/vr/elements/textured_element.h"
Biao She767d39e32017-08-23 23:23:3112#include "third_party/skia/include/core/SkColor.h"
Ian Vollick213fbd02017-08-11 04:20:0313
14namespace vr {
15
Biao She767d39e32017-08-23 23:23:3116struct ColorScheme;
Ian Vollick213fbd02017-08-11 04:20:0317class TextTexture;
18class UiTexture;
19
20class Text : public TexturedElement {
21 public:
22 Text(int maximum_width_pixels,
23 float font_height_meters,
24 float text_width_meters,
Biao She767d39e32017-08-23 23:23:3125 const base::Callback<SkColor(ColorScheme)>& color_callback,
Ian Vollick213fbd02017-08-11 04:20:0326 int resource_id);
27 ~Text() override;
28
29 private:
30 UiTexture* GetTexture() const override;
31
32 std::unique_ptr<TextTexture> texture_;
33 DISALLOW_COPY_AND_ASSIGN(Text);
34};
35
36} // namespace vr
37
38#endif // CHROME_BROWSER_VR_ELEMENTS_TEXT_H_