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

Issue 11085053: Improving window auto management between workspaces (Closed)

Created:
8 years, 2 months ago by Mr4D (OOO till 08-26)
Modified:
8 years, 1 month ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Re-vamped the entire window auto positioning logic As long as the user did not move / resize the window: A single visible window (browser / app) on the screen will always be centered. When a second visible (browser / app) window joins in, both will be pushed into opposite corners. When more windows get piled up, they go every time into the opposite side of the currently active window. When the user has resized / moved a window, it will be treated as a visible (browser / app) window, but it will not get moved - the others will however. Addressing bug: Moving last remaining tabbed window back into screen center BUG=153431, 150879, 153302 TEST=unit-tests & visual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164352 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164652 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164993

Patch Set 1 #

Patch Set 2 : Improved the entire window (auto) management #

Total comments: 44

Patch Set 3 : Addressed #

Patch Set 4 : Changed change algorithm from on access to upfront changes & added unit tests #

Patch Set 5 : Merged #

Patch Set 6 : Addressed build problem on windows #

Patch Set 7 : Adding session save and restore for user positioned/sized windows #

Patch Set 8 : Fixed unit test build breakage #

Patch Set 9 : Mac build stopper and sky changes as requested #

Patch Set 10 : gtk/clang build failure fixed #

Patch Set 11 : Removed as requested. Corner cases will have to be addressed as they show #

Total comments: 47

Patch Set 12 : Addressed #

Total comments: 19

Patch Set 13 : Addressed #

Patch Set 14 : #

Total comments: 15

Patch Set 15 : Lots of changes after requirements have changed #

Patch Set 16 : Addressed #

Patch Set 17 : Many self nits #

Patch Set 18 : git try #

Total comments: 27

Patch Set 19 : ' #

Patch Set 20 : No auto movement for tab dragging #

Total comments: 4

Patch Set 21 : Addressed #

Patch Set 22 : Merged changes from other CL and added unit tests #

Patch Set 23 : Fixed merge problems with trunk #

Total comments: 4

Patch Set 24 : #

Patch Set 25 : Build Breakage #

Patch Set 26 : #

Patch Set 27 : Merge #

Patch Set 28 : Removed a part of the change which slipped in through a branch switch and eclipse usage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+683 lines, -44 lines) Patch
M ash/ash.gyp 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 +2 lines, -0 lines 0 comments Download
M ash/ash_switches.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 24 25 26 1 chunk +1 line, -0 lines 0 comments Download
M ash/ash_switches.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, -0 lines 0 comments Download
M ash/wm/property_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -2 lines 0 comments Download
M ash/wm/property_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/window_properties.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +10 lines, -0 lines 0 comments Download
M ash/wm/window_properties.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M ash/wm/window_util.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 24 25 26 2 chunks +19 lines, -6 lines 0 comments Download
M ash/wm/window_util.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 4 chunks +24 lines, -5 lines 0 comments Download
A ash/wm/workspace/auto_window_management.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +20 lines, -0 lines 0 comments Download
A ash/wm/workspace/auto_window_management.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +178 lines, -0 lines 0 comments Download
M ash/wm/workspace/workspace_layout_manager2_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 2 chunks +2 lines, -5 lines 0 comments Download
M ash/wm/workspace/workspace_manager2.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +14 lines, -3 lines 0 comments Download
M ash/wm/workspace/workspace_manager2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +285 lines, -0 lines 0 comments Download
ash/wm/workspace/workspace_window_resizer.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 +1 line, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.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 +7 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +20 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 8 chunks +34 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.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 5 chunks +29 lines, -0 lines 0 comments Download
M chrome/browser/ui/window_sizer/window_sizer_ash.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -13 lines 0 comments Download
M chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 44 (0 generated)
Mr4D (OOO till 08-26)
Please have a look!
8 years, 2 months ago (2012-10-10 21:14:29 UTC) #1
Mr4D (OOO till 08-26)
Scott - as discussed I have re-written the entire handling. Using only the activation state ...
8 years, 2 months ago (2012-10-11 19:20:43 UTC) #2
sky
http://codereview.chromium.org/11085053/diff/3001/ash/wm/window_util.h File ash/wm/window_util.h (right): http://codereview.chromium.org/11085053/diff/3001/ash/wm/window_util.h#newcode84 ash/wm/window_util.h:84: ASH_EXPORT bool IsWindowPositionManageable(const aura::Window* window); Managed (same with 87). ...
8 years, 2 months ago (2012-10-11 19:50:54 UTC) #3
Mr4D (OOO till 08-26)
Addressed (mostly). Unit tests are still to come. http://codereview.chromium.org/11085053/diff/3001/ash/wm/window_util.h File ash/wm/window_util.h (right): http://codereview.chromium.org/11085053/diff/3001/ash/wm/window_util.h#newcode84 ash/wm/window_util.h:84: ASH_EXPORT ...
8 years, 2 months ago (2012-10-12 00:29:17 UTC) #4
sky
http://codereview.chromium.org/11085053/diff/3001/ash/wm/workspace/workspace_manager2.cc File ash/wm/workspace/workspace_manager2.cc (right): http://codereview.chromium.org/11085053/diff/3001/ash/wm/workspace/workspace_manager2.cc#newcode58 ash/wm/workspace/workspace_manager2.cc:58: return (!wm::IsWindowMaximized(window) && On 2012/10/12 00:29:18, Mr4D wrote: > ...
8 years, 2 months ago (2012-10-12 14:27:04 UTC) #5
Mr4D (OOO till 08-26)
Please have another look! http://codereview.chromium.org/11085053/diff/3001/ash/wm/workspace/workspace_manager2.cc File ash/wm/workspace/workspace_manager2.cc (right): http://codereview.chromium.org/11085053/diff/3001/ash/wm/workspace/workspace_manager2.cc#newcode58 ash/wm/workspace/workspace_manager2.cc:58: return (!wm::IsWindowMaximized(window) && Because when ...
8 years, 2 months ago (2012-10-12 23:21:30 UTC) #6
Mr4D (OOO till 08-26)
Please have another look
8 years, 2 months ago (2012-10-16 15:58:20 UTC) #7
sky
In hopes of getting this landed could you remove the browser and session restore changes ...
8 years, 2 months ago (2012-10-16 17:25:34 UTC) #8
Mr4D (OOO till 08-26)
Addressed. Please have another look http://codereview.chromium.org/11085053/diff/39001/ash/ash.gyp File ash/ash.gyp (right): http://codereview.chromium.org/11085053/diff/39001/ash/ash.gyp#newcode375 ash/ash.gyp:375: 'wm/workspace/auto_window_management.h', On 2012/10/16 17:25:34, ...
8 years, 2 months ago (2012-10-16 19:00:28 UTC) #9
sky
http://codereview.chromium.org/11085053/diff/39001/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/39001/ash/wm/workspace/auto_window_management.cc#newcode149 ash/wm/workspace/auto_window_management.cc:149: ui::LayerAnimator* animator = shown_window->layer()->GetAnimator(); On 2012/10/16 19:00:28, Mr4D wrote: ...
8 years, 2 months ago (2012-10-16 22:01:14 UTC) #10
sky
http://codereview.chromium.org/11085053/diff/45003/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/45003/ash/wm/workspace/auto_window_management.cc#newcode129 ash/wm/workspace/auto_window_management.cc:129: // Find a single open managed window. This code ...
8 years, 2 months ago (2012-10-17 15:59:38 UTC) #11
Mr4D (OOO till 08-26)
Addressed http://codereview.chromium.org/11085053/diff/39001/ash/wm/workspace/workspace_manager2.cc File ash/wm/workspace/workspace_manager2.cc (right): http://codereview.chromium.org/11085053/diff/39001/ash/wm/workspace/workspace_manager2.cc#newcode620 ash/wm/workspace/workspace_manager2.cc:620: Done. The auto management code takes all associated ...
8 years, 2 months ago (2012-10-17 18:43:56 UTC) #12
sky
http://codereview.chromium.org/11085053/diff/45003/ash/wm/workspace/workspace_manager2.cc File ash/wm/workspace/workspace_manager2.cc (right): http://codereview.chromium.org/11085053/diff/45003/ash/wm/workspace/workspace_manager2.cc#newcode621 ash/wm/workspace/workspace_manager2.cc:621: if (child->IsVisible()) On 2012/10/17 18:43:56, Mr4D wrote: > I ...
8 years, 2 months ago (2012-10-18 16:11:18 UTC) #13
sky
I'm focusing on just the ash workspace changes. I think you're nearly there for that ...
8 years, 2 months ago (2012-10-18 16:36:10 UTC) #14
sky
http://codereview.chromium.org/11085053/diff/47009/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/47009/ash/wm/workspace/auto_window_management.cc#newcode115 ash/wm/workspace/auto_window_management.cc:115: if (!other_shown_window->GetProperty( On 2012/10/18 16:36:10, sky wrote: > Simplify ...
8 years, 2 months ago (2012-10-18 23:47:14 UTC) #15
Mr4D (OOO till 08-26)
Not fully done yet. Your last comment needs still to be addressed, but you can ...
8 years, 2 months ago (2012-10-19 20:46:03 UTC) #16
sky
http://codereview.chromium.org/11085053/diff/47009/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/47009/ash/wm/workspace/auto_window_management.cc#newcode29 ash/wm/workspace/auto_window_management.cc:29: return (!window->bounds().IsEmpty() && wm::IsWindowPositionManaged(window)); On 2012/10/19 20:46:05, Mr4D wrote: ...
8 years, 2 months ago (2012-10-19 22:00:32 UTC) #17
Mr4D (OOO till 08-26)
Addressed and done. Please have another look! The remaining task (restore to previous user position ...
8 years, 2 months ago (2012-10-19 22:54:41 UTC) #18
sky
http://codereview.chromium.org/11085053/diff/61001/ash/wm/default_window_resizer.cc File ash/wm/default_window_resizer.cc (right): http://codereview.chromium.org/11085053/diff/61001/ash/wm/default_window_resizer.cc#newcode45 ash/wm/default_window_resizer.cc:45: wm::SetUserHasChangedWindowPositionOrSize(details_.window, true); I don't think you need this since ...
8 years, 2 months ago (2012-10-22 16:40:50 UTC) #19
Mr4D (OOO till 08-26)
Have another look! http://codereview.chromium.org/11085053/diff/61001/ash/wm/default_window_resizer.cc File ash/wm/default_window_resizer.cc (right): http://codereview.chromium.org/11085053/diff/61001/ash/wm/default_window_resizer.cc#newcode45 ash/wm/default_window_resizer.cc:45: wm::SetUserHasChangedWindowPositionOrSize(details_.window, true); On 2012/10/22 16:40:50, sky ...
8 years, 2 months ago (2012-10-22 20:27:23 UTC) #20
sky
LGTM http://codereview.chromium.org/11085053/diff/61001/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/61001/ash/wm/workspace/auto_window_management.cc#newcode132 ash/wm/workspace/auto_window_management.cc:132: settings->SetTransitionDuration( On 2012/10/22 20:27:23, Mr4D wrote: > You ...
8 years, 2 months ago (2012-10-22 21:26:21 UTC) #21
Mr4D (OOO till 08-26)
I added now the tab dragging special (no auto movement for any window which is ...
8 years, 2 months ago (2012-10-23 17:50:02 UTC) #22
sky
http://codereview.chromium.org/11085053/diff/60012/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/60012/ash/wm/workspace/auto_window_management.cc#newcode150 ash/wm/workspace/auto_window_management.cc:150: CommandLine::ForCurrentProcess()->HasSwitch( Instead of sprinkling checks for the switch have ...
8 years, 2 months ago (2012-10-23 19:35:39 UTC) #23
Mr4D (OOO till 08-26)
Addressed http://codereview.chromium.org/11085053/diff/60012/ash/wm/workspace/auto_window_management.cc File ash/wm/workspace/auto_window_management.cc (right): http://codereview.chromium.org/11085053/diff/60012/ash/wm/workspace/auto_window_management.cc#newcode150 ash/wm/workspace/auto_window_management.cc:150: CommandLine::ForCurrentProcess()->HasSwitch( I had exactly that at the beginning: ...
8 years, 2 months ago (2012-10-24 16:41:37 UTC) #24
sky
This misses a couple of cases: . Create a window, call it A, then another ...
8 years, 2 months ago (2012-10-24 22:03:12 UTC) #25
Mr4D (OOO till 08-26)
I merged (most of the) changes from your other sent CL. I also added the ...
8 years, 1 month ago (2012-10-25 17:52:15 UTC) #26
sky
LGTM http://codereview.chromium.org/11085053/diff/79005/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc File chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc (right): http://codereview.chromium.org/11085053/diff/79005/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc#newcode447 chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc:447: ASSERT_TRUE(ash::wm::IsWindowPositionManaged( In general you only use ASSERT for ...
8 years, 1 month ago (2012-10-25 19:40:36 UTC) #27
Mr4D (OOO till 08-26)
Done. Submitting. Thanks! http://codereview.chromium.org/11085053/diff/79005/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc File chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc (right): http://codereview.chromium.org/11085053/diff/79005/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc#newcode447 chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc:447: ASSERT_TRUE(ash::wm::IsWindowPositionManaged( On 2012/10/25 19:40:36, sky wrote: ...
8 years, 1 month ago (2012-10-25 20:44:05 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/79008
8 years, 1 month ago (2012-10-25 20:46:42 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/75013
8 years, 1 month ago (2012-10-25 21:43:47 UTC) #30
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-10-25 23:04:24 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/75013
8 years, 1 month ago (2012-10-25 23:32:36 UTC) #32
commit-bot: I haz the power
Commit queue had an internal error. Something went really wrong, probably a crash, a hickup ...
8 years, 1 month ago (2012-10-26 14:55:01 UTC) #33
commit-bot: I haz the power
Commit queue had an internal error. Something went really wrong, probably a crash, a hickup ...
8 years, 1 month ago (2012-10-26 14:55:22 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/71008
8 years, 1 month ago (2012-10-26 16:24:47 UTC) #35
commit-bot: I haz the power
Retried try job too often for step(s) base_unittests, browser_tests, cacheinvalidation_unittests, check_deps, content_browsertests, content_unittests, crypto_unittests, gpu_unittests, ...
8 years, 1 month ago (2012-10-26 17:54:41 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/71008
8 years, 1 month ago (2012-10-26 18:22:50 UTC) #37
commit-bot: I haz the power
Change committed as 164352
8 years, 1 month ago (2012-10-26 18:29:34 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/71008
8 years, 1 month ago (2012-10-26 19:40:34 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/71008
8 years, 1 month ago (2012-10-27 12:20:55 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/71008
8 years, 1 month ago (2012-10-29 14:43:31 UTC) #41
commit-bot: I haz the power
Change committed as 164652
8 years, 1 month ago (2012-10-29 16:45:01 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/11085053/110001
8 years, 1 month ago (2012-10-30 18:30:32 UTC) #43
commit-bot: I haz the power
8 years, 1 month ago (2012-10-30 20:31:43 UTC) #44
Change committed as 164993

Powered by Google App Engine
This is Rietveld 408576698