Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
sangwoo108 committed Sep 18, 2023
1 parent c5d348b commit 79cae2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "brave/browser/ui/browser_commands.h"
#include "brave/browser/ui/tabs/features.h"
#include "brave/browser/ui/views/frame/brave_browser_view.h"
#include "brave/browser/ui/views/frame/vertical_tab_strip_region_view.h"
#include "brave/browser/ui/views/frame/vertical_tab_strip_root_view.h"
Expand All @@ -23,14 +22,12 @@

class VerticalTabStripRootViewBrowserTest : public InProcessBrowserTest {
public:
VerticalTabStripRootViewBrowserTest() {
feature_list_.InitAndEnableFeature(tabs::features::kBraveVerticalTabs);
}

VerticalTabStripRootViewBrowserTest() = default;
VerticalTabStripRootViewBrowserTest(
const VerticalTabStripRootViewBrowserTest&) = delete;
VerticalTabStripRootViewBrowserTest& operator=(
const VerticalTabStripRootViewBrowserTest&) = delete;
~VerticalTabStripRootViewBrowserTest() override = default;

Tab* GetTabAt(int index) { return tab_strip()->tab_at(index); }

Expand Down Expand Up @@ -65,8 +62,6 @@ class VerticalTabStripRootViewBrowserTest : public InProcessBrowserTest {
}
return nullptr;
}

base::test::ScopedFeatureList feature_list_;
};

IN_PROC_BROWSER_TEST_F(VerticalTabStripRootViewBrowserTest,
Expand Down
3 changes: 1 addition & 2 deletions browser/ui/views/tabs/brave_compound_tab_container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ int BraveCompoundTabContainer::GetUnpinnedContainerIdealLeadingX() const {

BrowserRootView::DropIndex BraveCompoundTabContainer::GetDropIndex(
const ui::DropTargetEvent& event) {
if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs) ||
!ShouldShowVerticalTabs()) {
if (!ShouldShowVerticalTabs()) {
return CompoundTabContainer::GetDropIndex(event);
}

Expand Down
9 changes: 3 additions & 6 deletions browser/ui/views/tabs/brave_tab_container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ void BraveTabContainer::PaintChildren(const views::PaintInfo& paint_info) {

BrowserRootView::DropIndex BraveTabContainer::GetDropIndex(
const ui::DropTargetEvent& event) {
if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs) ||
!tabs::utils::ShouldShowVerticalTabs(
if (!tabs::utils::ShouldShowVerticalTabs(
tab_slot_controller_->GetBrowser())) {
return TabContainerImpl::GetDropIndex(event);
}
Expand Down Expand Up @@ -440,8 +439,7 @@ void BraveTabContainer::DropArrow::OnWidgetDestroying(views::Widget* widget) {

void BraveTabContainer::HandleDragUpdate(
const absl::optional<BrowserRootView::DropIndex>& index) {
if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs) ||
!tabs::utils::ShouldShowVerticalTabs(
if (!tabs::utils::ShouldShowVerticalTabs(
tab_slot_controller_->GetBrowser())) {
TabContainerImpl::HandleDragUpdate(index);
return;
Expand All @@ -450,8 +448,7 @@ void BraveTabContainer::HandleDragUpdate(
}

void BraveTabContainer::HandleDragExited() {
if (!base::FeatureList::IsEnabled(tabs::features::kBraveVerticalTabs) ||
!tabs::utils::ShouldShowVerticalTabs(
if (!tabs::utils::ShouldShowVerticalTabs(
tab_slot_controller_->GetBrowser())) {
TabContainerImpl::HandleDragExited();
return;
Expand Down

0 comments on commit 79cae2c

Please sign in to comment.