| 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" | 9 #include "chrome/browser/undo/bookmark_undo_service.h" |
| 10 #include "chrome/browser/undo/bookmark_undo_service_factory.h" | 10 #include "chrome/browser/undo/bookmark_undo_service_factory.h" |
| 11 #include "components/bookmarks/core/browser/bookmark_model.h" | 11 #include "components/bookmarks/browser/bookmark_model.h" |
| 12 #include "components/bookmarks/core/browser/bookmark_node_data.h" | 12 #include "components/bookmarks/browser/bookmark_node_data.h" |
| 13 #include "components/bookmarks/core/browser/bookmark_utils.h" | 13 #include "components/bookmarks/browser/bookmark_utils.h" |
| 14 #include "components/bookmarks/core/browser/scoped_group_bookmark_actions.h" | 14 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" |
| 15 #include "ui/base/dragdrop/drag_drop_types.h" | 15 #include "ui/base/dragdrop/drag_drop_types.h" |
| 16 | 16 |
| 17 namespace chrome { | 17 namespace chrome { |
| 18 | 18 |
| 19 int DropBookmarks(Profile* profile, | 19 int DropBookmarks(Profile* profile, |
| 20 const BookmarkNodeData& data, | 20 const BookmarkNodeData& data, |
| 21 const BookmarkNode* parent_node, | 21 const BookmarkNode* parent_node, |
| 22 int index) { | 22 int index) { |
| 23 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile); | 23 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile); |
| 24 #if !defined(OS_ANDROID) | 24 #if !defined(OS_ANDROID) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 return ui::DragDropTypes::DRAG_NONE; | 38 return ui::DragDropTypes::DRAG_NONE; |
| 39 } | 39 } |
| 40 // Dropping a folder from different profile. Always accept. | 40 // Dropping a folder from different profile. Always accept. |
| 41 bookmark_utils::CloneBookmarkNode(model, data.elements, parent_node, | 41 bookmark_utils::CloneBookmarkNode(model, data.elements, parent_node, |
| 42 index, true); | 42 index, true); |
| 43 return ui::DragDropTypes::DRAG_COPY; | 43 return ui::DragDropTypes::DRAG_COPY; |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace chrome | 46 } // namespace chrome |
| OLD | NEW |