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

Issue 2108933003: Reorder browser list on workspace switch (Closed)

Created:
4 years, 5 months ago by Tom (Use chromium acct)
Modified:
4 years, 5 months ago
CC:
chromium-reviews, tfarina, yusukes+watch_chromium.org, derat+watch_chromium.org, danakj, girard
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Linux: Reorder browser list on workspace switch Opening a link from a 3rd party app picks the most recently used profile/browser to open the new tab in. Whenever a user changes workspaces, reorder the browser list such that the browsers in the current workspace are moved to the top of the list. This way, when a user opens a link, it will open in a browser on the current workspace (if there are any browsers). BUG=619673 Committed: https://crrev.com/edabf4d52846972d359457d563eb5e782bbf8a1d Cr-Commit-Position: refs/heads/master@{#404544}

Patch Set 1 #

Patch Set 2 : Revert unnecessary changes #

Patch Set 3 : Moved code from desktop_screen_x11 into x11_desktop_handler #

Patch Set 4 : Set a browser as last active on workspace change #

Total comments: 14

Patch Set 5 : Address comments from erg and thestig #

Total comments: 8

Patch Set 6 : Use LazyInstance. Add small API descriptions. #

Total comments: 10

Patch Set 7 : remove display::desktop #

Patch Set 8 : Add Desktop class and remove global OnWorkspaceChanged #

Total comments: 1

Patch Set 9 : Rebase & add desktop.* :P #

Total comments: 1

Patch Set 10 : Moved code into ChromeBrowserMainExtraPartsX11 #

Total comments: 11

Patch Set 11 : Reverted ui/display #

Total comments: 13

Patch Set 12 : Cache workspace, address comments #

Total comments: 1

Patch Set 13 : s/PartitionByWorkspace/MoveBrowsersInWorkspaceToFront #

Patch Set 14 : removed endl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -18 lines) Patch
M chrome/browser/ui/browser_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_list.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +30 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_frame.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -0 lines 0 comments Download
M ui/base/x/x11_util.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +21 lines, -8 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +16 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +34 lines, -7 lines 0 comments Download
A ui/views/widget/desktop_aura/x11_desktop_handler_observer.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (25 generated)
Tom (Use chromium acct)
4 years, 5 months ago (2016-06-29 17:10:04 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2108933003/40001
4 years, 5 months ago (2016-06-29 17:21:37 UTC) #6
Elliot Glaysher
https://codereview.chromium.org/2108933003/diff/60001/chrome/browser/ui/browser_list.cc File chrome/browser/ui/browser_list.cc (right): https://codereview.chromium.org/2108933003/diff/60001/chrome/browser/ui/browser_list.cc#newcode264 chrome/browser/ui/browser_list.cc:264: BrowserList::~BrowserList() { Do you need a matched RemoveObserver? https://codereview.chromium.org/2108933003/diff/60001/ui/display/desktop_observer.h ...
4 years, 5 months ago (2016-06-29 18:21:09 UTC) #7
Lei Zhang
https://codereview.chromium.org/2108933003/diff/60001/chrome/browser/ui/browser_list.cc File chrome/browser/ui/browser_list.cc (right): https://codereview.chromium.org/2108933003/diff/60001/chrome/browser/ui/browser_list.cc#newcode222 chrome/browser/ui/browser_list.cc:222: void BrowserList::OnWorkspaceChanged(const std::string& new_workspace) { Isn't BrowserList cross-platform? How ...
4 years, 5 months ago (2016-06-29 18:30:53 UTC) #10
Tom (Use chromium acct)
https://codereview.chromium.org/2108933003/diff/60001/chrome/browser/ui/browser_list.cc File chrome/browser/ui/browser_list.cc (right): https://codereview.chromium.org/2108933003/diff/60001/chrome/browser/ui/browser_list.cc#newcode222 chrome/browser/ui/browser_list.cc:222: void BrowserList::OnWorkspaceChanged(const std::string& new_workspace) { On 2016/06/29 18:30:53, Lei ...
4 years, 5 months ago (2016-06-29 20:16:05 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2108933003/80001
4 years, 5 months ago (2016-06-29 20:16:44 UTC) #13
Lei Zhang
lgtm https://codereview.chromium.org/2108933003/diff/80001/chrome/browser/ui/browser_list.h File chrome/browser/ui/browser_list.h (right): https://codereview.chromium.org/2108933003/diff/80001/chrome/browser/ui/browser_list.h#newcode29 chrome/browser/ui/browser_list.h:29: class BrowserList : private display::desktop::DesktopObserver { This stays ...
4 years, 5 months ago (2016-06-29 20:51:02 UTC) #14
Tom (Use chromium acct)
https://codereview.chromium.org/2108933003/diff/80001/chrome/browser/ui/browser_list.h File chrome/browser/ui/browser_list.h (right): https://codereview.chromium.org/2108933003/diff/80001/chrome/browser/ui/browser_list.h#newcode29 chrome/browser/ui/browser_list.h:29: class BrowserList : private display::desktop::DesktopObserver { On 2016/06/29 20:51:01, ...
4 years, 5 months ago (2016-06-29 21:12:50 UTC) #15
Elliot Glaysher
lgtm
4 years, 5 months ago (2016-06-29 21:39:52 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2108933003/100001
4 years, 5 months ago (2016-06-29 22:49:25 UTC) #18
sky
https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h File ui/display/desktop_observer.h (right): https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h#newcode14 ui/display/desktop_observer.h:14: namespace desktop { Don't use desktop here. See threads ...
4 years, 5 months ago (2016-06-29 22:55:58 UTC) #19
danakj
https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h File ui/display/desktop_observer.h (right): https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h#newcode14 ui/display/desktop_observer.h:14: namespace desktop { On 2016/06/29 22:55:58, sky wrote: > ...
4 years, 5 months ago (2016-06-29 22:56:51 UTC) #20
Tom (Use chromium acct)
https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h File ui/display/desktop_observer.h (right): https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h#newcode14 ui/display/desktop_observer.h:14: namespace desktop { On 2016/06/29 22:55:58, sky wrote: > ...
4 years, 5 months ago (2016-06-29 23:24:21 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/237046)
4 years, 5 months ago (2016-06-29 23:36:07 UTC) #23
sky
On Wed, Jun 29, 2016 at 3:56 PM, <danakj@chromium.org> wrote: > > https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h > File ...
4 years, 5 months ago (2016-06-30 00:21:07 UTC) #24
sky
https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h File ui/display/desktop_observer.h (right): https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h#newcode14 ui/display/desktop_observer.h:14: namespace desktop { On 2016/06/29 23:24:20, Tom Anderson wrote: ...
4 years, 5 months ago (2016-06-30 00:25:55 UTC) #25
Tom (Use chromium acct)
https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h File ui/display/desktop_observer.h (right): https://codereview.chromium.org/2108933003/diff/100001/ui/display/desktop_observer.h#newcode14 ui/display/desktop_observer.h:14: namespace desktop { On 2016/06/30 00:25:55, sky wrote: > ...
4 years, 5 months ago (2016-06-30 17:35:53 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2108933003/120001
4 years, 5 months ago (2016-06-30 17:36:38 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/237653)
4 years, 5 months ago (2016-06-30 18:46:22 UTC) #30
sky
I like DisplayObserver, but I'm also ok with introducing another class (maybe Desktop or Workspace) ...
4 years, 5 months ago (2016-06-30 21:05:04 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2108933003/160001
4 years, 5 months ago (2016-07-01 18:35:25 UTC) #34
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/30194) ios-device-gn on ...
4 years, 5 months ago (2016-07-01 18:37:31 UTC) #36
Tom (Use chromium acct)
On 2016/06/30 21:05:04, sky wrote: > I like DisplayObserver, but I'm also ok with introducing ...
4 years, 5 months ago (2016-07-01 18:37:31 UTC) #37
sky
https://codereview.chromium.org/2108933003/diff/160001/ui/display/BUILD.gn File ui/display/BUILD.gn (right): https://codereview.chromium.org/2108933003/diff/160001/ui/display/BUILD.gn#newcode36 ui/display/BUILD.gn:36: "desktop.cc", I think you forgot the git add desktop.*
4 years, 5 months ago (2016-07-01 19:43:39 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2108933003/180001
4 years, 5 months ago (2016-07-01 20:37:26 UTC) #40
Tom (Use chromium acct)
On 2016/07/01 19:43:39, sky wrote: > https://codereview.chromium.org/2108933003/diff/160001/ui/display/BUILD.gn > File ui/display/BUILD.gn (right): > > https://codereview.chromium.org/2108933003/diff/160001/ui/display/BUILD.gn#newcode36 > ...
4 years, 5 months ago (2016-07-01 20:37:49 UTC) #41
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-01 21:49:12 UTC) #43
sky
Another option that I think is less code, and more focused to what you have ...
4 years, 5 months ago (2016-07-01 22:18:33 UTC) #44
Tom (Use chromium acct)
Moved code into ChromeBrowserMainExtraPartsX11 https://codereview.chromium.org/2108933003/diff/200001/ui/display/desktop.h File ui/display/desktop.h (right): https://codereview.chromium.org/2108933003/diff/200001/ui/display/desktop.h#newcode19 ui/display/desktop.h:19: static Desktop* GetDesktop(); GetDesktop currently ...
4 years, 5 months ago (2016-07-06 18:19:11 UTC) #45
sky
https://codereview.chromium.org/2108933003/diff/200001/chrome/browser/chrome_browser_main_extra_parts_x11.h File chrome/browser/chrome_browser_main_extra_parts_x11.h (right): https://codereview.chromium.org/2108933003/diff/200001/chrome/browser/chrome_browser_main_extra_parts_x11.h#newcode15 chrome/browser/chrome_browser_main_extra_parts_x11.h:15: class ChromeBrowserMainExtraPartsX11 : public ChromeBrowserMainExtraParts, Sorry, I should have ...
4 years, 5 months ago (2016-07-06 20:33:05 UTC) #46
Tom (Use chromium acct)
Reverted ui/display This CL has gone through quite some evolution https://codereview.chromium.org/2108933003/diff/200001/chrome/browser/chrome_browser_main_extra_parts_x11.h File chrome/browser/chrome_browser_main_extra_parts_x11.h (right): https://codereview.chromium.org/2108933003/diff/200001/chrome/browser/chrome_browser_main_extra_parts_x11.h#newcode15 ...
4 years, 5 months ago (2016-07-06 22:29:16 UTC) #47
sky
https://codereview.chromium.org/2108933003/diff/200001/chrome/browser/ui/views/frame/browser_frame.cc File chrome/browser/ui/views/frame/browser_frame.cc (right): https://codereview.chromium.org/2108933003/diff/200001/chrome/browser/ui/views/frame/browser_frame.cc#newcode225 chrome/browser/ui/views/frame/browser_frame.cc:225: BrowserList::SetLastActive(browser); On 2016/07/06 22:29:16, Tom Anderson wrote: > On ...
4 years, 5 months ago (2016-07-07 03:23:28 UTC) #48
Tom (Use chromium acct)
+ Sadrul for export in ui/base/x/x11_util.h Also cache the workspace since it requires a round ...
4 years, 5 months ago (2016-07-07 19:12:10 UTC) #50
sky
LGTM https://codereview.chromium.org/2108933003/diff/240001/chrome/browser/ui/browser_list.h File chrome/browser/ui/browser_list.h (right): https://codereview.chromium.org/2108933003/diff/240001/chrome/browser/ui/browser_list.h#newcode74 chrome/browser/ui/browser_list.h:74: static void PartitionByWorkspace(const std::string& new_workspace); nit: IMO partition ...
4 years, 5 months ago (2016-07-07 21:31:11 UTC) #51
sadrul
lgtm
4 years, 5 months ago (2016-07-08 21:29:45 UTC) #56
Elliot Glaysher
lgtm
4 years, 5 months ago (2016-07-08 21:46:20 UTC) #57
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/2108933003/280001
4 years, 5 months ago (2016-07-08 21:54:11 UTC) #60
commit-bot: I haz the power
Committed patchset #14 (id:280001)
4 years, 5 months ago (2016-07-09 00:28:07 UTC) #62
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-09 00:28:11 UTC) #63
commit-bot: I haz the power
4 years, 5 months ago (2016-07-09 00:29:20 UTC) #65
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/edabf4d52846972d359457d563eb5e782bbf8a1d
Cr-Commit-Position: refs/heads/master@{#404544}

Powered by Google App Engine
This is Rietveld 408576698