[cr148] Hovercard sources moved into their own path

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e3daf97890c890d4843b63b3e4e6b5d738a6ae4b

commit e3daf97890c890d4843b63b3e4e6b5d738a6ae4b
Author: Eshwar Stalin <estalin@chromium.org>
Date:   Thu Mar 26 11:05:06 2026 -0700

    Creating a hovercard folder under c/b/ui/views/tabs

    Bypass-Check-License: Moving existing files
    Change-Id: Ic3aab57ddccef6a7b6aeedb508f733261d36665d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7641849
    Reviewed-by: Steven Luong <stluong@chromium.org>
    Commit-Queue: Eshwar Stalin <estalin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1605665}
This commit is contained in:
Claudio DeSouza
2026-04-27 12:00:53 +01:00
parent 1a2db06512
commit 0904e68096
12 changed files with 37 additions and 37 deletions
@@ -18,10 +18,10 @@
#include "chrome/browser/ui/thumbnails/thumbnail_tab_helper.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/browser/ui/views/tabs/tab_container.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/prefs/pref_service.h"
@@ -11,10 +11,10 @@
#include "brave/browser/ui/tabs/brave_tab_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_thumbnail_observer.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_thumbnail_observer.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
BraveTabHoverCardController::~BraveTabHoverCardController() = default;
@@ -6,7 +6,7 @@
#ifndef BRAVE_BROWSER_UI_VIEWS_TABS_BRAVE_TAB_HOVER_CARD_CONTROLLER_H_
#define BRAVE_BROWSER_UI_VIEWS_TABS_BRAVE_TAB_HOVER_CARD_CONTROLLER_H_
#include "chrome/browser/ui/views/tabs/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_controller.h"
class HoverCardAnchorTarget;
@@ -1,9 +1,9 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* you can obtain one at http://mozilla.org/MPL/2.0/. */
* You can obtain one at https://mozilla.org/MPL/2.0/. */
#include "chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h"
#include <string>
@@ -12,14 +12,14 @@
#include "brave/browser/ui/tabs/brave_tab_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_controller.h"
#include "chrome/browser/ui/views/tabs/tab_slot_controller.h"
#include "content/public/common/url_constants.h"
#include "ui/views/controls/label.h"
#define TabHoverCardBubbleView TabHoverCardBubbleView_ChromiumImpl
#include <chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc>
#include <chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.cc>
#undef TabHoverCardBubbleView
bool TabHoverCardBubbleView_ChromiumImpl::HasThumbnailView() const {
@@ -1,10 +1,10 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* you can obtain one at http://mozilla.org/MPL/2.0/. */
* You can obtain one at https://mozilla.org/MPL/2.0/. */
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_HOVER_CARD_BUBBLE_VIEW_H_
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_HOVER_CARD_BUBBLE_VIEW_H_
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_HOVERCARD_TAB_HOVER_CARD_BUBBLE_VIEW_H_
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_HOVERCARD_TAB_HOVER_CARD_BUBBLE_VIEW_H_
// Inject a protected method that will have access to the private members of the
// base class. Then, we can call this method from the subclass' override.
@@ -22,7 +22,7 @@ class TabHoverCardBubbleView;
#define UpdateCardContent virtual UpdateCardContent
#define SetTargetTabImage virtual SetTargetTabImage
#define SetPlaceholderImage virtual SetPlaceholderImage
#include <chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h> // IWYU pragma: export
#include <chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h> // IWYU pragma: export
#undef SetPlaceholderImage
#undef SetTargetTabImage
#undef UpdateCardContent
@@ -42,4 +42,4 @@ class TabHoverCardBubbleView : public TabHoverCardBubbleView_ChromiumImpl {
void SetPlaceholderImage() override;
};
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_HOVER_CARD_BUBBLE_VIEW_H_
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_HOVERCARD_TAB_HOVER_CARD_BUBBLE_VIEW_H_
@@ -1,10 +1,10 @@
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* you can obtain one at http://mozilla.org/MPL/2.0/. */
* You can obtain one at https://mozilla.org/MPL/2.0/. */
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_HOVER_CARD_CONTROLLER_H_
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_HOVER_CARD_CONTROLLER_H_
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_HOVERCARD_TAB_HOVER_CARD_CONTROLLER_H_
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_HOVERCARD_TAB_HOVER_CARD_CONTROLLER_H_
#define CreateHoverCard \
CreateHoverCard_Unused(); \
@@ -16,9 +16,9 @@
OnHovercardImagesEnabledChanged_Unused(); \
virtual void OnHovercardImagesEnabledChanged
#include <chrome/browser/ui/views/tabs/tab_hover_card_controller.h> // IWYU pragma: export
#include <chrome/browser/ui/views/tabs/hovercard/tab_hover_card_controller.h> // IWYU pragma: export
#undef OnHovercardImagesEnabledChanged
#undef CreateHoverCard
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_HOVER_CARD_CONTROLLER_H_
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_HOVERCARD_TAB_HOVER_CARD_CONTROLLER_H_
@@ -5,4 +5,4 @@
#include "brave/browser/ui/views/tabs/brave_tab_hover_card_controller.h"
#include <chrome/browser/ui/views/tabs/tab_hover_card_controller_browsertest.cc>
#include <chrome/browser/ui/views/tabs/hovercard/tab_hover_card_controller_browsertest.cc>
@@ -1,7 +1,7 @@
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* you can obtain one at http://mozilla.org/MPL/2.0/. */
* You can obtain one at https://mozilla.org/MPL/2.0/. */
// This following include is needed because of the upstream change
// https://chromium.googlesource.com/chromium/src/+/4021762e. It added
@@ -12,4 +12,4 @@
// member access into incomplete type error.
#include "brave/browser/ui/views/tabs/brave_tab_hover_card_controller.h"
#include <chrome/browser/ui/views/tabs/tab_hover_card_test_util.cc>
#include <chrome/browser/ui/views/tabs/hovercard/tab_hover_card_test_util.cc>
@@ -7,7 +7,7 @@
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
#include "base/memory/raw_ref.h"
#include "chrome/browser/ui/views/tabs/hover_card_anchor_target.h"
#include "chrome/browser/ui/views/tabs/hovercard/hover_card_anchor_target.h"
#include "chrome/browser/ui/views/tabs/tab_slot_controller.h"
#include "components/tabs/public/tab_interface.h"
@@ -12,8 +12,8 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tabs/tab_data.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/views/tabs/hovercard/tab_hover_card_test_util.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_test_util.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "content/public/test/browser_test.h"
#include "url/gurl.h"
@@ -0,0 +1,12 @@
diff --git a/chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h b/chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h
index 3a567d99d155bfe9ecb64edfda982ae5def46ee2..a4eee8b3a40d6d2536788fe0356a74dae07c9dba 100644
--- a/chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h
+++ b/chrome/browser/ui/views/tabs/hovercard/tab_hover_card_bubble_view.h
@@ -104,6 +104,7 @@ class TabHoverCardBubbleView : public views::BubbleDialogDelegateView {
// available, or `std::nullopt` to disable crossfades entirely.
static std::optional<double> GetPreviewImageCrossfadeStart();
+ BRAVE_TAB_HOVER_CARD_BUBBLE_VIEW_H_
protected:
class ThumbnailView;
@@ -1,12 +0,0 @@
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h
index 1ecbe60beaff6cc85cc0d70854a799976f460c56..f80d3af0588526a9b6dee8bfbddfe3610386fe5d 100644
--- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h
+++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h
@@ -99,6 +99,7 @@ class TabHoverCardBubbleView : public views::BubbleDialogDelegateView {
// available, or `std::nullopt` to disable crossfades entirely.
static std::optional<double> GetPreviewImageCrossfadeStart();
+ BRAVE_TAB_HOVER_CARD_BUBBLE_VIEW_H_
protected:
class ThumbnailView;