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

Issue 2503623002: Support creation of toplevel mus::Windows on separate displays (Closed)

Created:
4 years, 1 month ago by thanhph
Modified:
4 years ago
Reviewers:
mfomitchev, sky
CC:
chromium-reviews, kalyank, sadrul, kylechar
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support creation of toplevel mus::Windows on separate displays . Mus window should be shown in a correct display. . Add unit test. BUG=614070 Committed: https://crrev.com/1e73070ad937c592052cf5dac97e88b686dbc598 Cr-Commit-Position: refs/heads/master@{#434324}

Patch Set 1 #

Patch Set 2 : Initalize container id property in wm_test_base. #

Patch Set 3 : Fix include orders. #

Patch Set 4 : Fix container root lookup. Don't need to initialize container id for unit test. #

Total comments: 2

Patch Set 5 : remove log. #

Patch Set 6 : Add logs to debug #

Patch Set 7 : Update patch to correct screen bounds, instead of using target root for selecting display. #

Patch Set 8 : Clean up/format code. #

Total comments: 6

Patch Set 9 : Convert display point to screen point in root_window_controller.cc instead. Format cleanup. #

Patch Set 10 : Remove logs. #

Patch Set 11 : Clean up/reformat code. Remove pointer. #

Patch Set 12 : Add const to reference. #

Patch Set 13 : Add blank line back. #

Total comments: 18

Patch Set 14 : Remove unnecessary subclass. Remove reference pointer to screen bounds. Add unit test to existing w… #

Patch Set 15 : Add blank line back. #

Patch Set 16 : Add blank line back. Remove duplicate function. #

Total comments: 2

Patch Set 17 : Remove GetPrimary/SecondaryRootWindowController methods. #

Total comments: 15

Patch Set 18 : Change display_id default value to kInvalidDisplayID. Rename unit test. Cleanup/format code. #

Total comments: 4

Patch Set 19 : Edit comments/names. #

Total comments: 3

Patch Set 20 : Don't use mus kInitialDisplayId_Property if the display id is negative. #

Total comments: 2

Patch Set 21 : Allow display_id be negative. #

Patch Set 22 : Rebase and change constant kInvalidDisplayId namespace. #

Total comments: 7

Patch Set 23 : Cleanup/Format code/name. #

Patch Set 24 : Keep default value for display_id in .h file instead of .cc. #

Patch Set 25 : remove default display_id value in .cc #

Total comments: 7

Patch Set 26 : Move unit test to root_window_controller_unittest.cc and remove changes in window_manager_unittest.… #

Patch Set 27 : Reduce code size to convert rect from window to screen coordinate. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -5 lines) Patch
M ash/mus/root_window_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +4 lines, -2 lines 1 comment Download
M ash/mus/root_window_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +22 lines, -0 lines 2 comments Download
M ash/mus/test/wm_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +6 lines, -1 line 0 comments Download
M ash/mus/test/wm_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 143 (103 generated)
mfomitchev
https://codereview.chromium.org/2503623002/diff/60001/ash/common/wm/container_finder.cc File ash/common/wm/container_finder.cc (right): https://codereview.chromium.org/2503623002/diff/60001/ash/common/wm/container_finder.cc#newcode79 ash/common/wm/container_finder.cc:79: target_root = context->GetRootWindow(); This makes sense to me, but ...
4 years, 1 month ago (2016-11-15 20:29:34 UTC) #4
thanhph
https://codereview.chromium.org/2503623002/diff/60001/ash/common/wm/container_finder.cc File ash/common/wm/container_finder.cc (right): https://codereview.chromium.org/2503623002/diff/60001/ash/common/wm/container_finder.cc#newcode79 ash/common/wm/container_finder.cc:79: target_root = context->GetRootWindow(); On 2016/11/15 20:29:34, mfomitchev wrote: > ...
4 years, 1 month ago (2016-11-15 21:09:55 UTC) #7
thanhph
sky@chromium.org: Please review changes in Hi Scott, I see your name in the suggested owner. ...
4 years, 1 month ago (2016-11-17 16:36:34 UTC) #11
mfomitchev
https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h File ash/mus/bridge/wm_root_window_controller_mus.h (right): https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h#newcode43 ash/mus/bridge/wm_root_window_controller_mus.h:43: gfx::Rect* ConvertWindowToScreen(const WmWindowMus* source, Doesn't seem like there's any ...
4 years, 1 month ago (2016-11-17 17:14:01 UTC) #12
mfomitchev
On 2016/11/17 17:14:01, mfomitchev wrote: > https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h > File ash/mus/bridge/wm_root_window_controller_mus.h (right): > > https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h#newcode43 > ...
4 years, 1 month ago (2016-11-17 17:15:32 UTC) #13
thanhph
https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h File ash/mus/bridge/wm_root_window_controller_mus.h (right): https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h#newcode43 ash/mus/bridge/wm_root_window_controller_mus.h:43: gfx::Rect* ConvertWindowToScreen(const WmWindowMus* source, On 2016/11/17 17:14:01, mfomitchev wrote: ...
4 years, 1 month ago (2016-11-17 19:08:30 UTC) #15
thanhph
On 2016/11/17 19:08:30, thanhph wrote: > https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h > File ash/mus/bridge/wm_root_window_controller_mus.h (right): > > https://codereview.chromium.org/2503623002/diff/100002/ash/mus/bridge/wm_root_window_controller_mus.h#newcode43 > ...
4 years, 1 month ago (2016-11-17 19:19:24 UTC) #19
mfomitchev
Also: Please update the CL description to reflect the title change and capitalize the first ...
4 years, 1 month ago (2016-11-18 17:36:24 UTC) #39
thanhph
https://codereview.chromium.org/2503623002/diff/230001/ash/mus/BUILD.gn File ash/mus/BUILD.gn (right): https://codereview.chromium.org/2503623002/diff/230001/ash/mus/BUILD.gn#newcode248 ash/mus/BUILD.gn:248: "window_manager_ash_unittest.cc", On 2016/11/18 17:36:24, mfomitchev wrote: > Why not ...
4 years, 1 month ago (2016-11-18 19:15:44 UTC) #40
mfomitchev
https://codereview.chromium.org/2503623002/diff/290001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/290001/ash/mus/test/wm_test_base.cc#newcode150 ash/mus/test/wm_test_base.cc:150: window = root->window_manager()->NewTopLevelWindow(&properties); I think window manager is the ...
4 years, 1 month ago (2016-11-18 20:35:58 UTC) #43
thanhph
https://codereview.chromium.org/2503623002/diff/290001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/290001/ash/mus/test/wm_test_base.cc#newcode150 ash/mus/test/wm_test_base.cc:150: window = root->window_manager()->NewTopLevelWindow(&properties); On 2016/11/18 20:35:58, mfomitchev wrote: > ...
4 years, 1 month ago (2016-11-18 20:53:08 UTC) #44
mfomitchev
Repeat: Please update the CL description to reflect the title change and capitalize the first ...
4 years, 1 month ago (2016-11-18 21:23:40 UTC) #45
thanhph
https://codereview.chromium.org/2503623002/diff/310001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/310001/ash/mus/test/wm_test_base.cc#newcode132 ash/mus/test/wm_test_base.cc:132: if (display_id) On 2016/11/18 21:23:40, mfomitchev wrote: > Need ...
4 years, 1 month ago (2016-11-21 14:37:53 UTC) #47
mfomitchev
CL description should contain the CL title as it's first line. (Look at all the ...
4 years, 1 month ago (2016-11-22 22:53:17 UTC) #52
thanhph
I define default display_id in the header file wm_test_base.h as below so calling the function ...
4 years, 1 month ago (2016-11-22 23:18:02 UTC) #55
kylechar
https://codereview.chromium.org/2503623002/diff/350001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/350001/ash/mus/test/wm_test_base.cc#newcode132 ash/mus/test/wm_test_base.cc:132: mojo::ConvertTo<std::vector<uint8_t>>(display_id); For the default value kInvalidDisplayId, do you really ...
4 years, 1 month ago (2016-11-23 00:28:00 UTC) #60
thanhph
https://codereview.chromium.org/2503623002/diff/350001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/350001/ash/mus/test/wm_test_base.cc#newcode132 ash/mus/test/wm_test_base.cc:132: mojo::ConvertTo<std::vector<uint8_t>>(display_id); On 2016/11/23 00:28:00, kylechar wrote: > For the ...
4 years, 1 month ago (2016-11-23 01:05:03 UTC) #61
kylechar
https://codereview.chromium.org/2503623002/diff/350001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/350001/ash/mus/test/wm_test_base.cc#newcode132 ash/mus/test/wm_test_base.cc:132: mojo::ConvertTo<std::vector<uint8_t>>(display_id); On 2016/11/23 01:05:02, thanhph wrote: > On 2016/11/23 ...
4 years ago (2016-11-23 14:14:20 UTC) #70
thanhph
Thanks for the clarification Kyle, maybe that's why the bots were unhappy. https://codereview.chromium.org/2503623002/diff/370001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc ...
4 years ago (2016-11-23 14:26:20 UTC) #73
mfomitchev
Also: Add a blank line between the title and the body in the description. I.e. ...
4 years ago (2016-11-23 17:58:00 UTC) #79
thanhph
https://codereview.chromium.org/2503623002/diff/410001/ash/mus/test/wm_test_base.cc File ash/mus/test/wm_test_base.cc (right): https://codereview.chromium.org/2503623002/diff/410001/ash/mus/test/wm_test_base.cc#newcode125 ash/mus/test/wm_test_base.cc:125: ui::Window* WmTestBase::CreateFullscreenTestWindow(int64_t display_id) { On 2016/11/23 17:57:59, mfomitchev wrote: ...
4 years ago (2016-11-23 18:42:19 UTC) #80
mfomitchev
Repeat: Add a blank line between the title and the body in the description. I.e. ...
4 years ago (2016-11-23 19:05:15 UTC) #83
thanhph
On 2016/11/23 19:05:15, mfomitchev wrote: > Repeat: > Add a blank line between the title ...
4 years ago (2016-11-23 19:09:41 UTC) #85
mfomitchev
LGTM
4 years ago (2016-11-23 19:20:19 UTC) #88
sky
https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc File ash/mus/root_window_controller.cc (right): https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc#newcode105 ash/mus/root_window_controller.cc:105: const gfx::Point top_right_in_screen = wm_window has a GetBoundsInScreen. Can't ...
4 years ago (2016-11-23 20:48:19 UTC) #97
thanhph
https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc File ash/mus/root_window_controller.cc (right): https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc#newcode105 ash/mus/root_window_controller.cc:105: const gfx::Point top_right_in_screen = On 2016/11/23 20:48:19, sky wrote: ...
4 years ago (2016-11-23 21:31:42 UTC) #98
sky
https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc File ash/mus/root_window_controller.cc (right): https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc#newcode105 ash/mus/root_window_controller.cc:105: const gfx::Point top_right_in_screen = On 2016/11/23 21:31:42, thanhph wrote: ...
4 years ago (2016-11-23 21:45:36 UTC) #99
mfomitchev
https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc File ash/mus/root_window_controller.cc (right): https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc#newcode105 ash/mus/root_window_controller.cc:105: const gfx::Point top_right_in_screen = On 2016/11/23 21:45:36, sky wrote: ...
4 years ago (2016-11-23 22:00:33 UTC) #100
thanhph
https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc File ash/mus/root_window_controller.cc (right): https://codereview.chromium.org/2503623002/diff/470001/ash/mus/root_window_controller.cc#newcode105 ash/mus/root_window_controller.cc:105: const gfx::Point top_right_in_screen = On 2016/11/23 21:45:36, sky wrote: ...
4 years ago (2016-11-23 22:25:55 UTC) #101
mfomitchev
https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_controller.cc File ash/mus/root_window_controller.cc (right): https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_controller.cc#newcode107 ash/mus/root_window_controller.cc:107: gfx::Rect bounds_in_screen(origin, window->bounds().size()); What if one of the window's ...
4 years ago (2016-11-23 23:02:13 UTC) #104
sky
On 2016/11/23 23:02:13, mfomitchev wrote: > https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_controller.cc > File ash/mus/root_window_controller.cc (right): > > https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_controller.cc#newcode107 > ...
4 years ago (2016-11-23 23:07:28 UTC) #105
sky
LGTM
4 years ago (2016-11-23 23:07:55 UTC) #106
mfomitchev
On 2016/11/23 23:07:28, sky wrote: > On 2016/11/23 23:02:13, mfomitchev wrote: > > > https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_controller.cc ...
4 years ago (2016-11-23 23:12:05 UTC) #108
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/2503623002/510001
4 years ago (2016-11-24 04:50:53 UTC) #129
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years ago (2016-11-24 06:52:16 UTC) #131
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/2503623002/510001
4 years ago (2016-11-24 14:50:16 UTC) #136
commit-bot: I haz the power
Committed patchset #27 (id:510001)
4 years ago (2016-11-24 15:17:37 UTC) #139
commit-bot: I haz the power
Patchset 27 (id:??) landed as https://crrev.com/1e73070ad937c592052cf5dac97e88b686dbc598 Cr-Commit-Position: refs/heads/master@{#434324}
4 years ago (2016-11-24 15:20:03 UTC) #141
sky
I'm in the process of converting ash/mus to use aura and had to update this ...
4 years ago (2016-11-29 17:43:13 UTC) #142
thanhph
4 years ago (2016-11-29 18:13:11 UTC) #143
Message was sent while issue was closed.
On 2016/11/29 17:43:13, sky wrote:
> I'm in the process of converting ash/mus to use aura and had to update this
> test. I noticed a couple of things. Don't change these as I'm going to change
it
> shortly. I just wanted to mention it for future tests you write.
> 
>
https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_co...
> File ash/mus/root_window_controller_unittest.cc (right):
> 
>
https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_co...
> ash/mus/root_window_controller_unittest.cc:38: DCHECK(window_primary_display);
> For tests prefer ASSERT over DCHECK. The reason is in a test you want other
> tests to be run if one fails. A DCHECK will cause a crash and no other tests
to
> run.
> 
>
https://codereview.chromium.org/2503623002/diff/510001/ash/mus/root_window_co...
> ash/mus/root_window_controller_unittest.cc:41:
> EXPECT_EQ(window_primary_display->display_id(), GetPrimaryDisplay().id());
> In chrome code we use the format of expected, actual. So, the args here should
> be reversed.

Great, thanks Scott!

Powered by Google App Engine
This is Rietveld 408576698