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

Issue 557693002: [Ash] Only snap windows that can maximize. (Closed)

Created:
6 years, 3 months ago by jackhou1
Modified:
6 years, 3 months ago
CC:
chromium-reviews, kalyank, sadrul, ben+ash_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Ash] Only snap windows that can maximize. Previously, windows that have only one of maxWidth or maxHeight defined could not be maximized by the user, but they would still snap when dragged to the edge of the screen. This changes WindowState::CanSnap to use CanMaximize which is false when there is a maxWidth or maxHeight, or when the window is not resizable. BUG=412610, 408737 Committed: https://crrev.com/578fb750af5d9a810f671eba83a3cc4c14a7792a Cr-Commit-Position: refs/heads/master@{#295657}

Patch Set 1 #

Patch Set 2 : Update tests. #

Total comments: 6

Patch Set 3 : Address comments #

Total comments: 4

Patch Set 4 : Address comments. #

Patch Set 5 : Sync and rebase #

Patch Set 6 : Fix up other tests. #

Total comments: 2

Patch Set 7 : Change ash_test_base.cc #

Total comments: 5

Patch Set 8 : Sync and rebase #

Patch Set 9 : Return true if there is no delegate. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -8 lines) Patch
M ash/wm/window_state.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -5 lines 0 comments Download
M ash/wm/window_state_unittest.cc View 1 2 3 2 chunks +9 lines, -3 lines 0 comments Download
M ash/wm/workspace/workspace_window_resizer_unittest.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (3 generated)
jackhou1
oshima, could you please review this?
6 years, 3 months ago (2014-09-09 08:09:44 UTC) #2
oshima
can you update the bug #?
6 years, 3 months ago (2014-09-09 18:30:26 UTC) #3
jackhou1
On 2014/09/09 18:30:26, oshima wrote: > can you update the bug #? Done. I couldn't ...
6 years, 3 months ago (2014-09-10 00:21:22 UTC) #4
oshima
thanks. change lg. can you add test for this scenario? (I guess there is already ...
6 years, 3 months ago (2014-09-10 01:18:14 UTC) #5
jackhou1
https://codereview.chromium.org/557693002/diff/20001/ash/wm/workspace/workspace_window_resizer_unittest.cc File ash/wm/workspace/workspace_window_resizer_unittest.cc (right): https://codereview.chromium.org/557693002/diff/20001/ash/wm/workspace/workspace_window_resizer_unittest.cc#newcode1419 ash/wm/workspace/workspace_window_resizer_unittest.cc:1419: window_->SetProperty(aura::client::kCanMaximizeKey, true); This test fails at line 1444. I'm ...
6 years, 3 months ago (2014-09-10 01:48:48 UTC) #6
oshima
https://codereview.chromium.org/557693002/diff/20001/ash/wm/window_state.cc File ash/wm/window_state.cc (right): https://codereview.chromium.org/557693002/diff/20001/ash/wm/window_state.cc#newcode144 ash/wm/window_state.cc:144: return window_->GetProperty(aura::client::kCanMaximizeKey); can you add GetMaximizedSize check here? I ...
6 years, 3 months ago (2014-09-10 15:59:32 UTC) #7
jackhou1
https://codereview.chromium.org/557693002/diff/20001/ash/wm/window_state.cc File ash/wm/window_state.cc (right): https://codereview.chromium.org/557693002/diff/20001/ash/wm/window_state.cc#newcode144 ash/wm/window_state.cc:144: return window_->GetProperty(aura::client::kCanMaximizeKey); On 2014/09/10 15:59:31, oshima wrote: > can ...
6 years, 3 months ago (2014-09-11 00:16:55 UTC) #8
oshima
https://codereview.chromium.org/557693002/diff/40001/ash/wm/window_state.cc File ash/wm/window_state.cc (right): https://codereview.chromium.org/557693002/diff/40001/ash/wm/window_state.cc#newcode150 ash/wm/window_state.cc:150: return window_->GetProperty(aura::client::kCanMaximizeKey); This should be window->GetProperty(aura::client::kCanMaximizeKey) && (delegate && ...
6 years, 3 months ago (2014-09-11 01:00:05 UTC) #9
jackhou1
https://codereview.chromium.org/557693002/diff/40001/ash/wm/window_state.cc File ash/wm/window_state.cc (right): https://codereview.chromium.org/557693002/diff/40001/ash/wm/window_state.cc#newcode150 ash/wm/window_state.cc:150: return window_->GetProperty(aura::client::kCanMaximizeKey); On 2014/09/11 01:00:05, oshima wrote: > This ...
6 years, 3 months ago (2014-09-11 01:52:43 UTC) #10
oshima
lgtm
6 years, 3 months ago (2014-09-11 02:08:38 UTC) #11
jackhou1
While updating the affected tests, I realised it might be better to change ash_test_base.cc instead ...
6 years, 3 months ago (2014-09-11 07:57:07 UTC) #12
oshima
+skuhne for maximized_mode_window_manager_unittest.cc change. path set 6 doesn't seem to have a ash_test_base change. https://codereview.chromium.org/557693002/diff/100001/ash/display/display_controller_unittest.cc ...
6 years, 3 months ago (2014-09-11 17:25:49 UTC) #14
jackhou1
> path set 6 doesn't seem to have a ash_test_base change. Sorry I meant Patch ...
6 years, 3 months ago (2014-09-11 18:02:18 UTC) #15
Mr4D (OOO till 08-26)
Please see comments. https://codereview.chromium.org/557693002/diff/120001/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc File ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc (left): https://codereview.chromium.org/557693002/diff/120001/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc#oldcode123 ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc:123: delegate = aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(); There are two ...
6 years, 3 months ago (2014-09-11 20:24:17 UTC) #16
oshima
I'll take a look at the new patch a bit later today. https://codereview.chromium.org/557693002/diff/120001/ash/wm/window_state.cc File ash/wm/window_state.cc ...
6 years, 3 months ago (2014-09-11 20:32:14 UTC) #17
jackhou1
Ping.
6 years, 3 months ago (2014-09-16 05:13:18 UTC) #18
oshima
i'm ok with ash_test_base change. Please address skuhe@'s comment.
6 years, 3 months ago (2014-09-16 18:36:59 UTC) #19
jackhou1
PTAL I realised that the original CanSnap returns true if there is no delegate, so ...
6 years, 3 months ago (2014-09-18 02:54:59 UTC) #20
Mr4D (OOO till 08-26)
lgtm
6 years, 3 months ago (2014-09-18 23:30:39 UTC) #21
oshima
lgtm
6 years, 3 months ago (2014-09-19 03:14:48 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/557693002/160001
6 years, 3 months ago (2014-09-19 03:29:56 UTC) #24
commit-bot: I haz the power
Committed patchset #9 (id:160001) as 774c88289397d100b9fc3557becef7f96896c2b9
6 years, 3 months ago (2014-09-19 03:56:52 UTC) #25
commit-bot: I haz the power
6 years, 3 months ago (2014-09-19 03:57:25 UTC) #26
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/578fb750af5d9a810f671eba83a3cc4c14a7792a
Cr-Commit-Position: refs/heads/master@{#295657}

Powered by Google App Engine
This is Rietveld 408576698