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

Unified Diff: chrome/browser/android/vr_shell/textures/loading_indicator_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/loading_indicator_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/loading_indicator_texture.cc b/chrome/browser/android/vr_shell/textures/loading_indicator_texture.cc
index d330387e5b5dd0cd26006f08b342bb4fb6462385..bdc7879309ed8e5dd44387dbce6c76e25c377856 100644
--- a/chrome/browser/android/vr_shell/textures/loading_indicator_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/loading_indicator_texture.cc
@@ -7,14 +7,11 @@
#include "base/logging.h"
#include "cc/paint/skia_paint_canvas.h"
#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkColor.h"
namespace vr_shell {
namespace {
-static constexpr SkColor kBackground = 0xFF8C8C8C;
-static constexpr SkColor kForeground = 0xFF333333;
static constexpr float kWidth = 0.24;
static constexpr float kHeight = 0.008;
@@ -58,12 +55,12 @@ void LoadingIndicatorTexture::Draw(SkCanvas* canvas,
canvas->scale(size_.width() / kWidth, size_.width() / kWidth);
SkPaint paint;
- paint.setColor(kBackground);
+ paint.setColor(color_scheme().loading_indicator_background);
canvas->drawRoundRect({0, 0, kWidth, kHeight}, kHeight / 2, kHeight / 2,
paint);
if (loading_) {
- paint.setColor(kForeground);
+ paint.setColor(color_scheme().loading_indicator_foreground);
float progress_width = kHeight + (kWidth - kHeight) * progress_;
canvas->drawRoundRect({0, 0, progress_width, kHeight}, kHeight / 2,
kHeight / 2, paint);

Powered by Google App Engine
This is Rietveld 408576698