Fix dragging supported files to tab strip.
commit01e117df184677e024d7f4f17fee7fdfeb1e4053
authormichaelpg@chromium.org <michaelpg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 4 Dec 2013 02:51:01 +0000 (4 02:51 +0000)
committermichaelpg@chromium.org <michaelpg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 4 Dec 2013 02:51:01 +0000 (4 02:51 +0000)
tree0b2104d8cc8d292e1ae2219f4c136017d545b25d
parentbe6fcc7020d8ce58a179b93869afaf2e71d82fdd
Fix dragging supported files to tab strip.

Use the inferred MIME type of download items, rather than the server value,
when deciding if the tab strip can allow a drop. Get the MIME type
asynchronously so we don't crash (IO must be allowed in the call to
GetMimeTypeFromFile).

Also check the profile's plugins when determining whether a MIME type is
supported.

Regardless of whether a file is supported, the dragging operation should
still be allowed so that spring-loaded tabs work with file drags.

BUG=274288
R=asanka@chromium.org, sky@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238253

Review URL: https://codereview.chromium.org/68133020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238531 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/download/drag_download_item_views.cc
chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h
chrome/browser/ui/views/tabs/tab_strip.cc
chrome/browser/ui/views/tabs/tab_strip.h
chrome/browser/ui/views/tabs/tab_strip_controller.h