OLD | NEW |
(Empty) | |
| 1 // 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_ANDROID_VR_SHELL_TEXTURES_RENDER_TEXT_WRAPPER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_RENDER_TEXT_WRAPPER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/gfx/render_text.h" |
| 10 |
| 11 namespace vr_shell { |
| 12 |
| 13 // A minimal, mockable wrapper around gfx::RenderText, to facilitate testing of |
| 14 // RenderText users. |
| 15 class RenderTextWrapper { |
| 16 public: |
| 17 explicit RenderTextWrapper(gfx::RenderText* render_text); |
| 18 virtual ~RenderTextWrapper(); |
| 19 |
| 20 virtual void SetColor(SkColor value); |
| 21 virtual void ApplyColor(SkColor value, const gfx::Range& range); |
| 22 |
| 23 virtual void SetStyle(gfx::TextStyle style, bool value); |
| 24 virtual void ApplyStyle(gfx::TextStyle style, |
| 25 bool value, |
| 26 const gfx::Range& range); |
| 27 |
| 28 private: |
| 29 gfx::RenderText* render_text_ = nullptr; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(RenderTextWrapper); |
| 32 }; |
| 33 |
| 34 } // namespace vr_shell |
| 35 |
| 36 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_RENDER_TEXT_WRAPPER_H_ |
OLD | NEW |