summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_bar_view.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-04 19:29:08 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-04 19:29:08 +0000
commitf28cbb7246977eb443650f7d2fc9675b573317b2 (patch)
treedda1262734dd45010df771821e869b687b9d1b6a /chrome/browser/views/bookmark_bar_view.cc
parent431c16ea953a80b9153ba9a8c0b17b07a96f4a24 (diff)
downloadchromium_src-f28cbb7246977eb443650f7d2fc9675b573317b2.zip
chromium_src-f28cbb7246977eb443650f7d2fc9675b573317b2.tar.gz
chromium_src-f28cbb7246977eb443650f7d2fc9675b573317b2.tar.bz2
Adds support for autoscrolling on drag to bookmark tree/table.
BUG=674 TEST=none Review URL: http://codereview.chromium.org/9042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.cc')
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 4e2f09f..3e514ba 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -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 BookmarkBarView::CalculateDropOperation(const DropTargetEvent& event,
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 @@ int BookmarkBarView::CalculateDropOperation(const DropTargetEvent& event,
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 @@ int BookmarkBarView::CalculateDropOperation(const DropTargetEvent& event,
} 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);
}
}