Chromium Code Reviews| Index: chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc |
| diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc |
| index 795b9672025fc6e732cb8569ec8ba41209a52fd3..ab1a843353de93e1ba10d887708f4f71f27d5350 100644 |
| --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc |
| +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc |
| @@ -211,11 +211,12 @@ void NativeTabContentsViewAura::StartDragging(const WebDropData& drop_data, |
| // We need to enable recursive tasks on the message loop so we can get |
| // updates while in the system DoDragDrop loop. |
| - bool old_state = MessageLoop::current()->NestableTasksAllowed(); |
| - MessageLoop::current()->SetNestableTasksAllowed(true); |
| - int result_op = aura::client::GetDragDropClient()->StartDragAndDrop( |
| - data, ConvertFromWeb(ops)); |
| - MessageLoop::current()->SetNestableTasksAllowed(old_state); |
| + int result_op = 0; |
| + { |
| + MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); |
| + result_op = aura::client::GetDragDropClient()->StartDragAndDrop( |
|
jar (doing other things)
2012/02/11 03:24:38
nit: Does this actually induce a nested message lo
dhollowa
2012/02/13 17:44:26
sky will be the best person to comment here. But
jar (doing other things)
2012/02/14 01:51:43
Sky@
Do you think this is as close as you can get
sky
2012/02/14 04:45:05
DragDropController::StartDragAndDrop is closer (in
dhollowa
2012/02/14 05:42:20
Shall I move the scoper there then? Or would you
|
| + data, ConvertFromWeb(ops)); |
| + } |
| EndDrag(ConvertToWeb(result_op)); |
| GetWebContents()->GetRenderViewHost()->DragSourceSystemDragEnded(); |