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

Unified Diff: ash/shelf/shelf_view.h

Issue 772963002: Make the second click on the app shelf icon close the window-list bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename the variable and add some comments. Created 6 years 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 | ash/shelf/shelf_view.cc » ('j') | ash/shelf/shelf_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | ash/shelf/shelf_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698