| 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/views/bookmarks/bookmark_drag_drop_views.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h" | 11 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h" |
| 12 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 13 #include "components/bookmarks/browser/bookmark_model.h" | 13 #include "components/bookmarks/browser/bookmark_model.h" |
| 14 #include "components/bookmarks/browser/bookmark_node_data.h" | 14 #include "components/bookmarks/browser/bookmark_node_data.h" |
| 15 #include "components/bookmarks/browser/bookmark_utils.h" | 15 #include "components/bookmarks/browser/bookmark_utils.h" |
| 16 #include "components/user_prefs/user_prefs.h" | 16 #include "components/user_prefs/user_prefs.h" |
| 17 #include "ui/base/dragdrop/drag_drop_types.h" | 17 #include "ui/base/dragdrop/drag_drop_types.h" |
| 18 #include "ui/base/dragdrop/os_exchange_data.h" | 18 #include "ui/base/dragdrop/os_exchange_data.h" |
| 19 #include "ui/events/event.h" | 19 #include "ui/events/event.h" |
| 20 #include "ui/views/drag_utils.h" | 20 #include "ui/views/drag_utils.h" |
| 21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
| 22 | 22 |
| 23 using bookmarks::BookmarkNodeData; |
| 24 |
| 23 namespace chrome { | 25 namespace chrome { |
| 24 | 26 |
| 25 void DragBookmarks(Profile* profile, | 27 void DragBookmarks(Profile* profile, |
| 26 const std::vector<const BookmarkNode*>& nodes, | 28 const std::vector<const BookmarkNode*>& nodes, |
| 27 gfx::NativeView view, | 29 gfx::NativeView view, |
| 28 ui::DragDropTypes::DragEventSource source) { | 30 ui::DragDropTypes::DragEventSource source) { |
| 29 DCHECK(!nodes.empty()); | 31 DCHECK(!nodes.empty()); |
| 30 | 32 |
| 31 // Set up our OLE machinery. | 33 // Set up our OLE machinery. |
| 32 ui::OSExchangeData data; | 34 ui::OSExchangeData data; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 if (drop_parent->HasAncestor(node)) | 153 if (drop_parent->HasAncestor(node)) |
| 152 return false; | 154 return false; |
| 153 } | 155 } |
| 154 return true; | 156 return true; |
| 155 } | 157 } |
| 156 // From another profile, always accept. | 158 // From another profile, always accept. |
| 157 return true; | 159 return true; |
| 158 } | 160 } |
| 159 | 161 |
| 160 } // namespace chrome | 162 } // namespace chrome |
| OLD | NEW |