| Index: chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| diff --git a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| index 3c43bf06aca9c987d7b1bc24a3dbee721ffdea18..5d5b843f7bdd3eb376dcd551ff9f2f07b2d8da0a 100644
|
| --- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| +++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| @@ -140,6 +140,18 @@ void UrlBarTexture::SetPressed(bool pressed) {
|
| pressed_ = pressed;
|
| }
|
|
|
| +void UrlBarTexture::SetIncognito(bool incognito) {
|
| + if (incognito_ != incognito)
|
| + set_dirty();
|
| + incognito_ = incognito;
|
| +}
|
| +
|
| +SkColor UrlBarTexture::AdjustColorForIncognito(SkColor c) const {
|
| + if (incognito_)
|
| + return SkColorSetA(c, 255);
|
| + return c;
|
| +}
|
| +
|
| void UrlBarTexture::Draw(SkCanvas* canvas, const gfx::Size& texture_size) {
|
| size_.set_height(texture_size.height());
|
| size_.set_width(texture_size.width());
|
| @@ -159,11 +171,11 @@ void UrlBarTexture::Draw(SkCanvas* canvas, const gfx::Size& texture_size) {
|
| SkColor color = hovered_ ? kBackgroundHover : kBackground;
|
| color = pressed_ ? kBackgroundDown : color;
|
| SkPaint paint;
|
| - paint.setColor(color);
|
| + paint.setColor(AdjustColorForIncognito(color));
|
| canvas->drawRRect(round_rect, paint);
|
|
|
| // URL area.
|
| - paint.setColor(kBackground);
|
| + paint.setColor(AdjustColorForIncognito(kBackground));
|
| SkVector right_corners[4] = {{0, 0}, rounded_corner, rounded_corner, {0, 0}};
|
| round_rect.setRectRadii({kHeight, 0, kWidth, kHeight}, right_corners);
|
| canvas->drawRRect(round_rect, paint);
|
|
|