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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.h

Issue 6995058: Minor cleanup in bookmarkbarview. Converts a function that took a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve comment and merge Created 9 years, 6 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 | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
index 8b53d2ea81e0808a674537d96b6cbc8939545a81..0e7473afd43fecf09b7a7009bbd0db4655e6def0 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
@@ -253,10 +253,18 @@ class BookmarkBarView : public DetachableToolbarView,
private:
class ButtonSeparatorView;
struct DropInfo;
+ struct DropLocation;
friend class BookmarkBarViewEventTestBase;
FRIEND_TEST_ALL_PREFIXES(BookmarkBarViewTest, SwitchProfile);
+ // Used to identify what the user is dropping onto.
+ enum DropButtonType {
+ DROP_BOOKMARK,
+ DROP_OTHER_FOLDER,
+ DROP_OVERFLOW
+ };
+
// Creates recent bookmark button and when visible button as well as
// calculating the preferred height.
void Init();
@@ -319,14 +327,10 @@ class BookmarkBarView : public DetachableToolbarView,
// Stars the timer used to show a drop menu for node.
void StartShowFolderDropMenuTimer(const BookmarkNode* node);
- // Returns the drop operation and index for the drop based on the event
- // and data. Returns ui::DragDropTypes::DRAG_NONE if not a valid location.
- int CalculateDropOperation(const views::DropTargetEvent& event,
+ // Calculates the location for the drop in |location|.
+ void CalculateDropLocation(const views::DropTargetEvent& event,
const BookmarkNodeData& data,
- int* index,
- bool* drop_on,
- bool* is_over_overflow,
- bool* is_over_other);
+ DropLocation* location);
// Writes a BookmarkNodeData for node to data.
void WriteBookmarkDragData(const BookmarkNode* node,
« no previous file with comments | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698