Chromium Code Reviews| Index: ash/shelf/shelf_view.h |
| diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h |
| index 7aac1deb419093682c696464d7071cecf58eb44a..29ffdc6791f1ff946e8e7981ba3c1cc0dcf74292 100644 |
| --- a/ash/shelf/shelf_view.h |
| +++ b/ash/shelf/shelf_view.h |
| @@ -304,9 +304,10 @@ class ASH_EXPORT ShelfView : public views::View, |
| void OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) override; |
| void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override; |
| - // Returns false if the click which closed the previous menu is the click |
| - // which triggered this event. |
| - bool IsUsableEvent(const ui::Event& event); |
| + // Returns true if the (press down) |event| is a repost event from an event |
| + // which just closed the menu of a shelf item. If it occurs on the same shelf |
| + // item, we should ignore the call. |
| + bool IsRepostEvent(const ui::Event& event); |
| // Convenience accessor to model_->items(). |
| const ShelfItem* ShelfItemForView(const views::View* view) const; |
| @@ -435,6 +436,15 @@ class ASH_EXPORT ShelfView : public views::View, |
| // True when ripped item from overflow bubble is entered into Shelf. |
| bool dragged_off_from_overflow_to_shelf_; |
| + // True if the event is a repost event from a event which has just closed the |
| + // menu of a shelf item. |
| + bool is_repost_event_; |
| + |
| + // Record the index for the last pressed shelf item. This variable is used to |
| + // check if a repost event occurs on the same shelf item as previous one. If |
| + // so, the repost event should be ignored. |
| + int last_index_at_repost_; |
|
Mr4D (OOO till 08-26)
2014/12/05 20:57:13
Sorry for this, but with the porposed changes belo
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| }; |