Skip to content

Commit

Permalink
[cr133] ClipboardFormatType::GetType renamed
Browse files Browse the repository at this point in the history
`ClipboardFormatType::CustomPlatformType` is now being used as a more
appropriate name.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/feb09ab1c553ae89237fd8d3ad5f24941b2e6bde

commit feb09ab1c553ae89237fd8d3ad5f24941b2e6bde
Author: Daniel Cheng <[email protected]>
Date:   Fri Dec 6 18:57:16 2024 +0000

    Deprecate ClipboardFormatType::GetType()

    - ClipboardFormatType::CustomPlatformType() is another synonym and is
      more descriptive.
    - Strengthen the DCHECK to a CHECK and improve method comments.
    - Leave a forwarding stub for GetType() for now. It will be removed in a
      followup.

    Change-Id: Ie6ef15f5f9fada25416333e73ca6db0689477ae6
  • Loading branch information
cdesouza-chromium committed Dec 9, 2024
1 parent 46ec012 commit 36ce5c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions browser/ui/views/sidebar/sidebar_items_scroll_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ bool SidebarItemsScrollView::IsInVisibleContentsViewBounds(
bool SidebarItemsScrollView::GetDropFormats(
int* formats,
std::set<ui::ClipboardFormatType>* format_types) {
format_types->insert(ui::ClipboardFormatType::GetType(kSidebarItemDragType));
format_types->insert(
ui::ClipboardFormatType::CustomPlatformType(kSidebarItemDragType));
return true;
}

Expand All @@ -480,7 +481,7 @@ bool SidebarItemsScrollView::CanDrop(const OSExchangeData& data) {
}

return data.HasCustomFormat(
ui::ClipboardFormatType::GetType(kSidebarItemDragType));
ui::ClipboardFormatType::CustomPlatformType(kSidebarItemDragType));
}

void SidebarItemsScrollView::OnDragExited() {
Expand Down Expand Up @@ -543,8 +544,9 @@ void SidebarItemsScrollView::WriteDragDataForView(views::View* sender,
item_view->GetImage(views::Button::STATE_NORMAL),
press_pt.OffsetFromOrigin());

data->SetPickledData(ui::ClipboardFormatType::GetType(kSidebarItemDragType),
base::Pickle());
data->SetPickledData(
ui::ClipboardFormatType::CustomPlatformType(kSidebarItemDragType),
base::Pickle());
}

int SidebarItemsScrollView::GetDragOperationsForView(views::View* sender,
Expand Down

0 comments on commit 36ce5c0

Please sign in to comment.