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

Unified Diff: chrome/views/view_win.cc

Issue 46066: Disallows dragging from the bookmark bar when the bookmark bar is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/view_win.cc
===================================================================
--- chrome/views/view_win.cc (revision 11663)
+++ chrome/views/view_win.cc (working copy)
@@ -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 @@
}
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() {
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698