OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/undo/bookmark_undo_service.h" | |
10 #include "chrome/browser/undo/bookmark_undo_service_factory.h" | 9 #include "chrome/browser/undo/bookmark_undo_service_factory.h" |
11 #include "components/bookmarks/browser/bookmark_client.h" | 10 #include "components/bookmarks/browser/bookmark_client.h" |
12 #include "components/bookmarks/browser/bookmark_model.h" | 11 #include "components/bookmarks/browser/bookmark_model.h" |
13 #include "components/bookmarks/browser/bookmark_node_data.h" | 12 #include "components/bookmarks/browser/bookmark_node_data.h" |
14 #include "components/bookmarks/browser/bookmark_utils.h" | 13 #include "components/bookmarks/browser/bookmark_utils.h" |
15 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" | 14 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" |
| 15 #include "components/undo/bookmark_undo_service.h" |
16 #include "ui/base/dragdrop/drag_drop_types.h" | 16 #include "ui/base/dragdrop/drag_drop_types.h" |
17 | 17 |
18 using bookmarks::BookmarkModel; | 18 using bookmarks::BookmarkModel; |
19 using bookmarks::BookmarkNode; | 19 using bookmarks::BookmarkNode; |
20 using bookmarks::BookmarkNodeData; | 20 using bookmarks::BookmarkNodeData; |
21 | 21 |
22 namespace chrome { | 22 namespace chrome { |
23 | 23 |
24 int DropBookmarks(Profile* profile, | 24 int DropBookmarks(Profile* profile, |
25 const BookmarkNodeData& data, | 25 const BookmarkNodeData& data, |
(...skipping 23 matching lines...) Expand all Loading... |
49 return copy ? ui::DragDropTypes::DRAG_COPY : ui::DragDropTypes::DRAG_MOVE; | 49 return copy ? ui::DragDropTypes::DRAG_COPY : ui::DragDropTypes::DRAG_MOVE; |
50 } | 50 } |
51 return ui::DragDropTypes::DRAG_NONE; | 51 return ui::DragDropTypes::DRAG_NONE; |
52 } | 52 } |
53 // Dropping a folder from different profile. Always accept. | 53 // Dropping a folder from different profile. Always accept. |
54 bookmarks::CloneBookmarkNode(model, data.elements, parent_node, index, true); | 54 bookmarks::CloneBookmarkNode(model, data.elements, parent_node, index, true); |
55 return ui::DragDropTypes::DRAG_COPY; | 55 return ui::DragDropTypes::DRAG_COPY; |
56 } | 56 } |
57 | 57 |
58 } // namespace chrome | 58 } // namespace chrome |
OLD | NEW |