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

Issue 2364173002: Add app_list_presenterr pointer in app_list_presenter_delegate_mus to use dismiss function (Closed)

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

Description

Duplicated Issue: 2434573004 Add app_list_presenterr pointer in app_list_presenter_delegate_mus to use dismiss function Add mouse/touch capture function. Exploring how to close single widget. BUG=611447

Patch Set 1 #

Total comments: 10

Patch Set 2 : clean up the code add app_list_presenter_delegate_mus destructor back to clean up mouse/touch monit… #

Patch Set 3 : clicking out of the app list widget will now close the widget #

Total comments: 34

Patch Set 4 : remove duplicated includes enhance code format enhance widget comparison #

Total comments: 6

Patch Set 5 : use forward declarations when possible add comments synchronize variable initialization order in co… #

Total comments: 13

Patch Set 6 : Move AddPointerWatcher object to constructor to ensure object existance for destructor. Fix format … #

Total comments: 9

Patch Set 7 : Reduce overhead by adding/removing delegate in OnDismissed and OnShown, flip variable is_visible ac… #

Total comments: 16

Patch Set 8 : revert delegate on OnShown and OnDismissed functions. conform function orders. #

Total comments: 2

Patch Set 9 : Add DCHECK back to ensure correct behaviour. #

Patch Set 10 : Attemps to create unittest for chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc. #

Total comments: 8

Patch Set 11 : Attempt to retrieve app_list::AppListPresenterImpl app_list_presenter_. Uncommenting line 89 breaks… #

Patch Set 12 : Comment out EnsureCommandLineSwitch(ui::switches::kUseTestConfig); #

Patch Set 13 : try to initialize WindowManagerConnection #

Patch Set 14 : FREEZE.unindexed #

Patch Set 15 : remove illegal include #

Total comments: 6

Patch Set 16 : remove unnecessary includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+459 lines, -26 lines) Patch
M chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h View 1 2 3 4 5 6 7 2 chunks +16 lines, -5 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 4 chunks +26 lines, -4 lines 0 comments Download
A chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +242 lines, -0 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
A + chrome/browser/ui/ash/app_list/test_unittests_manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/ui/ash/app_list/test_window_manager_connection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +101 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +45 lines, -1 line 0 comments Download
A + chrome/test/run_all_unittests_chrome.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/unittests_manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/views_chrome_test_suite.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -4 lines 0 comments Download
A + chrome/test/views_chrome_test_suite.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -5 lines 0 comments Download
M ui/views/mus/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
mfomitchev
https://codereview.chromium.org/2364173002/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://codereview.chromium.org/2364173002/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode14 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:14: #include "ash/common/shelf/wm_shelf.h" We shouldn't depend on any of the ...
4 years, 3 months ago (2016-09-23 19:47:15 UTC) #2
thanhph
On 2016/09/23 19:47:15, mfomitchev wrote: > https://codereview.chromium.org/2364173002/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://codereview.chromium.org/2364173002/diff/1/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode14 > ...
4 years, 3 months ago (2016-09-23 19:53:35 UTC) #3
thanhph
this patch allows closing the app list widget when users click outside of the widget. ...
4 years, 2 months ago (2016-09-29 18:12:08 UTC) #5
mfomitchev
https://codereview.chromium.org/2364173002/diff/40001/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/2364173002/diff/40001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode11 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:11: #include "ui/views/pointer_watcher.h" We already include this in .h https://codereview.chromium.org/2364173002/diff/40001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode42 ...
4 years, 2 months ago (2016-09-29 18:38:26 UTC) #6
thanhph
https://codereview.chromium.org/2364173002/diff/40001/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/2364173002/diff/40001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode11 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:11: #include "ui/views/pointer_watcher.h" On 2016/09/29 18:38:25, mfomitchev wrote: > We ...
4 years, 2 months ago (2016-09-29 19:43:05 UTC) #7
mfomitchev
https://codereview.chromium.org/2364173002/diff/40001/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/2364173002/diff/40001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode42 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:42: : view_delegate_factory_(view_delegate_factory), presenter_(presenter) {} On 2016/09/29 19:43:04, thanhph wrote: ...
4 years, 2 months ago (2016-09-29 20:00:36 UTC) #8
thanhph
https://codereview.chromium.org/2364173002/diff/40001/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/2364173002/diff/40001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode42 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:42: : view_delegate_factory_(view_delegate_factory), presenter_(presenter) {} On 2016/09/29 20:00:35, mfomitchev wrote: ...
4 years, 2 months ago (2016-09-29 20:42:51 UTC) #9
mfomitchev
https://codereview.chromium.org/2364173002/diff/80001/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/2364173002/diff/80001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode6 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:6: #include "ui/app_list/presenter/app_list_presenter.h" insert blank line See https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes https://codereview.chromium.org/2364173002/diff/80001/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: ...
4 years, 2 months ago (2016-09-29 21:21:22 UTC) #10
thanhph
https://codereview.chromium.org/2364173002/diff/80001/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/2364173002/diff/80001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode6 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:6: #include "ui/app_list/presenter/app_list_presenter.h" On 2016/09/29 21:21:22, mfomitchev wrote: > insert ...
4 years, 2 months ago (2016-09-29 23:08:00 UTC) #11
mfomitchev
Thanks! This is getting pretty close. https://codereview.chromium.org/2364173002/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 (left): https://codereview.chromium.org/2364173002/diff/100001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#oldcode81 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:81: DCHECK(is_visible_); Just noticed ...
4 years, 2 months ago (2016-09-30 16:36:14 UTC) #12
thanhph
https://codereview.chromium.org/2364173002/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://codereview.chromium.org/2364173002/diff/100001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode51 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:51: views::WindowManagerConnection::Get() On 2016/09/30 16:36:14, mfomitchev wrote: > Sorry.. this ...
4 years, 2 months ago (2016-09-30 17:49:23 UTC) #13
mfomitchev
https://codereview.chromium.org/2364173002/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://codereview.chromium.org/2364173002/diff/100001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode51 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:51: views::WindowManagerConnection::Get() On 2016/09/30 17:49:23, thanhph wrote: > On 2016/09/30 ...
4 years, 2 months ago (2016-09-30 18:25:46 UTC) #14
mfomitchev
https://codereview.chromium.org/2364173002/diff/120001/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/2364173002/diff/120001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode45 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:45: if (!is_visible_) { This will always be true https://codereview.chromium.org/2364173002/diff/120001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode46 ...
4 years, 2 months ago (2016-09-30 18:41:20 UTC) #15
thanhph
https://codereview.chromium.org/2364173002/diff/120001/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/2364173002/diff/120001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#newcode45 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:45: if (!is_visible_) { On 2016/09/30 18:41:19, mfomitchev wrote: > ...
4 years, 2 months ago (2016-09-30 19:03:52 UTC) #16
mfomitchev
https://codereview.chromium.org/2364173002/diff/140001/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://codereview.chromium.org/2364173002/diff/140001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#oldcode81 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:81: DCHECK(is_visible_); Keep the DCHECK
4 years, 2 months ago (2016-09-30 19:05:25 UTC) #17
thanhph
https://codereview.chromium.org/2364173002/diff/140001/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://codereview.chromium.org/2364173002/diff/140001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc#oldcode81 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc:81: DCHECK(is_visible_); On 2016/09/30 19:05:25, mfomitchev wrote: > Keep the ...
4 years, 2 months ago (2016-09-30 19:09:09 UTC) #18
mfomitchev
https://codereview.chromium.org/2364173002/diff/180001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc (right): https://codereview.chromium.org/2364173002/diff/180001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc#newcode37 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc:37: class AppListViewDelegateFactoryImpl I'd move this next to AppListTestViewDelegate and ...
4 years, 2 months ago (2016-10-11 15:49:13 UTC) #20
mfomitchev
https://codereview.chromium.org/2364173002/diff/280001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc (right): https://codereview.chromium.org/2364173002/diff/280001/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc#newcode240 chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc:240: ASSERT_TRUE(WindowManagerConnection::Exists()); Can you put a LOG before this so ...
4 years, 2 months ago (2016-10-18 23:50:42 UTC) #21
thanhph
4 years, 2 months ago (2016-10-19 00:02:06 UTC) #22
https://codereview.chromium.org/2364173002/diff/280001/chrome/browser/ui/ash/...
File chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc
(right):

https://codereview.chromium.org/2364173002/diff/280001/chrome/browser/ui/ash/...
chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus_unittest.cc:240:
ASSERT_TRUE(WindowManagerConnection::Exists());
On 2016/10/18 23:50:42, mfomitchev wrote:
> Can you put a LOG before this so that we can tell if it is actually executing
> this code?

I just did. Binary unit_tests ran through this line.

https://codereview.chromium.org/2364173002/diff/280001/chrome/test/views_chro...
File chrome/test/views_chrome_test_suite.cc (right):

https://codereview.chromium.org/2364173002/diff/280001/chrome/test/views_chro...
chrome/test/views_chrome_test_suite.cc:62: return
base::MakeUnique<PlatformTestHelperMus>(callback.Run(), identity);
On 2016/10/18 23:50:42, mfomitchev wrote:
> Can you add a LOG here so that we can tell if this gets executed?

I just did. Binary unit_tests ran through this line.

https://codereview.chromium.org/2364173002/diff/280001/chrome/test/views_chro...
File chrome/test/views_chrome_test_suite.h (right):

https://codereview.chromium.org/2364173002/diff/280001/chrome/test/views_chro...
chrome/test/views_chrome_test_suite.h:17: class ViewsChromeTestSuite : public
ViewsTestSuite {
On 2016/10/18 23:50:42, mfomitchev wrote:
> This is not really the right way because we already have a test suite for
chrome
> unit tests. If we want to use a new one for AppListPresenterDelegateMusTest,
we
> need to create a new build target.

We can create new build target if this looks all right. We need to work on a
non-confusing name also.

Powered by Google App Engine
This is Rietveld 408576698