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

Issue 2434573004: Close app list widget when users click outside of the widget (Closed)

Created:
4 years, 2 months ago by thanhph
Modified:
4 years, 2 months ago
Reviewers:
msw, sadrul, mfomitchev
CC:
chromium-reviews, kalyank, Matt Giuca, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mash: Close app list widget when users click outside of the widget Use PointerWatcherEventRouter/ui::PointerEvent to detect when a user clicks outside the visible app-list widget, and close it. Make sure the app list is dismissed if the presenter is destroyed while it is visible. BUG=611447 Committed: https://crrev.com/e1490a565be9fb332dd94b7f65518ea36c8251bf Cr-Commit-Position: refs/heads/master@{#426909}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Check if view_ is not null before using it #

Total comments: 1

Patch Set 3 : Move pointer watcher for the app-list widget to functions OnShown and OnDismissed from constructor/… #

Patch Set 4 : Remove pointer watcher in the destructor in case OnDismissed doesn't get called when delegate gets … #

Total comments: 12

Patch Set 5 : Adding a blank line back. #

Patch Set 6 : Call AppListPresenterImpl::Dismiss() in AppListPresenterImpl::~AppListPresenterImpl() to ensure de… #

Total comments: 6

Patch Set 7 : Remove class name on Dismiss. #

Patch Set 8 : Combine 2 if statements and add DCHECK(!is_visible_) before its use. #

Total comments: 2

Patch Set 9 : Make Dismiss override final #

Total comments: 2

Patch Set 10 : Use presenter_->GetTargetVisibility() to check visibility of the app-list widget instead of the var… #

Total comments: 2

Patch Set 11 : Add comments in destructor for clarification. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -17 lines) Patch
M chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -7 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +30 lines, -8 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_service_ash.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/presenter/app_list_presenter_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/presenter/app_list_presenter_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 70 (25 generated)
thanhph
4 years, 2 months ago (2016-10-19 20:49:02 UTC) #2
mfomitchev
LGTM
4 years, 2 months ago (2016-10-19 20:52:25 UTC) #3
thanhph
msw@chromium.org: Please review changes in
4 years, 2 months ago (2016-10-19 20:54:24 UTC) #5
msw
https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (left): https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#oldcode35 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:35: nit: leave this blank line here; it matches the ...
4 years, 2 months ago (2016-10-19 21:18:46 UTC) #6
thanhph
https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode44 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:44: views::WindowManagerConnection::Get() On 2016/10/19 21:18:46, msw wrote: > The presenter ...
4 years, 2 months ago (2016-10-19 22:21:45 UTC) #7
msw
https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode44 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:44: views::WindowManagerConnection::Get() On 2016/10/19 22:21:45, thanhph wrote: > On 2016/10/19 ...
4 years, 2 months ago (2016-10-19 22:43:38 UTC) #8
msw
https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode44 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:44: views::WindowManagerConnection::Get() On 2016/10/19 22:43:38, msw wrote: > On 2016/10/19 ...
4 years, 2 months ago (2016-10-19 22:45:12 UTC) #9
thanhph
https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode44 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:44: views::WindowManagerConnection::Get() On 2016/10/19 22:45:12, msw wrote: > On 2016/10/19 ...
4 years, 2 months ago (2016-10-20 14:19:28 UTC) #10
msw
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode38 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:38: } // namespace 2x repeated nit: restore the blank ...
4 years, 2 months ago (2016-10-20 17:32:15 UTC) #11
mfomitchev
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:46: if (is_visible_) { Drive-by: What if we destroy AppListPresenterImpl ...
4 years, 2 months ago (2016-10-20 17:55:24 UTC) #12
msw
It would be nice if this wasn't a mus/mash-specific change. ShelfTooltipManager is a decent example ...
4 years, 2 months ago (2016-10-20 18:09:03 UTC) #13
thanhph
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode38 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:38: } // namespace On 2016/10/20 17:32:15, msw wrote: > ...
4 years, 2 months ago (2016-10-20 18:16:48 UTC) #14
mfomitchev
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:46: if (is_visible_) { On 2016/10/20 18:09:03, msw wrote: > ...
4 years, 2 months ago (2016-10-20 18:23:07 UTC) #15
msw
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:46: if (is_visible_) { On 2016/10/20 18:23:07, mfomitchev wrote: > ...
4 years, 2 months ago (2016-10-20 18:46:53 UTC) #16
mfomitchev
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:46: if (is_visible_) { On 2016/10/20 18:46:53, msw wrote: > ...
4 years, 2 months ago (2016-10-20 19:29:36 UTC) #17
msw
https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:46: if (is_visible_) { On 2016/10/20 19:29:35, mfomitchev wrote: > ...
4 years, 2 months ago (2016-10-20 19:34:50 UTC) #18
thanhph
On 2016/10/20 19:34:50, msw wrote: > https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc > File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): > > https://chromiumcodereview.appspot.com/2434573004/diff/60001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 > ...
4 years, 2 months ago (2016-10-20 19:38:14 UTC) #19
mfomitchev
https://chromiumcodereview.appspot.com/2434573004/diff/100001/ui/app_list/presenter/app_list_presenter_impl.cc File ui/app_list/presenter/app_list_presenter_impl.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/100001/ui/app_list/presenter/app_list_presenter_impl.cc#newcode40 ui/app_list/presenter/app_list_presenter_impl.cc:40: AppListPresenterImpl::Dismiss(); remove "AppListPresenterImpl::"
4 years, 2 months ago (2016-10-20 19:52:24 UTC) #23
thanhph
On 2016/10/20 19:52:24, mfomitchev wrote: > https://chromiumcodereview.appspot.com/2434573004/diff/100001/ui/app_list/presenter/app_list_presenter_impl.cc > File ui/app_list/presenter/app_list_presenter_impl.cc (right): > > https://chromiumcodereview.appspot.com/2434573004/diff/100001/ui/app_list/presenter/app_list_presenter_impl.cc#newcode40 > ...
4 years, 2 months ago (2016-10-20 19:56:28 UTC) #24
thanhph
https://chromiumcodereview.appspot.com/2434573004/diff/100001/ui/app_list/presenter/app_list_presenter_impl.cc File ui/app_list/presenter/app_list_presenter_impl.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/100001/ui/app_list/presenter/app_list_presenter_impl.cc#newcode40 ui/app_list/presenter/app_list_presenter_impl.cc:40: AppListPresenterImpl::Dismiss(); On 2016/10/20 19:52:23, mfomitchev wrote: > remove "AppListPresenterImpl::" ...
4 years, 2 months ago (2016-10-20 19:58:07 UTC) #25
msw
Mostly lg with nits; I'll stamp after you address/reply to my comments and the last ...
4 years, 2 months ago (2016-10-20 20:03:52 UTC) #26
thanhph
https://chromiumcodereview.appspot.com/2434573004/diff/100001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://chromiumcodereview.appspot.com/2434573004/diff/100001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode84 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:84: is_visible_ = true; On 2016/10/20 20:03:52, msw wrote: > ...
4 years, 2 months ago (2016-10-20 20:16:32 UTC) #27
msw
lgtm
4 years, 2 months ago (2016-10-20 21:57:46 UTC) #28
thanhph
sadrul@chromium.org: Please review changes in app_list_presenter_impl.cc
4 years, 2 months ago (2016-10-21 14:43:34 UTC) #32
sadrul
https://codereview.chromium.org/2434573004/diff/140001/ui/app_list/presenter/app_list_presenter_impl.cc File ui/app_list/presenter/app_list_presenter_impl.cc (right): https://codereview.chromium.org/2434573004/diff/140001/ui/app_list/presenter/app_list_presenter_impl.cc#newcode40 ui/app_list/presenter/app_list_presenter_impl.cc:40: Dismiss(); Looks like this is a virtual function, and ...
4 years, 2 months ago (2016-10-21 15:12:48 UTC) #33
thanhph
https://codereview.chromium.org/2434573004/diff/140001/ui/app_list/presenter/app_list_presenter_impl.cc File ui/app_list/presenter/app_list_presenter_impl.cc (right): https://codereview.chromium.org/2434573004/diff/140001/ui/app_list/presenter/app_list_presenter_impl.cc#newcode40 ui/app_list/presenter/app_list_presenter_impl.cc:40: Dismiss(); On 2016/10/21 15:12:48, sadrul wrote: > Looks like ...
4 years, 2 months ago (2016-10-21 16:09:40 UTC) #36
sadrul
Please update the CL description to mention the changes, and that this is a fix ...
4 years, 2 months ago (2016-10-21 17:12:29 UTC) #37
mfomitchev
https://codereview.chromium.org/2434573004/diff/160001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h (right): https://codereview.chromium.org/2434573004/diff/160001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h#newcode48 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h:48: bool is_visible_ = false; On 2016/10/21 17:12:28, sadrul wrote: ...
4 years, 2 months ago (2016-10-21 17:14:19 UTC) #38
thanhph
On 2016/10/21 17:12:29, sadrul wrote: > Please update the CL description to mention the changes, ...
4 years, 2 months ago (2016-10-21 17:55:21 UTC) #42
thanhph
On 2016/10/21 17:55:21, thanhph wrote: > On 2016/10/21 17:12:29, sadrul wrote: > > Please update ...
4 years, 2 months ago (2016-10-21 17:56:11 UTC) #43
sadrul
On 2016/10/21 17:55:21, thanhph wrote: > On 2016/10/21 17:12:29, sadrul wrote: > > Please update ...
4 years, 2 months ago (2016-10-21 17:59:21 UTC) #44
thanhph
On 2016/10/21 17:59:21, sadrul wrote: > On 2016/10/21 17:55:21, thanhph wrote: > > On 2016/10/21 ...
4 years, 2 months ago (2016-10-21 18:08:56 UTC) #46
thanhph
On 2016/10/21 17:14:19, mfomitchev wrote: > https://codereview.chromium.org/2434573004/diff/160001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h > File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h (right): > > https://codereview.chromium.org/2434573004/diff/160001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h#newcode48 > ...
4 years, 2 months ago (2016-10-21 18:54:39 UTC) #47
mfomitchev
On 2016/10/21 18:54:39, thanhph wrote: > On 2016/10/21 17:14:19, mfomitchev wrote: > > > https://codereview.chromium.org/2434573004/diff/160001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h ...
4 years, 2 months ago (2016-10-21 20:21:54 UTC) #50
thanhph
On 2016/10/21 20:21:54, mfomitchev wrote: > On 2016/10/21 18:54:39, thanhph wrote: > > On 2016/10/21 ...
4 years, 2 months ago (2016-10-21 20:23:17 UTC) #51
mfomitchev
> I use existing presenter_->GetTargetVisibility() instead of > presenter_->IsVisible() and it works. Not sure why ...
4 years, 2 months ago (2016-10-21 20:41:30 UTC) #52
mfomitchev
> I use existing presenter_->GetTargetVisibility() instead of > presenter_->IsVisible() and it works. Not sure why ...
4 years, 2 months ago (2016-10-21 20:41:33 UTC) #53
thanhph
On 2016/10/21 20:41:33, mfomitchev wrote: > > I use existing presenter_->GetTargetVisibility() instead of > > ...
4 years, 2 months ago (2016-10-21 20:50:52 UTC) #54
thanhph
https://codereview.chromium.org/2434573004/diff/180001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc (right): https://codereview.chromium.org/2434573004/diff/180001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode47 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:47: DCHECK(!presenter_->GetTargetVisibility()); On 2016/10/21 20:41:29, mfomitchev wrote: > Nit: Maybe ...
4 years, 2 months ago (2016-10-21 20:51:09 UTC) #55
mfomitchev
On 2016/10/21 20:50:52, thanhph wrote: > On 2016/10/21 20:41:33, mfomitchev wrote: > > > I ...
4 years, 2 months ago (2016-10-21 20:57:57 UTC) #58
thanhph
On 2016/10/21 20:57:57, mfomitchev wrote: > On 2016/10/21 20:50:52, thanhph wrote: > > On 2016/10/21 ...
4 years, 2 months ago (2016-10-21 21:32:57 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2434573004/200001
4 years, 2 months ago (2016-10-21 21:46:11 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2434573004/200001
4 years, 2 months ago (2016-10-21 21:47:23 UTC) #66
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 2 months ago (2016-10-21 22:09:57 UTC) #68
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 22:18:33 UTC) #70
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/e1490a565be9fb332dd94b7f65518ea36c8251bf
Cr-Commit-Position: refs/heads/master@{#426909}

Powered by Google App Engine
This is Rietveld 408576698