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

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

Issue 2926643003: [VrShell] Centralize color handling and enable close button on fullscreen (Closed)
Patch Set: Created 3 years, 6 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/exit_warning_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/exit_warning_texture.cc b/chrome/browser/android/vr_shell/textures/exit_warning_texture.cc
index f3bdf5ab8e630cecc06cfcb5329e8c7d74209ff4..b74a3302e4428bab8a7c550903ada3291a1744c7 100644
--- a/chrome/browser/android/vr_shell/textures/exit_warning_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/exit_warning_texture.cc
@@ -20,8 +20,6 @@ namespace vr_shell {
namespace {
-const SkColor kBackgroundColor = 0xCC1A1A1A;
-const SkColor kForegroundColor = SK_ColorWHITE;
constexpr float kBorderFactor = 0.045;
constexpr float kFontSizeFactor = 0.048;
constexpr float kTextWidthFactor = 1.0 - 3 * kBorderFactor;
@@ -40,16 +38,17 @@ void ExitWarningTexture::Draw(SkCanvas* sk_canvas,
size_.set_width(texture_size.width());
SkPaint paint;
- paint.setColor(kBackgroundColor);
+
+ paint.setColor(color_scheme().exit_warning_background);
auto text =
l10n_util::GetStringUTF16(IDS_PAGE_INFO_VR_BROWSER_UNSUPPORTED_MODE);
gfx::FontList fonts;
GetFontList(size_.width() * kFontSizeFactor, text, &fonts);
gfx::Rect text_size(size_.width() * kTextWidthFactor, 0);
- std::vector<std::unique_ptr<gfx::RenderText>> lines =
- PrepareDrawStringRect(text, fonts, kForegroundColor, &text_size,
- kTextAlignmentCenter, kWrappingBehaviorWrap);
+ std::vector<std::unique_ptr<gfx::RenderText>> lines = PrepareDrawStringRect(
+ text, fonts, color_scheme().exit_warning_foreground, &text_size,
+ kTextAlignmentCenter, kWrappingBehaviorWrap);
DCHECK_LE(text_size.height(),
static_cast<int>((1.0 - 2 * kBorderFactor) * size_.width()));

Powered by Google App Engine
This is Rietveld 408576698