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

Unified Diff: chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc

Issue 2817663003: Rendering text on insecure-site warnings for WebVR (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | ui/gfx/BUILD.gn » ('j') | ui/gfx/font_render_params_android.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc b/chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc
index dbfaa5ddab6a105aac86d6a5a412661394560ce9..7e8be7259addd1be0e79290113657f10bca00a10 100644
--- a/chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/insecure_content_transient_texture.cc
@@ -8,6 +8,7 @@
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/paint_vector_icon.h"
@@ -45,11 +46,17 @@ void InsecureContentTransientTexture::Draw(gfx::Canvas* canvas) {
canvas->Restore();
canvas->Save();
canvas->Translate({height_ * 0.7, height_ * 0.5});
+ auto text =
+ l10n_util::GetStringUTF16(IDS_PAGE_INFO_INSECURE_WEBVR_CONTENT_TRANSIENT);
+ canvas->DrawStringRect(text, gfx::FontList(), kForegroundColor,
+ gfx::Rect(0, 0, height_ * 1.2, height_ * 0.8));
+ /*
flags.setColor(kForegroundColor);
flags.setTextSize(height_ * 0.1);
auto text =
l10n_util::GetStringUTF8(IDS_PAGE_INFO_INSECURE_WEBVR_CONTENT_TRANSIENT);
DrawText(canvas, text, flags, height_ * 1.2, true);
+ */
canvas->Restore();
}
« no previous file with comments | « no previous file | ui/gfx/BUILD.gn » ('j') | ui/gfx/font_render_params_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698