summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 23:56:48 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 23:56:48 +0000
commit3d4ff9f575c787e3d4d837a983720bc725636ef4 (patch)
tree2983c74c18c38154cd253ca352f7f433c8fca8ec /chrome/views
parentef025165839be0bd42ce65e35ee8afa70315527d (diff)
downloadchromium_src-3d4ff9f575c787e3d4d837a983720bc725636ef4.zip
chromium_src-3d4ff9f575c787e3d4d837a983720bc725636ef4.tar.gz
chromium_src-3d4ff9f575c787e3d4d837a983720bc725636ef4.tar.bz2
Disallows dragging from the bookmark bar when the bookmark bar is
closed or animating. This fixes a case where clicking on a bookmark bar, then hitting control-b triggers a drag. BUG=8674 TEST=see bug Review URL: http://codereview.chromium.org/46066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/view_win.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/views/view_win.cc b/chrome/views/view_win.cc
index a69bf77..1e5da1d 100644
--- a/chrome/views/view_win.cc
+++ b/chrome/views/view_win.cc
@@ -6,6 +6,7 @@
#include "base/scoped_handle.h"
#include "base/string_util.h"
+#include "chrome/common/drag_drop_types.h"
#include "chrome/common/gfx/chrome_canvas.h"
#include "chrome/common/gfx/path.h"
#include "chrome/common/os_exchange_data.h"
@@ -29,14 +30,17 @@ FocusManager* View::GetFocusManager() {
}
void View::DoDrag(const MouseEvent& e, int press_x, int press_y) {
+ int drag_operations = GetDragOperations(press_x, press_y);
+ if (drag_operations == DragDropTypes::DRAG_NONE)
+ return;
+
scoped_refptr<OSExchangeData> data = new OSExchangeData;
WriteDragData(press_x, press_y, data.get());
// Message the RootView to do the drag and drop. That way if we're removed
// the RootView can detect it and avoid calling us back.
RootView* root_view = GetRootView();
- root_view->StartDragForViewFromMouseEvent(
- this, data, GetDragOperations(press_x, press_y));
+ root_view->StartDragForViewFromMouseEvent(this, data, drag_operations);
}
AccessibleWrapper* View::GetAccessibleWrapper() {