Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Issue 9582041: Move most of ui/views/drag_utils to ui/base/dragdrop so it can be used outside of views. I tried to… (Closed)

Created:
8 years, 9 months ago by jam
Modified:
8 years, 9 months ago
Reviewers:
Nico, sky
CC:
chromium-reviews, tfarina, James Su, rdsmith+dwatch_chromium.org, dcheng
Visibility:
Public.

Description

Move most of ui/views/drag_utils to ui/base/dragdrop so it can be used outside of views. I tried to move SetURLAndDragImage as well, but that would cause a lot of code duplication from Views' TextButton class that would make us worse off (things like mirroring and limiting size). BUG=98716 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=124923

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -382 lines) Patch
M chrome/browser/bookmarks/bookmark_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/browser_actions_container.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_win.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc View 1 chunk +1 line, -1 line 0 comments Download
A + ui/base/dragdrop/drag_utils.h View 2 chunks +15 lines, -23 lines 0 comments Download
A + ui/base/dragdrop/drag_utils.cc View 1 chunk +3 lines, -32 lines 0 comments Download
A + ui/base/dragdrop/drag_utils_aura.cc View 1 chunk +1 line, -1 line 0 comments Download
A + ui/base/dragdrop/drag_utils_gtk.cc View 1 chunk +1 line, -1 line 0 comments Download
A + ui/base/dragdrop/drag_utils_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/ui.gyp View 1 chunk +5 lines, -0 lines 0 comments Download
A ui/views/button_drag_utils.h View 1 chunk +30 lines, -0 lines 0 comments Download
A ui/views/button_drag_utils.cc View 1 chunk +49 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 2 chunks +1 line, -1 line 0 comments Download
D ui/views/drag_utils.h View 1 chunk +0 lines, -64 lines 0 comments Download
D ui/views/drag_utils.cc View 1 chunk +0 lines, -101 lines 0 comments Download
D ui/views/drag_utils_aura.cc View 1 chunk +0 lines, -26 lines 0 comments Download
D ui/views/drag_utils_gtk.cc View 1 chunk +0 lines, -46 lines 0 comments Download
D ui/views/drag_utils_win.cc View 1 chunk +0 lines, -72 lines 0 comments Download
M ui/views/views.gyp View 2 chunks +2 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
8 years, 9 months ago (2012-03-03 03:25:11 UTC) #1
sky
LGTM
8 years, 9 months ago (2012-03-05 05:12:33 UTC) #2
Nico
8 years, 9 months ago (2012-03-08 18:25:34 UTC) #3
This breaks the (work-in-progress) components build on mac: drag_utils.cc uses
drag_utils::SetDragImageOnDataObject(SkBitmap const&, gfx::Size const&,
gfx::Point const&, ui::OSExchangeData*) which isn't defined anywhere for mac. In
the normal build, that's fine, since drag_utils.cc isn't referenced so the
linker just ignores this .o file. But in the components build,
drag_utils::SetDragImageOnDataObject(gfx::Canvas const&, gfx::Size const&,
gfx::Point const&, ui::OSExchangeData*) is marked as _EXPORT, so it can't do
that.

I guess the right fix is to put these files in a os!="mac" block.

Powered by Google App Engine
This is Rietveld 408576698