Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: chrome/browser/android/vr_shell/textures/render_text_wrapper.h

Issue 2902783002: VR: Add URL bar security-related coloring and emphasis. (Closed)
Patch Set: Another test case for HTTPS + not secure. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/textures/render_text_wrapper.h
diff --git a/chrome/browser/android/vr_shell/textures/render_text_wrapper.h b/chrome/browser/android/vr_shell/textures/render_text_wrapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c2e5fbe8c79aa8a6dc7df15842f58e8755cece9
--- /dev/null
+++ b/chrome/browser/android/vr_shell/textures/render_text_wrapper.h
@@ -0,0 +1,36 @@
+// Copyright 2017 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.
+
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_RENDER_TEXT_WRAPPER_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_RENDER_TEXT_WRAPPER_H_
+
+#include "base/macros.h"
+#include "ui/gfx/render_text.h"
+
+namespace vr_shell {
+
+// A minimal, mockable wrapper around gfx::RenderText, to facilitate testing of
+// RenderText users.
+class RenderTextWrapper {
+ public:
+ explicit RenderTextWrapper(gfx::RenderText* render_text);
+ virtual ~RenderTextWrapper();
+
+ virtual void SetColor(SkColor value);
+ virtual void ApplyColor(SkColor value, const gfx::Range& range);
+
+ virtual void SetStyle(gfx::TextStyle style, bool value);
+ virtual void ApplyStyle(gfx::TextStyle style,
+ bool value,
+ const gfx::Range& range);
+
+ private:
+ gfx::RenderText* render_text_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(RenderTextWrapper);
+};
+
+} // namespace vr_shell
+
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_TEXTURES_RENDER_TEXT_WRAPPER_H_

Powered by Google App Engine
This is Rietveld 408576698