Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5008)

Unified Diff: chrome/browser/bookmarks/bookmark_utils.cc

Issue 6250014: Move more dnd related files to ui/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/bookmarks/bookmark_utils.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_utils.cc (revision 71798)
+++ chrome/browser/bookmarks/bookmark_utils.cc (working copy)
@@ -6,7 +6,6 @@
#include <utility>
-#include "app/drag_drop_types.h"
#include "app/l10n_util.h"
#include "base/basictypes.h"
#include "base/file_path.h"
@@ -34,8 +33,9 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
+#include "ui/base/dragdrop/drag_drop_types.h"
+#include "ui/base/models/tree_node_iterator.h"
#include "views/event.h"
-#include "ui/base/models/tree_node_iterator.h"
#if defined(TOOLKIT_VIEWS)
#include "ui/base/dragdrop/os_exchange_data.h"
@@ -210,21 +210,21 @@
int common_ops = (source_operations & operations);
if (!common_ops)
return 0;
- if (DragDropTypes::DRAG_COPY & common_ops)
- return DragDropTypes::DRAG_COPY;
- if (DragDropTypes::DRAG_LINK & common_ops)
- return DragDropTypes::DRAG_LINK;
- if (DragDropTypes::DRAG_MOVE & common_ops)
- return DragDropTypes::DRAG_MOVE;
- return DragDropTypes::DRAG_NONE;
+ if (ui::DragDropTypes::DRAG_COPY & common_ops)
+ return ui::DragDropTypes::DRAG_COPY;
+ if (ui::DragDropTypes::DRAG_LINK & common_ops)
+ return ui::DragDropTypes::DRAG_LINK;
+ if (ui::DragDropTypes::DRAG_MOVE & common_ops)
+ return ui::DragDropTypes::DRAG_MOVE;
+ return ui::DragDropTypes::DRAG_NONE;
}
int BookmarkDragOperation(const BookmarkNode* node) {
if (node->is_url()) {
- return DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE |
- DragDropTypes::DRAG_LINK;
+ return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE |
+ ui::DragDropTypes::DRAG_LINK;
}
- return DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE;
+ return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE;
}
int BookmarkDropOperation(Profile* profile,
@@ -234,18 +234,18 @@
int index) {
if (data.IsFromProfile(profile) && data.size() > 1)
// Currently only accept one dragged node at a time.
- return DragDropTypes::DRAG_NONE;
+ return ui::DragDropTypes::DRAG_NONE;
if (!bookmark_utils::IsValidDropLocation(profile, data, parent, index))
- return DragDropTypes::DRAG_NONE;
+ return ui::DragDropTypes::DRAG_NONE;
if (data.GetFirstNode(profile)) {
// User is dragging from this profile: move.
- return DragDropTypes::DRAG_MOVE;
+ return ui::DragDropTypes::DRAG_MOVE;
}
// User is dragging from another app, copy.
return PreferredDropOperation(event.GetSourceOperations(),
- DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK);
+ ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK);
}
int PerformBookmarkDrop(Profile* profile,
@@ -262,13 +262,13 @@
model->Move(dragged_nodes[i], parent_node, index);
index = parent_node->IndexOfChild(dragged_nodes[i]) + 1;
}
- return DragDropTypes::DRAG_MOVE;
+ return ui::DragDropTypes::DRAG_MOVE;
}
- return DragDropTypes::DRAG_NONE;
+ return ui::DragDropTypes::DRAG_NONE;
}
// Dropping a group from different profile. Always accept.
bookmark_utils::CloneBookmarkNode(model, data.elements, parent_node, index);
- return DragDropTypes::DRAG_COPY;
+ return ui::DragDropTypes::DRAG_COPY;
}
bool IsValidDropLocation(Profile* profile,
@@ -337,8 +337,8 @@
MessageLoop::current()->SetNestableTasksAllowed(true);
root_view->StartDragForViewFromMouseEvent(NULL, data,
- DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE |
- DragDropTypes::DRAG_LINK);
+ ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE |
+ ui::DragDropTypes::DRAG_LINK);
MessageLoop::current()->SetNestableTasksAllowed(was_nested);
#elif defined(OS_MACOSX)
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | chrome/browser/chromeos/dom_ui/imageburner_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698