| OLD | NEW |
| (Empty) |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/bookmarks/bookmark_utils.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "base/message_loop.h" | |
| 9 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | |
| 10 | |
| 11 namespace bookmark_utils { | |
| 12 | |
| 13 void DragBookmarks(Profile* profile, | |
| 14 const std::vector<const BookmarkNode*>& nodes, | |
| 15 gfx::NativeView view) { | |
| 16 DCHECK(!nodes.empty()); | |
| 17 | |
| 18 // Allow nested message loop so we get DnD events as we drag this around. | |
| 19 bool was_nested = MessageLoop::current()->IsNested(); | |
| 20 MessageLoop::current()->SetNestableTasksAllowed(true); | |
| 21 bookmark_pasteboard_helper_mac::StartDrag(profile, nodes, view); | |
| 22 MessageLoop::current()->SetNestableTasksAllowed(was_nested); | |
| 23 } | |
| 24 | |
| 25 } // namespace bookmark_utils | |
| OLD | NEW |