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

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.h

Issue 399173004: Adjust BrowserActionsContainer drag and drop to work for overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 5 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/toolbar/browser_actions_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/browser_actions_container.h
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.h b/chrome/browser/ui/views/toolbar/browser_actions_container.h
index 51a03ef087d0004cf9a7da4227eae1574f677fa9..2a014614b87ea862c11e7cc0b5aa910dfc323b1f 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.h
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.h
@@ -291,6 +291,9 @@ class BrowserActionsContainer
friend class BrowserActionView; // So it can access IconWidth().
friend class ShowFolderMenuTask;
+ // A struct representing the position at which an action will be dropped.
+ struct DropPosition;
+
typedef std::vector<BrowserActionView*> BrowserActionViews;
// Returns the width of an icon, optionally with its padding.
@@ -328,10 +331,6 @@ class BrowserActionsContainer
// Show the overflow menu.
void ShowDropFolder();
- // Sets the drop indicator position (and schedules paint if the position has
- // changed).
- void SetDropIndicator(int x_pos);
-
// Given a number of |icons| and whether to |display_chevron|, returns the
// amount of pixels needed to draw the entire container. For convenience,
// callers can set |icons| to -1 to mean "all icons".
@@ -367,6 +366,9 @@ class BrowserActionsContainer
ExtensionPopup::ShowAction show_action,
bool grant_tab_permissions);
+ // Return the index of the first visible icon.
+ size_t GetFirstVisibleIconIndex() const;
+
// Whether this container is in overflow mode (as opposed to in 'main'
// mode). See class comments for details on the difference.
bool in_overflow_mode() const { return main_container_ != NULL; }
@@ -431,8 +433,9 @@ class BrowserActionsContainer
// are done animating.
int animation_target_size_;
- // The x position for where to draw the drop indicator. -1 if no indicator.
- int drop_indicator_position_;
+ // The DropPosition for the current drag-and-drop operation, or NULL if there
+ // is none.
+ scoped_ptr<DropPosition> drop_position_;
// The class that registers for keyboard shortcuts for extension commands.
scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698