[NextBrowser] Passkey and UI Tizen Migration 91/324491/2
authorjmroman <jm.roman@samsung.com>
Mon, 19 May 2025 12:47:57 +0000 (20:47 +0800)
committerJuan Miguel Roman <jm.roman@samsung.com>
Wed, 21 May 2025 04:56:11 +0000 (04:56 +0000)
- fixed passkey missing library issue
- fixed passkey api connections
- fixed bubble ui's compile errors
- fixed handoff_button class

Change-Id: Ic0bc2e6b7fcdb1b64a593d36403ad0ca44a24a84
Signed-off-by: jmroman <jm.roman@samsung.com>
13 files changed:
chrome/browser/ui/browser.cc
chrome/browser/ui/browser.h
chrome/browser/ui/samsung/high_contrast_controller.cc
chrome/browser/ui/views/frame/tab_strip_region_view.cc
chrome/browser/ui/views/samsung/bookmarks/bookmarks_bubble_view.cc
chrome/browser/ui/views/samsung/handoff/handoff_bubble_view.cc
chrome/browser/ui/views/samsung/handoff/handoff_button_view.cc
chrome/browser/ui/views/samsung/handoff/handoff_button_view.h
chrome/browser/ui/views/samsung/handoff/handoff_timeout_bubble_view.cc
chrome/browser/ui/views/samsung/passkey/passkey_bubble_view.cc
chrome/browser/ui/views/tabs/new_tab_button.cc
components/samsung/passkey/BUILD.gn
components/samsung/passkey/passkey_service_impl.cc

index 4f09b4a5f5f5f9db0aa7fd9bc5ece889baabe06c..d15a08b812dbd4197561fa9e6a3c902f51191359 100644 (file)
@@ -2199,7 +2199,6 @@ bool Browser::ShouldUseInstancedSystemMediaControls() const {
 //commented the code temporarily to fix the build error
 
 #if defined(SAMSUNG_NEXT_BROWSER)
-/*
 void Browser::DisplayQRCode(std::string contents) {
   auto samsung_passkey_controller =
       samsung_browser_main::SamsungBrowserCore::instance()->PasskeyController();
@@ -2222,7 +2221,6 @@ void Browser::CloseQRCode() {
 
   samsung_passkey_controller->CloseQRCode();
 }
-*/
 #endif  // SAMSUNG_NEXT_BROWSER
 
 void Browser::DraggableRegionsChanged(
index 6f35e2481580a7573bc4973168e14b7916cdfcd1..d068a70020d6234b3270227286913ae6b5bd86eb 100644 (file)
@@ -786,11 +786,8 @@ class Browser : public TabStripModelObserver,
       const std::vector<blink::mojom::DraggableRegionPtr>& regions,
       content::WebContents* contents) override;
 #if defined(SAMSUNG_NEXT_BROWSER)
- //TODO:[NextBrowser][Merging]
-//commented the code temporarily to fix the build error
-
-  //void DisplayQRCode(std::string contents) override;
-  //void CloseQRCode() override;
+  void DisplayQRCode(std::string contents) override;
+  void CloseQRCode() override;
 #endif  // SAMSUNG_NEXT_BROWSER
   bool is_type_normal() const { return type_ == TYPE_NORMAL; }
   bool is_type_popup() const { return type_ == TYPE_POPUP; }
index a58f5b928ea5e9734d6e10066bd799f88e061c1f..1fa86bede58a65e58b956e7aefc91419eae4ce04 100644 (file)
@@ -73,48 +73,20 @@ void HighContrastController::DeInit() {
   return;
 }
 void HighContrastController::SetContrastMode(bool value) {
-  const base::flat_map<ui::NativeTheme::SystemThemeColor, uint32_t> dark_theme{
-      {ui::NativeTheme::SystemThemeColor::kButtonFace, 0xFF000000},
-      {ui::NativeTheme::SystemThemeColor::kButtonText, 0xFFFFFFFF},
-      {ui::NativeTheme::SystemThemeColor::kGrayText, 0xFF3FF23F},
-      {ui::NativeTheme::SystemThemeColor::kHighlight, 0xFF1AEBFF},
-      {ui::NativeTheme::SystemThemeColor::kHighlightText, 0xFF000000},
-      {ui::NativeTheme::SystemThemeColor::kHotlight, 0xFFFFFF00},
-      {ui::NativeTheme::SystemThemeColor::kMenuHighlight, 0xFF800080},
-      {ui::NativeTheme::SystemThemeColor::kScrollbar, 0xFF000000},
-      {ui::NativeTheme::SystemThemeColor::kWindow, 0xFF000000},
-      {ui::NativeTheme::SystemThemeColor::kWindowText, 0xFFFFFFFF},
-  };
-  const base::flat_map<ui::NativeTheme::SystemThemeColor, uint32_t> light_theme{
-      {ui::NativeTheme::SystemThemeColor::kButtonFace, 0xFFFFFFFF},
-      {ui::NativeTheme::SystemThemeColor::kButtonText, 0xFF000000},
-      {ui::NativeTheme::SystemThemeColor::kGrayText, 0xFF600000},
-      {ui::NativeTheme::SystemThemeColor::kHighlight, 0xFF37006E},
-      {ui::NativeTheme::SystemThemeColor::kHighlightText, 0xFFFFFFFF},
-      {ui::NativeTheme::SystemThemeColor::kHotlight, 0xFF00009F},
-      {ui::NativeTheme::SystemThemeColor::kMenuHighlight, 0xFF000000},
-      {ui::NativeTheme::SystemThemeColor::kScrollbar, 0xFFFFFFFF},
-      {ui::NativeTheme::SystemThemeColor::kWindow, 0xFFFFFFFF},
-      {ui::NativeTheme::SystemThemeColor::kWindowText, 0xFF000000},
-  };
-
-  auto native_theme_ = ui::NativeTheme::GetInstanceForNativeUi();
+  auto native_theme = ui::NativeTheme::GetInstanceForNativeUi();
 
   if (value) {
-    native_theme_->SetPreferredContrast(
+    native_theme->SetPreferredContrast(
         ui::NativeTheme::PreferredContrast::kMore);
-                        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
- //removed form NativeTheme
-    //native_theme_->UpdateSystemColorInfo(true, true, dark_theme);
+    native_theme->set_use_dark_colors(true);
   } else {
-    native_theme_->SetPreferredContrast(
+    native_theme->SetPreferredContrast(
         ui::NativeTheme::PreferredContrast::kNoPreference);
-   // native_theme_->UpdateSystemColorInfo(false, false, light_theme);
+    native_theme->set_use_dark_colors(false);
   }
 
-  native_theme_->NotifyOnNativeThemeUpdated();
-  native_theme_->NotifyOnPreferredContrastUpdated();
+  native_theme->NotifyOnNativeThemeUpdated();
+  native_theme->NotifyOnPreferredContrastUpdated();
 
   is_active_ = value;
 }
index 31901236d558bdb51cb33f6fb44d3fa7bd6814d6..bebbcb5a62157c5b443316fab118f7054a6e62f6 100644 (file)
@@ -207,14 +207,10 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip)
         l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB));
 
 #if defined(SAMSUNG_TABSTRIP_UI)
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-/*
-    auto handoff_button = std::make_unique<HandOffButton>(
+    std::unique_ptr<HandOffButton> handoff_button = std::make_unique<HandOffButton>(
         tab_strip_, base::BindRepeating(&TabStrip::HandOffButtonPressed,
                                         base::Unretained(tab_strip_)));
     handoff_button_ = AddChildView(std::move(handoff_button));
-       */
 #endif
     // TODO(crbug.com/40118868): Revisit the macro expression once build flag
     // switch of lacros-chrome is complete.
@@ -267,15 +263,11 @@ bool TabStripRegionView::IsRectInWindowCaption(const gfx::Rect& rect) {
     return !new_tab_button_->HitTestRect(get_target_rect(new_tab_button_));
   }
 #if defined(SAMSUNG_TABSTRIP_UI)
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-/*
-  if (render_new_tab_button_over_tab_strip_ && handoff_button_ &&
+  if (handoff_button_ &&
       handoff_button_->GetLocalBounds().Intersects(
           get_target_rect(handoff_button_))) {
     return !handoff_button_->HitTestRect(get_target_rect(handoff_button_));
   }
-  */
 #endif
 
   if (render_tab_search_before_tab_strip_ && tab_search_container_ &&
@@ -348,11 +340,9 @@ views::View::Views TabStripRegionView::GetChildrenInZOrder() {
     children.emplace_back(new_tab_button_.get());
   }
 #if defined(SAMSUNG_TABSTRIP_UI)
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
- /* if (handoff_button_) {
+  if (handoff_button_) {
     children.emplace_back(handoff_button_);
-  }*/
+  }
 #endif
   if (tab_search_container_) {
     children.emplace_back(tab_search_container_.get());
@@ -530,11 +520,9 @@ void TabStripRegionView::UpdateButtonBorders() {
     new_tab_button_->SetBorder(views::CreateEmptyBorder(border_insets));
   }
 #if defined(SAMSUNG_TABSTRIP_UI)
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
- /* if (handoff_button_) {
+  if (handoff_button_) {
     handoff_button_->SetBorder(views::CreateEmptyBorder(border_insets));
-  }*/
+  }
 #endif
   if (tab_search_container_) {
     tab_search_container_->tab_search_button()->SetBorder(
@@ -568,22 +556,16 @@ void TabStripRegionView::UpdateTabStripMargin() {
   }
 
 #if defined(SAMSUNG_TABSTRIP_UI)
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-/*
   if (handoff_button_) {
-    if (render_new_tab_button_over_tab_strip_) {
       handoff_button_->SetPaintToLayer();
       handoff_button_->layer()->SetFillsBoundsOpaquely(false);
       // Inset between the tabstrip and new tab button should be reduced to
       // account for extra spacing.
-      layout_manager_->SetChildViewIgnoredByLayout(handoff_button_, true);
+      handoff_button_->SetProperty(views::kViewIgnoredByLayoutKey, true);
 
       tab_strip_right_margin = handoff_button_->GetPreferredSize().width() +
                                GetLayoutConstant(TAB_STRIP_PADDING);
-    }
   }
-  */
 #endif
   std::optional<int> tab_strip_left_margin;
   if (tab_search_container_ && render_tab_search_before_tab_strip_) {
index 131a178a31e9f968260eb340a9a0174ad00ddf24..5d9502cecabbf0c986d6c547d3f1828c149311b8 100644 (file)
@@ -102,16 +102,17 @@ SamsungBookmarksBubbleDialogView::SamsungBookmarksBubbleDialogView(
   SetTitle(title);
   SetMainImage(model);
   SetHighlightedButton(highlighted_button);
-  // make conditional
-  std::u16string add_bookmarks =
-      multi_language_controller->GetUTF16String("TV_SID_ADD_TO_BOOKMARKS");
-  std::u16string remove_bookmarks = multi_language_controller->GetUTF16String(
-      "TV_SID_REMOVE_FROM_BOOK_MARKS");
 
-  if (already_bookmarked)
+  if (already_bookmarked) {
+    std::u16string remove_bookmarks = multi_language_controller->GetUTF16String(
+      "TV_SID_REMOVE_FROM_BOOK_MARKS");
     SetButtonLabel(ui::mojom::DialogButton::kOk, remove_bookmarks);
-  else
+  }
+  else {
+      std::u16string add_bookmarks =
+      multi_language_controller->GetUTF16String("TV_SID_ADD_TO_BOOKMARKS");
     SetButtonLabel(ui::mojom::DialogButton::kOk, add_bookmarks);
+  }
 
   SetAcceptCallback(
       base::BindOnce(&SamsungBookmarksBubbleDialogView::BookmarkPressed,
@@ -143,7 +144,8 @@ SamsungBookmarksBubbleDialogView::SamsungBookmarksBubbleDialogView(
 
   SetShowCloseButton(true);
 
-  //DialogDelegate::SetButtons(ui::mojom::DialogButton::kCancel | ui::mojom::DialogButton::kOk);
+  DialogDelegate::SetButtons(static_cast<int>(ui::mojom::DialogButton::kCancel) |
+                       static_cast<int>(ui::mojom::DialogButton::kOk));
 
   const views::LayoutProvider* provider = views::LayoutProvider::Get();
   set_margins(provider->GetDialogInsetsForContentType(
@@ -174,7 +176,6 @@ SamsungBookmarksBubbleDialogView::SamsungBookmarksBubbleDialogView(
 
   if (already_bookmarked) {
     title_->SetReadOnly(true);
-    // take title from model
     auto details = bookmark_controller->GetBookmarkInfo(GURL.spec());
 
     title_->SetText(base::UTF8ToUTF16(details.first));
index ced0743d5d0aa4913ddec4bc021a44fc504555d9..1364cd2b3ee2749c2fb215894ddc4d48a8384be0 100644 (file)
@@ -54,13 +54,11 @@ SamsungHandOffBubbleDialogView::SamsungHandOffBubbleDialogView(
   std::u16string yes = multi_language_controller->GetUTF16String("SID_YES");
   std::u16string no = multi_language_controller->GetUTF16String("SID_NO");
 
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-  //SetButtonLabel(ui::mojom::DialogButton::kCancel, no);
-  //SetButtonLabel(ui::mojom::DialogButton::kOk, yes);
-  //SetDefaultButton(ui::mojom::DialogButton::kOk);
+  SetButtonLabel(ui::mojom::DialogButton::kCancel, no);
+  SetButtonLabel(ui::mojom::DialogButton::kOk, yes);
+  SetDefaultButton(static_cast<int>(ui::mojom::DialogButton::kOk));
 
-  //DialogDelegate::SetButtons(ui::mojom::DialogButton::kOk | ui::mojom::DialogButton::kCancel);
+  DialogDelegate::SetButtons(static_cast<int>(ui::mojom::DialogButton::kOk) | static_cast<int>(ui::mojom::DialogButton::kCancel));
 
   SetAcceptCallback(
       base::BindOnce(&SamsungHandOffBubbleDialogView::YesButtonPressed,
index 8e0ca0fde7c3d55d198094b821fad9119fa17cb0..c774588be8d70ea8c3c400a3c2ef7d6f701bc917 100644 (file)
@@ -16,6 +16,7 @@
 #include "chrome/browser/ui/layout_constants.h"
 #include "chrome/browser/ui/tabs/tab_types.h"
 #include "chrome/browser/ui/views/chrome_layout_provider.h"
+#include "chrome/browser/ui/views/frame/top_container_background.h"
 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
 #include "chrome/browser/ui/views/tabs/tab_strip.h"
 #include "chrome/grit/generated_resources.h"
@@ -54,7 +55,7 @@ class HandOffButton::HighlightPathGenerator
   // views::HighlightPathGenerator:
   SkPath GetHighlightPath(const views::View* view) override {
     return static_cast<const HandOffButton*>(view)->GetBorderPath(
-        view->GetContentsBounds().origin(), 1.0f, false);
+        view->GetContentsBounds().origin(), false);
   }
 };
 
@@ -62,6 +63,10 @@ HandOffButton::HandOffButton(TabStrip* tab_strip, PressedCallback callback)
     : views::ImageButton(std::move(callback)), tab_strip_(tab_strip) {
   SetAnimateOnStateChange(true);
 
+  // If there is an image for the NewTabButton it is set by the theme. Theme
+  // images should not be flipped for RTL.
+  SetFlipCanvasOnPaintForRTLUI(false);
+
   foreground_frame_active_color_id_ = kColorNewTabButtonForegroundFrameActive;
   foreground_frame_inactive_color_id_ =
       kColorNewTabButtonForegroundFrameInactive;
@@ -144,24 +149,20 @@ int HandOffButton::GetCornerRadius() const {
 }
 
 SkPath HandOffButton::GetBorderPath(const gfx::Point& origin,
-                                    float scale,
                                     bool extend_to_top) const {
-  gfx::PointF scaled_origin(origin);
-  scaled_origin.Scale(scale);
-  const float radius = GetCornerRadius() * scale;
+  const float radius = GetCornerRadius();
 
   SkPath path;
   if (extend_to_top) {
-    path.moveTo(scaled_origin.x(), 0);
+    path.moveTo(origin.x(), 0);
     const float diameter = radius * 2;
     path.rLineTo(diameter, 0);
-    path.rLineTo(0, scaled_origin.y() + radius);
+    path.rLineTo(0, origin.y() + radius);
     path.rArcTo(radius, radius, 0, SkPath::kSmall_ArcSize, SkPathDirection::kCW,
                 -diameter, 0);
     path.close();
   } else {
-    path.addCircle(scaled_origin.x() + radius, scaled_origin.y() + radius,
-                   radius);
+    path.addCircle(origin.x() + radius, origin.y() + radius, radius);
   }
   return path;
 }
@@ -225,15 +226,13 @@ void HandOffButton::PaintButtonContents(gfx::Canvas* canvas) {
   PaintFill(canvas);
   PaintIcon(canvas);
 }
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-/*
-gfx::Size HandOffButton::CalculatePreferredSize() const {
+
+gfx::Size HandOffButton::CalculatePreferredSize(const views::SizeBounds& available_size) const {
   gfx::Size size = kButtonSize;
   const auto insets = GetInsets();
   size.Enlarge(insets.width(), insets.height());
   return size;
-}*/
+}
 
 bool HandOffButton::GetHitTestMask(SkPath* mask) const {
   DCHECK(mask);
@@ -242,7 +241,7 @@ bool HandOffButton::GetHitTestMask(SkPath* mask) const {
   if (base::i18n::IsRTL())
     origin.set_x(GetInsets().right());
   const float scale = GetWidget()->GetCompositor()->device_scale_factor();
-  SkPath border = GetBorderPath(origin, scale,
+  SkPath border = GetBorderPath(origin,
                                 tab_strip_->controller()->IsFrameCondensed());
   mask->addPath(border, SkMatrix::Scale(1 / scale, 1 / scale));
   return true;
@@ -284,7 +283,7 @@ void HandOffButton::PaintFill(gfx::Canvas* canvas) const {
             : background_frame_inactive_color_id_));
   }
 
-  canvas->DrawPath(GetBorderPath(gfx::Point(), scale, false), flags);
+  canvas->DrawPath(GetBorderPath(gfx::Point(), false), flags);
 }
 
 void HandOffButton::PaintIcon(gfx::Canvas* canvas) {
@@ -346,5 +345,5 @@ void HandOffButton::PaintIcon(gfx::Canvas* canvas) {
                      flags);
 }
 
-//BEGIN_METADATA(HandOffButton, views::ImageButton)
-//END_METADATA
+BEGIN_METADATA(HandOffButton)
+END_METADATA
index 22b5a8d9ce351921a58c010430c3943f5e5e42a7..c900ce08ab5e20864a96374a466c3579094f4603 100644 (file)
@@ -28,9 +28,10 @@ class InkDropContainerView;
 ///////////////////////////////////////////////////////////////////////////////
 class HandOffButton : public views::ImageButton,
                       public views::MaskedTargeterDelegate {
- public:
-  METADATA_HEADER(HandOffButton,views::ImageButton);
 
+  METADATA_HEADER(HandOffButton, views::ImageButton)
+
+ public:
   static const gfx::Size kButtonSize;
   static const int kIconSize;
 
@@ -65,7 +66,6 @@ class HandOffButton : public views::ImageButton,
   // Returns the path for the given |origin| and |scale|.  If |extend_to_top| is
   // true, the path is extended vertically to y = 0.
   virtual SkPath GetBorderPath(const gfx::Point& origin,
-                               float scale,
                                bool extend_to_top) const;
 
   // views::ImageButton:
@@ -84,9 +84,7 @@ class HandOffButton : public views::ImageButton,
   void OnGestureEvent(ui::GestureEvent* event) override;
   void NotifyClick(const ui::Event& event) override;
   void PaintButtonContents(gfx::Canvas* canvas) override;
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-  //gfx::Size CalculatePreferredSize() const override;
+  gfx::Size CalculatePreferredSize(const views::SizeBounds& available_size) const override;
 
   // views::MaskedTargeterDelegate:
   bool GetHitTestMask(SkPath* mask) const override;
@@ -112,4 +110,4 @@ class HandOffButton : public views::ImageButton,
   base::WeakPtrFactory<HandOffButton> weak_factory_{this};
 };
 
-#endif  // CHROME_BROWSER_UI_VIEWS_TABS_NEW_TAB_BUTTON_H_
+#endif  // CHROME_BROWSER_UI_VIEWS_TABS_HANDOFF_BUTTON_H_
index 5c227ddfc42990739af6fa80aa99e84800487a5d..ab62cd84568e3573864b741d00f4eba4ebb12b7d 100644 (file)
@@ -55,10 +55,8 @@ SamsungHandOffTimeoutBubbleDialogView::SamsungHandOffTimeoutBubbleDialogView(
       multi_language_controller->GetUTF16String("COM_SID_OK");
 
   SetButtonLabel(ui::mojom::DialogButton::kCancel, close);
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
- // SetDefaultButton(ui::mojom::DialogButton::kCancel);
-  //DialogDelegate::SetButtons(ui::mojom::DialogButton::kCancel);
+  SetDefaultButton(static_cast<int>(ui::mojom::DialogButton::kCancel));
+  DialogDelegate::SetButtons(static_cast<int>(ui::mojom::DialogButton::kCancel));
 
   SetCancelCallback(
       base::BindOnce(&SamsungHandOffTimeoutBubbleDialogView::ClearHandoffPopup,
index b56f4cccfc3591c6f61415897ebf0e79a816e2be..d5685131887ecb5c107739c19122a730740e66c9 100644 (file)
@@ -55,9 +55,7 @@ SamsungPasskeyBubbleDialogView::SamsungPasskeyBubbleDialogView(
   SetCancelCallback(
       base::BindOnce(&SamsungPasskeyBubbleDialogView::CancelAuthentication,
                      base::Unretained(this)));
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-  //DialogDelegate::SetButtons(ui::mojom::DialogButton::kCancel);
+  DialogDelegate::SetButtons(static_cast<int>(ui::mojom::DialogButton::kCancel));
 
   const views::LayoutProvider* provider = views::LayoutProvider::Get();
   set_margins(provider->GetDialogInsetsForContentType(
@@ -111,10 +109,7 @@ void SamsungPasskeyBubbleDialogView::CancelAuthentication() {
     return;
   }
 
-//      //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
- // efl_helper->CancelAuthentication();  
- //error: no member named 'CancelAuthentication' in 'content::RWHVAuraCommonHelperEfl'
+ efl_helper->CancelAuthentication();  
 
   auto passkey_controller =
       samsung_browser_main::SamsungBrowserCore::instance()->PasskeyController();
index 23ac14e8759eb528855728bd30da2c45f621f51b..8a2046a62682ddc9cd6c1d97a491e31db97ef201 100644 (file)
@@ -34,6 +34,7 @@
 #include "ui/views/controls/highlight_path_generator.h"
 #include "ui/views/view_class_properties.h"
 #include "ui/views/widget/widget.h"
+#include <optional>
 
 #if BUILDFLAG(IS_WIN)
 #include "ui/display/win/screen_win.h"
index e9b2eef1b5f6891fbcbeb74201d1ceb15a2416f5..d1efaaf26ed675b238d264d7cde9dcf42bf957c0 100644 (file)
@@ -13,7 +13,8 @@ source_set("passkey") {
   public_deps = [ "//base" ]
 
   configs += [
+    "//tizen_src/build:capi-media-vision-barcode",
+    "//tizen_src/build:libcapi-media-vision-barcode",
   ]
 
 }
index f817aa3ba8f744b44ea978cddeec699ecb4ee82e..7ba2ee28e07ce55f706715e64bd5f49693754947 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-//#include <mv_barcode.h>
+#include <mv_barcode.h>
 
 #include "components/samsung/passkey/passkey_service_impl.h"
 
@@ -19,9 +19,7 @@ bool PasskeyServiceImpl::Init() {
 bool PasskeyServiceImpl::GenerateImage(std::string contents) {
   LOG(INFO) << "PasskeyServiceImpl::GenerateImage() started";
 
-        //TODO:[NextBrowser][Merging]
- //commented the code temporarily to fix the build error
-  /*const char* path = "/tmp/webauthn-qrcode.png";
+  const char* path = "/tmp/webauthn-qrcode.png";
   const char* qr_contents = contents.c_str();
   int ret;
   int width = 300;
@@ -41,7 +39,7 @@ bool PasskeyServiceImpl::GenerateImage(std::string contents) {
     LOG(INFO) << "mv_barcode_generate_image failed with code %d", ret;
     return false;
   }
-*/
+
   LOG(INFO) << "PasskeyServiceImpl::GenerateImage() completed";
   return true;
 }