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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 9042: Adds support for autoscrolling on drag to bookmark tree/table.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/views/bookmark_bar_view.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view.cc (revision 4555)
+++ chrome/browser/views/bookmark_bar_view.cc (working copy)
@@ -44,6 +44,7 @@
#include "chrome/views/container.h"
#include "chrome/views/menu_button.h"
#include "chrome/views/tooltip_manager.h"
+#include "chrome/views/view_constants.h"
#include "chrome/views/window.h"
#include "generated_resources.h"
@@ -1669,7 +1670,9 @@
int ops = data.GetFirstNode(profile_)
? DragDropTypes::DRAG_MOVE
: DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK;
- return bookmark_utils::PreferredDropOperation(event, ops);
+ return
+ bookmark_utils::PreferredDropOperation(event.GetSourceOperations(),
+ ops);
}
for (int i = 0; i < GetBookmarkButtonCount() &&
@@ -1681,9 +1684,9 @@
found = true;
BookmarkNode* node = model_->GetBookmarkBarNode()->GetChild(i);
if (node->GetType() != history::StarredEntry::URL) {
- if (button_x <= MenuItemView::kDropBetweenPixels) {
+ if (button_x <= views::kDropBetweenPixels) {
*index = i;
- } else if (button_x < button_w - MenuItemView::kDropBetweenPixels) {
+ } else if (button_x < button_w - views::kDropBetweenPixels) {
*index = i;
*drop_on = true;
} else {
@@ -1759,7 +1762,8 @@
} else {
// User is dragging from another app, copy.
return bookmark_utils::PreferredDropOperation(
- event, DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK);
+ event.GetSourceOperations(),
+ DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK);
}
}

Powered by Google App Engine
This is Rietveld 408576698