Remove fallback fonts code from VR

The fallback fonts logic in VR was used to detect that every glyphs
will exists when rendering.

see:
  https://bugs.chromium.org/p/chromium/issues/detail?id=722861

This is roughly a revert of:
  https://chromium-review.googlesource.com/c/chromium/src/+/1345419

The Android fallback fonts is implemented here:
  https://chromium-review.googlesource.com/c/chromium/src/+/1589274

R=billorr@chromium.org

BUG: 952963, 770893, 944227
Change-Id: Ia370f666369127f19bd7c950cbd32529e8927411
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1573652
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656267}
diff --git a/chrome/browser/vr/BUILD.gn b/chrome/browser/vr/BUILD.gn
index 2533437..aba5586 100644
--- a/chrome/browser/vr/BUILD.gn
+++ b/chrome/browser/vr/BUILD.gn
@@ -124,11 +124,6 @@
     "elements/vector_icon_button.h",
     "elements/viewport_aware_root.cc",
     "elements/viewport_aware_root.h",
-    "font_fallback.cc",
-    "font_fallback.h",
-    "font_fallback_android.cc",
-    "font_fallback_linux.cc",
-    "font_fallback_win.cc",
     "frame_lifecycle.cc",
     "frame_lifecycle.h",
     "model/color_scheme.cc",
@@ -463,7 +458,6 @@
     "elements/throbber_unittest.cc",
     "elements/transient_element_unittest.cc",
     "elements/ui_element_unittest.cc",
-    "elements/url_text_unittest.cc",
     "elements/vector_icon_button_unittest.cc",
     "elements/vector_icon_unittest.cc",
     "elements/viewport_aware_root_unittest.cc",
diff --git a/chrome/browser/vr/elements/text.cc b/chrome/browser/vr/elements/text.cc
index 7e4ef66..615efd3 100644
--- a/chrome/browser/vr/elements/text.cc
+++ b/chrome/browser/vr/elements/text.cc
@@ -7,7 +7,6 @@
 #include "cc/paint/skia_paint_canvas.h"
 #include "chrome/browser/vr/elements/render_text_wrapper.h"
 #include "chrome/browser/vr/elements/ui_texture.h"
-#include "chrome/browser/vr/font_fallback.h"
 #include "third_party/icu/source/common/unicode/uscript.h"
 #include "ui/gfx/canvas.h"
 #include "ui/gfx/font_list.h"
@@ -203,11 +202,6 @@
     return lines_;
   }
 
-  void SetOnUnhandledCodePointCallback(
-      base::RepeatingCallback<void()> callback) {
-    unhandled_codepoint_callback_ = callback;
-  }
-
   void SetOnRenderTextCreated(
       base::RepeatingCallback<void(gfx::RenderText*)> callback) {
     render_text_created_callback_ = callback;
@@ -257,7 +251,6 @@
   std::vector<std::unique_ptr<gfx::RenderText>> lines_;
   Text* element_ = nullptr;
 
-  base::RepeatingCallback<void()> unhandled_codepoint_callback_;
   base::RepeatingCallback<void(gfx::RenderText*)> render_text_created_callback_;
   base::RepeatingCallback<void(const gfx::RenderText&, SkCanvas*)>
       render_text_rendered_callback_;
@@ -353,11 +346,6 @@
   texture_->set_unsupported_code_points_for_test(unsupported);
 }
 
-void Text::SetOnUnhandledCodePointCallback(
-    base::RepeatingCallback<void()> callback) {
-  texture_->SetOnUnhandledCodePointCallback(callback);
-}
-
 void Text::SetOnRenderTextCreated(
     base::RepeatingCallback<void(gfx::RenderText*)> callback) {
   texture_->SetOnRenderTextCreated(callback);
@@ -401,14 +389,8 @@
     text_bounds.set_width(DmmToPixel(text_width_));
   }
 
-  gfx::FontList fonts;
-  bool check_all_characters = !!unhandled_codepoint_callback_;
-  if (!GetFontList(kDefaultFontFamily, pixel_font_height, text_, &fonts,
-                   check_all_characters) ||
-      unsupported_code_point_for_test_) {
-    if (unhandled_codepoint_callback_)
-      unhandled_codepoint_callback_.Run();
-  }
+  gfx::FontList fonts =
+      gfx::FontList(gfx::Font(kDefaultFontFamily, pixel_font_height));
 
   TextRenderParameters parameters;
   parameters.color = color_;
diff --git a/chrome/browser/vr/elements/text.h b/chrome/browser/vr/elements/text.h
index 672c780..971ee7e4 100644
--- a/chrome/browser/vr/elements/text.h
+++ b/chrome/browser/vr/elements/text.h
@@ -140,8 +140,6 @@
   void SetUnsupportedCodePointsForTest(bool unsupported);
 
  protected:
-  void SetOnUnhandledCodePointCallback(
-      base::RepeatingCallback<void()> callback);
   void SetOnRenderTextCreated(
       base::RepeatingCallback<void(gfx::RenderText*)> callback);
   void SetOnRenderTextRendered(
diff --git a/chrome/browser/vr/elements/url_text.cc b/chrome/browser/vr/elements/url_text.cc
index 7c1fb507..b916a84 100644
--- a/chrome/browser/vr/elements/url_text.cc
+++ b/chrome/browser/vr/elements/url_text.cc
@@ -56,13 +56,10 @@
 
 }  // namespace
 
-UrlText::UrlText(
-    float font_height_dmm,
-    const base::RepeatingCallback<void()>& unhandled_codepoint_callback)
+UrlText::UrlText(float font_height_dmm)
     : Text(font_height_dmm), font_height_dmm_(font_height_dmm) {
   SetLayoutMode(kSingleLineFixedWidth);
 
-  SetOnUnhandledCodePointCallback(unhandled_codepoint_callback);
   SetOnRenderTextCreated(base::BindRepeating(&UrlText::OnRenderTextCreated,
                                              base::Unretained(this)));
   SetOnRenderTextRendered(base::BindRepeating(&UrlText::OnRenderTextRendered,
diff --git a/chrome/browser/vr/elements/url_text.h b/chrome/browser/vr/elements/url_text.h
index 65ef9ee..07c7570e 100644
--- a/chrome/browser/vr/elements/url_text.h
+++ b/chrome/browser/vr/elements/url_text.h
@@ -21,9 +21,7 @@
 
 class VR_UI_EXPORT UrlText : public Text {
  public:
-  UrlText(float font_height_dmm,
-          const base::RepeatingCallback<void()>& unhandled_codepoint_callback);
-
+  explicit UrlText(float font_height_dmm);
   ~UrlText() override;
 
   void SetUrl(const GURL& url);
diff --git a/chrome/browser/vr/elements/url_text_unittest.cc b/chrome/browser/vr/elements/url_text_unittest.cc
deleted file mode 100644
index f404172f..0000000
--- a/chrome/browser/vr/elements/url_text_unittest.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/elements/url_text.h"
-
-#include "base/bind.h"
-#include "build/build_config.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace vr {
-
-#if !defined(OS_LINUX)
-// TODO(crbug/731894): This test does not work on Linux.
-TEST(UrlText, WillNotFailOnNonAsciiURLs) {
-  bool unhandled_code_point = false;
-  auto url_text = std::make_unique<UrlText>(
-      0.010, base::BindRepeating([](bool* flag) { *flag = true; },
-                                 base::Unretained(&unhandled_code_point)));
-  url_text->SetFieldWidth(1);
-  url_text->SetUrl(GURL("http://中央大学.ಠ_ಠ.tw/"));
-  url_text->PrepareToDrawForTest();
-  EXPECT_EQ(false, unhandled_code_point);
-}
-#endif  // !defined(OS_LINUX)
-
-TEST(UrlText, WillFailOnUnhandledCodePoint) {
-  bool unhandled_code_point;
-  auto url_text = std::make_unique<UrlText>(
-      0.010, base::BindRepeating([](bool* flag) { *flag = true; },
-                                 base::Unretained(&unhandled_code_point)));
-  url_text->SetFieldWidth(1);
-
-  unhandled_code_point = false;
-  url_text->SetUrl(GURL("https://foo.com"));
-  url_text->PrepareToDrawForTest();
-  EXPECT_EQ(false, unhandled_code_point);
-
-  unhandled_code_point = false;
-  url_text->SetUnsupportedCodePointsForTest(true);
-  url_text->SetUrl(GURL("https://bar.com"));
-  url_text->PrepareToDrawForTest();
-  EXPECT_EQ(true, unhandled_code_point);
-
-  unhandled_code_point = false;
-  url_text->SetUnsupportedCodePointsForTest(false);
-  url_text->SetUrl(GURL("https://baz.com"));
-  url_text->PrepareToDrawForTest();
-  EXPECT_EQ(false, unhandled_code_point);
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/font_fallback.cc b/chrome/browser/vr/font_fallback.cc
deleted file mode 100644
index 389fc0d..0000000
--- a/chrome/browser/vr/font_fallback.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/font_fallback.h"
-
-#include <set>
-#include <string>
-
-#include "base/i18n/char_iterator.h"
-#include "third_party/icu/source/common/unicode/uchar.h"
-
-namespace vr {
-
-std::set<UChar32> CollectDifferentChars(base::string16 text) {
-  std::set<UChar32> characters;
-  for (base::i18n::UTF16CharIterator it(&text); !it.end(); it.Advance()) {
-    characters.insert(it.get());
-  }
-  return characters;
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/font_fallback.h b/chrome/browser/vr/font_fallback.h
deleted file mode 100644
index 03607a9..0000000
--- a/chrome/browser/vr/font_fallback.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_VR_FONT_FALLBACK_H_
-#define CHROME_BROWSER_VR_FONT_FALLBACK_H_
-
-#include <set>
-#include <string>
-#include "base/strings/string16.h"
-#include "third_party/icu/source/common/unicode/uchar.h"
-
-namespace gfx {
-class FontList;
-}  // namespace gfx
-
-namespace vr {
-
-// Just convert a string to a set of unique characters, used for each platform-
-// specific implementation of GetFontList.
-std::set<UChar32> CollectDifferentChars(base::string16 text);
-
-// Attempt to find a font list that supports all characters in the text. If
-// validate_fonts_contain_all_code_points == true, actually iterates all
-// characters to ensure they have valid glyphs in the fonts.
-bool GetFontList(const std::string& preferred_font_name,
-                 int font_size,
-                 base::string16 text,
-                 gfx::FontList* font_list,
-                 bool validate_fonts_contain_all_code_points);
-
-}  // namespace vr
-
-#endif  // CHROME_BROWSER_VR_FONT_FALLBACK_H_
diff --git a/chrome/browser/vr/font_fallback_android.cc b/chrome/browser/vr/font_fallback_android.cc
deleted file mode 100644
index 2e899296..0000000
--- a/chrome/browser/vr/font_fallback_android.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/font_fallback.h"
-
-#include <map>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "base/lazy_instance.h"
-#include "base/memory/ptr_util.h"
-#include "chrome/browser/vr/ui_support.h"
-#include "third_party/icu/source/common/unicode/uchar.h"
-#include "third_party/icu/source/common/unicode/uscript.h"
-#include "third_party/icu/source/common/unicode/utf16.h"
-#include "third_party/skia/include/core/SkFontMgr.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkTypeface.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/font_fallback.h"
-#include "ui/gfx/font_list.h"
-#include "ui/gfx/platform_font_skia.h"
-
-namespace {
-
-enum KnownGlyph {
-  UNDEFINED,
-  UNKNOWN,
-  KNOWN,
-};
-
-class CachedFont {
- public:
-  static std::unique_ptr<CachedFont> CreateForTypeface(
-      sk_sp<SkTypeface> typeface) {
-    return base::WrapUnique<CachedFont>(new CachedFont(std::move(typeface)));
-  }
-
-  bool HasGlyphForCharacter(UChar32 character) {
-    // In order to increase cache hits, the cache is script based rather than
-    // character based. This also limits the cache size to the number of Unicode
-    // scripts (174 at the time of writing).
-    UErrorCode err = UErrorCode::U_ZERO_ERROR;
-    UScriptCode script = vr::UScriptGetScript(character, &err);
-    if (!U_SUCCESS(err) || script == UScriptCode::USCRIPT_INVALID_CODE)
-      return false;
-    auto& supported = supported_scripts_[script];
-    if (supported != UNDEFINED)
-      return supported == KNOWN;
-    uint16_t glyph_id = typeface_->unicharToGlyph(character);
-    supported = glyph_id ? KNOWN : UNKNOWN;
-    return supported == KNOWN;
-  }
-  std::string GetFontName() { return name_; }
-
- private:
-  explicit CachedFont(sk_sp<SkTypeface> skia_face) {
-    SkString sk_name;
-    skia_face->getFamilyName(&sk_name);
-    name_ = std::string(sk_name.c_str(), sk_name.size());
-    typeface_ = std::move(skia_face);
-  }
-
-  sk_sp<SkTypeface> typeface_;
-  std::map<UScriptCode, KnownGlyph> supported_scripts_;
-  std::string name_;
-
-  DISALLOW_COPY_AND_ASSIGN(CachedFont);
-};
-
-using FontCache = std::map<SkFontID, std::unique_ptr<CachedFont>>;
-base::LazyInstance<FontCache>::Leaky g_fonts = LAZY_INSTANCE_INITIALIZER;
-
-class CachedFontSet {
- public:
-  CachedFontSet() : locale_() {}
-  ~CachedFontSet() = default;
-
-  void SetLocale(const std::string& locale) {
-    // Store font list for one locale at a time.
-    if (locale != locale_) {
-      font_ids_.clear();
-      unknown_chars_.clear();
-      locale_ = locale;
-    }
-  }
-
-  // Return a font name which provides a glyph for the Unicode code point
-  // specified by character.
-  //   default_font: The main font for which fallbacks are required
-  //   c: a UTF-32 code point
-  //   preferred_locale: preferred locale identifier (if any) for |c|
-  //                     (e.g. "en", "ja", "zh-CN")
-  //
-  // The funtion, if it succeeds, sets |font_name|. Even if it succeeds, it may
-  // set |font_name| to the empty string if the character is supported by the
-  // default font.
-  //
-  // Returns:
-  //   * false, if the request could not be satisfied or if the provided default
-  //     font supports it.
-  //   * true, otherwis.
-  //
-  bool GetFallbackFontNameForChar(UChar32 c, std::string* font_name) {
-    if (unknown_chars_.find(c) != unknown_chars_.end())
-      return false;
-
-    for (SkFontID font_id : font_ids_) {
-      std::unique_ptr<CachedFont>& font = g_fonts.Get()[font_id];
-      if (font->HasGlyphForCharacter(c)) {
-        *font_name = font->GetFontName();
-        return true;
-      }
-    }
-    sk_sp<SkFontMgr> font_mgr(SkFontMgr::RefDefault());
-    const char* bcp47_locales[] = {locale_.c_str()};
-    sk_sp<SkTypeface> tf(font_mgr->matchFamilyStyleCharacter(
-        nullptr, SkFontStyle(), locale_.empty() ? nullptr : bcp47_locales,
-        locale_.empty() ? 0 : 1, c));
-    if (tf) {
-      SkFontID font_id = tf->uniqueID();
-      font_ids_.push_back(font_id);
-      std::unique_ptr<CachedFont>& cached_font = g_fonts.Get()[font_id];
-      if (!cached_font)
-        cached_font = CachedFont::CreateForTypeface(tf);
-      *font_name = cached_font->GetFontName();
-      return true;
-    }
-    unknown_chars_.insert(c);
-    return false;
-  }
-
- private:
-  std::string locale_;
-  std::vector<SkFontID> font_ids_;
-  std::set<UChar32> unknown_chars_;
-
-  DISALLOW_COPY_AND_ASSIGN(CachedFontSet);
-};
-
-base::LazyInstance<CachedFontSet>::Leaky g_cached_font_set =
-    LAZY_INSTANCE_INITIALIZER;
-
-bool FontSupportsChar(const gfx::Font& font, UChar32 c) {
-  sk_sp<SkTypeface> typeface =
-      static_cast<gfx::PlatformFontSkia*>(font.platform_font())->typeface();
-  std::unique_ptr<CachedFont>& cached_font =
-      g_fonts.Get()[typeface->uniqueID()];
-  if (!cached_font)
-    cached_font = CachedFont::CreateForTypeface(std::move(typeface));
-  return cached_font->HasGlyphForCharacter(c);
-}
-
-}  // namespace
-
-namespace vr {
-
-bool GetFallbackFontNameForChar(const gfx::Font& default_font,
-                                UChar32 c,
-                                const std::string& locale,
-                                std::string* font_name) {
-  if (FontSupportsChar(default_font, c)) {
-    *font_name = std::string();
-    return true;
-  }
-  CachedFontSet& cached_font_set = g_cached_font_set.Get();
-  cached_font_set.SetLocale(locale);
-  return cached_font_set.GetFallbackFontNameForChar(c, font_name);
-}
-
-bool GetFontList(const std::string& preferred_font_name,
-                 int font_size,
-                 base::string16 text,
-                 gfx::FontList* font_list,
-                 bool validate_fonts_contain_all_code_points) {
-  gfx::Font preferred_font(preferred_font_name, font_size);
-  std::vector<gfx::Font> fonts{preferred_font};
-
-  std::set<std::string> names;
-  for (const UChar32 c : CollectDifferentChars(text)) {
-    std::string name;
-    if (!GetFallbackFontNameForChar(preferred_font, c, "", &name))
-      return false;
-    if (!name.empty())
-      names.insert(name);
-  }
-  for (const auto& name : names) {
-    fonts.push_back(gfx::Font(name, font_size));
-  }
-  *font_list = gfx::FontList(fonts);
-  return true;
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/font_fallback_linux.cc b/chrome/browser/vr/font_fallback_linux.cc
deleted file mode 100644
index 59b2b22..0000000
--- a/chrome/browser/vr/font_fallback_linux.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/font_fallback.h"
-
-#include <string>
-#include <vector>
-
-#include "chrome/browser/vr/ui_support.h"
-#include "third_party/icu/source/common/unicode/uchar.h"
-#include "third_party/icu/source/common/unicode/uscript.h"
-#include "third_party/icu/source/common/unicode/utf16.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/font_fallback.h"
-#include "ui/gfx/font_fallback_linux.h"
-#include "ui/gfx/font_list.h"
-#include "ui/gfx/platform_font_skia.h"
-
-namespace vr {
-
-bool GetFontList(const std::string& preferred_font_name,
-                 int font_size,
-                 base::string16 text,
-                 gfx::FontList* font_list,
-                 bool validate_fonts_contain_all_code_points) {
-  gfx::Font preferred_font(preferred_font_name, font_size);
-  if (validate_fonts_contain_all_code_points) {
-    // TODO(billorr): Consider caching results like the Android path.
-    for (const UChar32 c : CollectDifferentChars(text)) {
-      // Validate that this is a valid unicode character.
-      UErrorCode err = UErrorCode::U_ZERO_ERROR;
-      UScriptCode script = UScriptGetScript(c, &err);
-      if (!U_SUCCESS(err) || script == UScriptCode::USCRIPT_INVALID_CODE)
-        return false;
-
-      gfx::FallbackFontData data = gfx::GetFallbackFontForChar(c, "");
-      if (data.name.empty())
-        return false;
-    }
-  }
-
-  // Linux implements gfx::GetFallbackFonts with a non-trivial implementation,
-  // and that is used to find fallbacks at render time.
-  std::vector<gfx::Font> fonts{preferred_font};
-  *font_list = gfx::FontList(fonts);
-  return true;
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/font_fallback_win.cc b/chrome/browser/vr/font_fallback_win.cc
deleted file mode 100644
index aaaecec..0000000
--- a/chrome/browser/vr/font_fallback_win.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/vr/font_fallback.h"
-
-#include <string>
-#include <vector>
-
-#include "chrome/browser/vr/ui_support.h"
-#include "third_party/icu/source/common/unicode/uchar.h"
-#include "third_party/icu/source/common/unicode/uscript.h"
-#include "third_party/icu/source/common/unicode/utf16.h"
-#include "ui/gfx/font.h"
-#include "ui/gfx/font_fallback.h"
-#include "ui/gfx/font_list.h"
-
-namespace vr {
-
-bool GetFontList(const std::string& preferred_font_name,
-                 int font_size,
-                 base::string16 text,
-                 gfx::FontList* font_list,
-                 bool validate_fonts_contain_all_code_points) {
-  gfx::Font preferred_font(preferred_font_name, font_size);
-
-  if (validate_fonts_contain_all_code_points) {
-    // TODO(billorr): Consider caching results like the Android path.
-    for (const UChar32 c : CollectDifferentChars(text)) {
-      // Validate that this is a valid unicode character.
-      UErrorCode err = UErrorCode::U_ZERO_ERROR;
-      UScriptCode script = UScriptGetScript(c, &err);
-      if (!U_SUCCESS(err) || script == UScriptCode::USCRIPT_INVALID_CODE)
-        return false;
-
-      // Convert this one UTF32 character to a UTF16 string.
-      UChar chars[2] = {0};
-      bool error = false;
-      unsigned index = 0;
-      U16_APPEND(chars, index, 2, c, error);
-      if (error)
-        return false;
-      gfx::Font result;
-      if (!GetFallbackFont(preferred_font, chars, index, &result))
-        return false;
-    }
-  }
-
-  // Windows implement gfx::GetFallbackFonts with a non-trivial implementation,
-  // and that is used to find fallbacks at render time.
-  std::vector<gfx::Font> fonts{preferred_font};
-  *font_list = gfx::FontList(fonts);
-  return true;
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/ui_scene_creator.cc b/chrome/browser/vr/ui_scene_creator.cc
index f0b98a9..9f2b7ad 100644
--- a/chrome/browser/vr/ui_scene_creator.cc
+++ b/chrome/browser/vr/ui_scene_creator.cc
@@ -719,13 +719,7 @@
 
   std::unique_ptr<UiElement> description_element;
   if (spec.is_url) {
-    auto url_text = Create<UrlText>(
-        kNone, phase, kWebVrPermissionFontHeight,
-        base::BindRepeating(&UiBrowserInterface::OnUnsupportedMode,
-                            base::Unretained(browser),
-                            UiUnsupportedMode::kUnhandledCodePoint)
-
-    );
+    auto url_text = Create<UrlText>(kNone, phase, kWebVrPermissionFontHeight);
     url_text->SetFieldWidth(kWebVrPermissionTextWidth);
     url_text->AddBinding(VR_BIND_FUNC(GURL, Model, model,
                                       model->location_bar_state.gurl, UrlText,
@@ -2292,11 +2286,8 @@
           base::Unretained(security_button.get()))));
   scene_->AddUiElement(kUrlBarSecurityButtonRegion, std::move(security_button));
 
-  auto url_text = Create<UrlText>(
-      kUrlBarUrlText, kPhaseForeground, kUrlBarFontHeightDMM,
-      base::BindRepeating(&UiBrowserInterface::OnUnsupportedMode,
-                          base::Unretained(browser_),
-                          UiUnsupportedMode::kUnhandledCodePoint));
+  auto url_text =
+      Create<UrlText>(kUrlBarUrlText, kPhaseForeground, kUrlBarFontHeightDMM);
   url_text->SetFieldWidth(kUrlBarUrlWidthDMM);
   url_text->AddBinding(VR_BIND_FUNC(GURL, Model, model_,
                                     model->location_bar_state.gurl, UrlText,