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

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

Issue 2878543002: Refactor VR Shell Input. Locks input to click/scroll targets. (Closed)
Patch Set: Created 3 years, 7 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/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 e1ca6cdded8dd237445e47b9de6caa59807acfd6..958445f0432737de44e4653c1e44cdf378e48a26 100644
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
@@ -63,10 +63,6 @@ UrlBarTexture::UrlBarTexture() : security_level_(SecurityLevel::DANGEROUS) {}
UrlBarTexture::~UrlBarTexture() = default;
-void UrlBarTexture::SetHover(bool hover) {
- hover_ = hover;
-}
-
void UrlBarTexture::SetURL(const GURL& gurl) {
gurl_ = gurl;
}
@@ -98,7 +94,7 @@ void UrlBarTexture::Draw(SkCanvas* canvas, const gfx::Size& texture_size) {
SkVector left_corners[4] = {rounded_corner, {0, 0}, {0, 0}, rounded_corner};
round_rect.setRectRadii({0, 0, kHeight, kHeight}, left_corners);
SkPaint paint;
- paint.setColor(hover_ ? kBackgroundHover : kBackground);
+ paint.setColor((draw_flags_ & FLAG_HOVER) ? kBackgroundHover : kBackground);
canvas->drawRRect(round_rect, paint);
// URL area.
@@ -138,8 +134,6 @@ void UrlBarTexture::Draw(SkCanvas* canvas, const gfx::Size& texture_size) {
canvas->restore();
}
- canvas->restore();
cjgrant 2017/05/10 20:16:25 Why are you removing this? It removes the scale o
mthiesse 2017/05/10 21:09:08 Rebasing error, good catch.
-
// Draw text based on pixel sizes rather than meters, for correct font sizing.
int pixel_font_height = texture_size.height() * kFontHeight / kHeight;
int text_flags = gfx::Canvas::TEXT_ALIGN_LEFT;

Powered by Google App Engine
This is Rietveld 408576698