| 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..cca0696d44f6ae2c06a104c69bc7db8dc9d55cc1 100644
|
| --- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| +++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
|
| @@ -84,7 +84,9 @@ gfx::PointF percentToMeters(const gfx::PointF& percent) {
|
|
|
| } // namespace
|
|
|
| -UrlBarTexture::UrlBarTexture() : security_level_(SecurityLevel::DANGEROUS) {}
|
| +UrlBarTexture::UrlBarTexture(const base::Callback<void()>& failure_callback)
|
| + : security_level_(SecurityLevel::DANGEROUS),
|
| + failure_callback_(failure_callback) {}
|
|
|
| UrlBarTexture::~UrlBarTexture() = default;
|
|
|
| @@ -210,10 +212,12 @@ void UrlBarTexture::Draw(SkCanvas* canvas, const gfx::Size& texture_size) {
|
| float url_width = kWidth - url_x - kUrlRightMargin;
|
| gfx::Rect text_bounds(ToPixels(url_x), 0, ToPixels(url_width),
|
| ToPixels(kHeight));
|
| + base::string16 text = base::UTF8ToUTF16(gurl_.spec());
|
| + if (!CheckFontList(pixel_font_height, text))
|
| + failure_callback_.Run();
|
| gurl_render_texts_ = PrepareDrawStringRect(
|
| - base::UTF8ToUTF16(gurl_.spec()),
|
| - GetDefaultFontList(pixel_font_height), SK_ColorBLACK, &text_bounds,
|
| - kTextAlignmentLeft, kWrappingBehaviorNoWrap);
|
| + text, GetDefaultFontList(pixel_font_height), SK_ColorBLACK,
|
| + &text_bounds, kTextAlignmentLeft, kWrappingBehaviorNoWrap);
|
| last_drawn_gurl_ = gurl_;
|
| }
|
| for (auto& render_text : gurl_render_texts_)
|
|
|