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

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/bookmarks/bookmark_utils.h" 5 #include "chrome/browser/bookmarks/bookmark_utils.h"
6 6
7 #include "chrome/browser/bookmarks/bookmark_drag_data.h" 7 #include "chrome/browser/bookmarks/bookmark_drag_data.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 IntToWString(descendant_count)); 139 IntToWString(descendant_count));
140 return MessageBox(parent, message.c_str(), 140 return MessageBox(parent, message.c_str(),
141 l10n_util::GetString(IDS_PRODUCT_NAME).c_str(), 141 l10n_util::GetString(IDS_PRODUCT_NAME).c_str(),
142 MB_YESNO | MB_ICONWARNING | MB_TOPMOST) == IDYES; 142 MB_YESNO | MB_ICONWARNING | MB_TOPMOST) == IDYES;
143 } 143 }
144 144
145 } // namespace 145 } // namespace
146 146
147 namespace bookmark_utils { 147 namespace bookmark_utils {
148 148
149 int PreferredDropOperation(const views::DropTargetEvent& event, 149 int PreferredDropOperation(int source_operations, int operations) {
150 int operation) { 150 int common_ops = (source_operations & operations);
151 int common_ops = (event.GetSourceOperations() & operation);
152 if (!common_ops) 151 if (!common_ops)
153 return 0; 152 return 0;
154 if (DragDropTypes::DRAG_COPY & common_ops) 153 if (DragDropTypes::DRAG_COPY & common_ops)
155 return DragDropTypes::DRAG_COPY; 154 return DragDropTypes::DRAG_COPY;
156 if (DragDropTypes::DRAG_LINK & common_ops) 155 if (DragDropTypes::DRAG_LINK & common_ops)
157 return DragDropTypes::DRAG_LINK; 156 return DragDropTypes::DRAG_LINK;
158 if (DragDropTypes::DRAG_MOVE & common_ops) 157 if (DragDropTypes::DRAG_MOVE & common_ops)
159 return DragDropTypes::DRAG_MOVE; 158 return DragDropTypes::DRAG_MOVE;
160 return DragDropTypes::DRAG_NONE; 159 return DragDropTypes::DRAG_NONE;
161 } 160 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 Profile* profile, 231 Profile* profile,
233 PageNavigator* navigator, 232 PageNavigator* navigator,
234 BookmarkNode* node, 233 BookmarkNode* node,
235 WindowOpenDisposition initial_disposition) { 234 WindowOpenDisposition initial_disposition) {
236 std::vector<BookmarkNode*> nodes; 235 std::vector<BookmarkNode*> nodes;
237 nodes.push_back(node); 236 nodes.push_back(node);
238 OpenAll(parent, profile, navigator, nodes, initial_disposition); 237 OpenAll(parent, profile, navigator, nodes, initial_disposition);
239 } 238 }
240 239
241 } // namespace bookmark_utils 240 } // namespace bookmark_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698