| 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 61c6d4390f45a3d60215f4945779f50e4574d98e..7377053c75ac7a98bddde4c91af51dbd2d354197 100644
|
| --- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| +++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| @@ -139,6 +139,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());
|
| @@ -158,11 +170,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);
|
|
|