| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "components/bookmarks/browser/bookmark_model.h" | 10 #include "components/bookmarks/browser/bookmark_model.h" |
| 11 #include "components/bookmarks/browser/bookmark_node_data.h" | 11 #include "components/bookmarks/browser/bookmark_node_data.h" |
| 12 #include "components/bookmarks/browser/bookmark_utils.h" | 12 #include "components/bookmarks/browser/bookmark_utils.h" |
| 13 #include "ui/base/dragdrop/drag_drop_types.h" | 13 #include "ui/base/dragdrop/drag_drop_types.h" |
| 14 #include "ui/base/dragdrop/os_exchange_data.h" | 14 #include "ui/base/dragdrop/os_exchange_data.h" |
| 15 #include "ui/views/drag_utils.h" | 15 #include "ui/views/drag_utils.h" |
| 16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
| 17 | 17 |
| 18 using bookmarks::BookmarkModel; | 18 using bookmarks::BookmarkModel; |
| 19 using bookmarks::BookmarkNode; |
| 19 | 20 |
| 20 namespace chrome { | 21 namespace chrome { |
| 21 | 22 |
| 22 void DragBookmarks(Profile* profile, | 23 void DragBookmarks(Profile* profile, |
| 23 const std::vector<const BookmarkNode*>& nodes, | 24 const std::vector<const BookmarkNode*>& nodes, |
| 24 gfx::NativeView view, | 25 gfx::NativeView view, |
| 25 ui::DragDropTypes::DragEventSource source) { | 26 ui::DragDropTypes::DragEventSource source) { |
| 26 DCHECK(!nodes.empty()); | 27 DCHECK(!nodes.empty()); |
| 27 | 28 |
| 28 // Set up our OLE machinery. | 29 // Set up our OLE machinery. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 46 } else { | 47 } else { |
| 47 // We hit this case when we're using WebContentsViewWin or | 48 // We hit this case when we're using WebContentsViewWin or |
| 48 // WebContentsViewAura, instead of WebContentsViewViews. | 49 // WebContentsViewAura, instead of WebContentsViewViews. |
| 49 views::RunShellDrag(view, data, gfx::Point(), operation, source); | 50 views::RunShellDrag(view, data, gfx::Point(), operation, source); |
| 50 } | 51 } |
| 51 | 52 |
| 52 base::MessageLoop::current()->SetNestableTasksAllowed(was_nested); | 53 base::MessageLoop::current()->SetNestableTasksAllowed(was_nested); |
| 53 } | 54 } |
| 54 | 55 |
| 55 } // namespace chrome | 56 } // namespace chrome |
| OLD | NEW |