Commit 91948560 authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

Add ability to drag tabs between pinned and unpinned tabs to modify the

pinned state.

Bug: 965681
Change-Id: I4cebf850839a1fdbee702ab2cd3c2fccbdba811e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637045Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666796}
parent a585ac01
......@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/views/tabs/tab_animation_state.h"
#include "chrome/browser/ui/views/tabs/tab_drag_context.h"
#include "chrome/browser/ui/views/tabs/tab_strip_types.h"
#include "ui/base/models/list_selection_model.h"
......@@ -494,6 +495,19 @@ class TabDragController : public views::WidgetObserver {
// is showing a modal).
bool ShouldDisallowDrag(gfx::NativeWindow window);
// Helper method for TabDragController::MoveAttached to update the pinnedness
// of the tab being moved by checking the pinnedness of the tabs being
// dragged with the pinnedness of the tab at the target dragged location.
// TODO (crbug.com/971676): This will swap and update the pinnedness of
// multi-selected tabs one at a time, which is unintended.
void UpdatePinnednessOfDraggedTab(int to_index);
// Helper method that checks if the index is valid in the TabDragContext and
// the pin at the index has the expected pinned value.
bool CheckValidPinnedness(
int index,
TabAnimationState::TabPinnedness expected_pinnedness);
EventSource event_source_;
// The TabDragContext the drag originated from. This is set to null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment