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

Issue 1927203003: Add support for X11 workspaces (Closed)

Created:
4 years, 7 months ago by Tom (Use chromium acct)
Modified:
4 years, 7 months ago
Reviewers:
danakj, Elliot Glaysher, sky
CC:
chromium-reviews, tfarina, sadrul, kalyank, Lei Zhang, danakj
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for X11 workspaces The core changes introduced: - Add new observers that will get notified when a window's workspace changes. - Save the browser window workspace whenever the workspace changes - Restore the browser workspace for a restored browser session BUG=18596 Committed: https://crrev.com/06405c5944436b431f26037fdc93340842c51de5 Cr-Commit-Position: refs/heads/master@{#391382}

Patch Set 1 #

Patch Set 2 : Reverted ui/views/widget/desktop_aura/x11_desktop_handler.cc #

Total comments: 11

Patch Set 3 : Implemented GetRestoredWorkspace, fix some formatting #

Total comments: 6

Patch Set 4 : Changed workspace id to a string, added unit test. #

Patch Set 5 : Add unimplemented methods on mac/win #

Total comments: 2

Patch Set 6 : Add another unimplemented method on mac #

Patch Set 7 : Remove newline #

Total comments: 32

Patch Set 8 : Fix style, add command line flag for initial workspace #

Patch Set 9 : Removed GetSavedWindowWorkspace, put command line code into browser_frame.cc #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -10 lines) Patch
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/sessions/session_service.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_service.cc View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_service_unittest.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/browser_window.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_window_state.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_window_state.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame.cc View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M components/sessions/core/session_service_commands.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M components/sessions/core/session_service_commands.cc View 1 2 3 3 chunks +28 lines, -0 lines 6 comments Download
M components/sessions/core/session_types.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M components/sessions/core/session_types.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ui/aura/window_tree_host.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/window_tree_host.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M ui/aura/window_tree_host_observer.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/mus/native_widget_mus.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/native_widget_mus.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h View 1 2 3 1 chunk +1 line, -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 4 chunks +14 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_aura.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/native_widget_aura.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_delegate.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_private.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/widget.h View 1 2 3 3 chunks +7 lines, -0 lines 0 comments Download
M ui/views/widget/widget.cc View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 63 (23 generated)
Tom (Use chromium acct)
4 years, 7 months ago (2016-04-29 00:14:28 UTC) #2
danakj
On Thu, Apr 28, 2016 at 5:14 PM, <thomasanderson@google.com> wrote: > Reviewers: sky, Elliot Glaysher ...
4 years, 7 months ago (2016-04-29 00:22:06 UTC) #3
Tom (Use chromium acct)
I was wondering about that also. On Gnome, when I load a session in another ...
4 years, 7 months ago (2016-04-29 00:27:16 UTC) #4
danakj
On Thu, Apr 28, 2016 at 5:27 PM, <thomasanderson@google.com> wrote: > I was wondering about ...
4 years, 7 months ago (2016-04-29 00:41:39 UTC) #5
sky
On Thu, Apr 28, 2016 at 5:14 PM, <thomasanderson@google.com> wrote: > Reviewers: sky, Elliot Glaysher ...
4 years, 7 months ago (2016-04-29 01:01:20 UTC) #6
Tom (Use chromium acct)
> Why do you only save workspace on close? That means if the > machine/chrome ...
4 years, 7 months ago (2016-04-29 01:18:28 UTC) #8
Tom (Use chromium acct)
> For instance in some window managers, activating may bring the window to > the ...
4 years, 7 months ago (2016-04-29 01:19:20 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/20001
4 years, 7 months ago (2016-04-29 01:20:10 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-29 02:25:51 UTC) #13
sky
This looks reasonable to me. My only concern is if we should use a string ...
4 years, 7 months ago (2016-04-29 17:05:45 UTC) #15
Elliot Glaysher
https://codereview.chromium.org/1927203003/diff/20001/ui/views/widget/widget.cc File ui/views/widget/widget.cc (right): https://codereview.chromium.org/1927203003/diff/20001/ui/views/widget/widget.cc#newcode132 ui/views/widget/widget.cc:132: workspace(-1), Should the default value by -1? The docs ...
4 years, 7 months ago (2016-04-29 17:58:13 UTC) #16
Tom (Use chromium acct)
Still need to - Add tests - Change workspace ID to use strings https://codereview.chromium.org/1927203003/diff/20001/chrome/browser/sessions/session_service.cc File ...
4 years, 7 months ago (2016-04-29 19:14:04 UTC) #17
danakj
https://codereview.chromium.org/1927203003/diff/20001/ui/views/widget/widget.cc File ui/views/widget/widget.cc (right): https://codereview.chromium.org/1927203003/diff/20001/ui/views/widget/widget.cc#newcode132 ui/views/widget/widget.cc:132: workspace(-1), On 2016/04/29 19:14:04, Tom Anderson wrote: > On ...
4 years, 7 months ago (2016-04-29 19:59:06 UTC) #19
sky
The plumbing for getting the current workspace looks right. https://codereview.chromium.org/1927203003/diff/40001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/1927203003/diff/40001/chrome/browser/sessions/session_service.cc#newcode827 chrome/browser/sessions/session_service.cc:827: ...
4 years, 7 months ago (2016-05-02 15:11:23 UTC) #20
Tom (Use chromium acct)
Changed integer workspace ID to string Added unit test (may need more test coverage) On ...
4 years, 7 months ago (2016-05-02 20:32:38 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/60001
4 years, 7 months ago (2016-05-02 20:38:00 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/197263)
4 years, 7 months ago (2016-05-02 20:55:11 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/80001
4 years, 7 months ago (2016-05-02 21:20:05 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/197297) mac_chromium_rel_ng on ...
4 years, 7 months ago (2016-05-02 21:37:57 UTC) #29
Elliot Glaysher
lgtm once you fix the few compile errors by adding the empty implementations of GetWorkspace(). ...
4 years, 7 months ago (2016-05-02 21:52:36 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/100001
4 years, 7 months ago (2016-05-02 22:37:13 UTC) #32
Tom (Use chromium acct)
https://codereview.chromium.org/1927203003/diff/80001/chrome/test/base/test_browser_window.cc File chrome/test/base/test_browser_window.cc (right): https://codereview.chromium.org/1927203003/diff/80001/chrome/test/base/test_browser_window.cc#newcode201 chrome/test/base/test_browser_window.cc:201: // TestBrowserWindowOwner On 2016/05/02 21:52:36, Elliot Glaysher wrote: > ...
4 years, 7 months ago (2016-05-02 23:34:02 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/120001
4 years, 7 months ago (2016-05-02 23:36:59 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 00:39:28 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/120001
4 years, 7 months ago (2016-05-03 02:05:17 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/176507)
4 years, 7 months ago (2016-05-03 02:13:16 UTC) #42
Tom (Use chromium acct)
On 2016/05/03 02:13:16, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 7 months ago (2016-05-03 17:28:29 UTC) #43
sky
https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/sessions/session_service_unittest.cc File chrome/browser/sessions/session_service_unittest.cc (right): https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/sessions/session_service_unittest.cc#newcode214 chrome/browser/sessions/session_service_unittest.cc:214: ASSERT_TRUE(window_workspace == windows[0]->workspace); ASSERT_EQ(window_workspace, https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/ui/browser.h File chrome/browser/ui/browser.h (right): https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/ui/browser.h#newcode245 ...
4 years, 7 months ago (2016-05-03 17:40:53 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/140001
4 years, 7 months ago (2016-05-03 19:38:38 UTC) #46
Tom (Use chromium acct)
https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/sessions/session_service_unittest.cc File chrome/browser/sessions/session_service_unittest.cc (right): https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/sessions/session_service_unittest.cc#newcode214 chrome/browser/sessions/session_service_unittest.cc:214: ASSERT_TRUE(window_workspace == windows[0]->workspace); On 2016/05/03 17:40:52, sky wrote: > ...
4 years, 7 months ago (2016-05-03 19:38:39 UTC) #47
sky
https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/ui/browser_window_state.cc File chrome/browser/ui/browser_window_state.cc (right): https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/ui/browser_window_state.cc#newcode178 chrome/browser/ui/browser_window_state.cc:178: void GetSavedWindowWorkspace(const Browser* browser, std::string* workspace) { On 2016/05/03 ...
4 years, 7 months ago (2016-05-03 20:11:59 UTC) #48
Tom (Use chromium acct)
https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/ui/browser_window_state.cc File chrome/browser/ui/browser_window_state.cc (right): https://codereview.chromium.org/1927203003/diff/120001/chrome/browser/ui/browser_window_state.cc#newcode178 chrome/browser/ui/browser_window_state.cc:178: void GetSavedWindowWorkspace(const Browser* browser, std::string* workspace) { On 2016/05/03 ...
4 years, 7 months ago (2016-05-03 20:27:58 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/160001
4 years, 7 months ago (2016-05-03 20:28:20 UTC) #51
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 21:33:37 UTC) #53
sky
LGTM
4 years, 7 months ago (2016-05-03 22:22:05 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1927203003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1927203003/160001
4 years, 7 months ago (2016-05-03 22:30:43 UTC) #57
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 7 months ago (2016-05-03 22:52:39 UTC) #59
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/06405c5944436b431f26037fdc93340842c51de5 Cr-Commit-Position: refs/heads/master@{#391382}
4 years, 7 months ago (2016-05-03 22:54:14 UTC) #61
sky
Sorry for not noticing this earlier. https://codereview.chromium.org/1927203003/diff/160001/components/sessions/core/session_service_commands.cc File components/sessions/core/session_service_commands.cc (right): https://codereview.chromium.org/1927203003/diff/160001/components/sessions/core/session_service_commands.cc#newcode589 components/sessions/core/session_service_commands.cc:589: if (!it.ReadBytes(reinterpret_cast<const char**>(&window_id), ...
4 years, 7 months ago (2016-05-06 17:43:09 UTC) #62
Tom (Use chromium acct)
4 years, 7 months ago (2016-05-06 18:25:41 UTC) #63
Message was sent while issue was closed.
New cl: https://codereview.chromium.org/1961563002/

https://codereview.chromium.org/1927203003/diff/160001/components/sessions/co...
File components/sessions/core/session_service_commands.cc (right):

https://codereview.chromium.org/1927203003/diff/160001/components/sessions/co...
components/sessions/core/session_service_commands.cc:589: if
(!it.ReadBytes(reinterpret_cast<const char**>(&window_id),
On 2016/05/06 17:43:09, sky wrote:
> Why do you reinterpret cast here? You should be able to read the window_id as
an
> int, right?

Done.

https://codereview.chromium.org/1927203003/diff/160001/components/sessions/co...
components/sessions/core/session_service_commands.cc:762:
pickle.WriteBytes(static_cast<const void*>(&window_id), sizeof(window_id));
On 2016/05/06 17:43:09, sky wrote:
> Same comment here. Use WriteInt.

Done.

https://codereview.chromium.org/1927203003/diff/160001/components/sessions/co...
components/sessions/core/session_service_commands.cc:765: new
SessionCommand(kCommandSetWindowWorkspace, pickle.size()));
On 2016/05/06 17:43:09, sky wrote:
> Use the constructor that takes the pickle.

Done.

Powered by Google App Engine
This is Rietveld 408576698