New issue
Advanced search Search tips
Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All , Mac
Pri: 3
Type: Bug
M-X

Blocking:
issue 671916


Participants' hotlists:
MacViews-Task-Queue


Sign in to add a comment

Make *::ShowWithWindowState(minimized, maximized, fullscreen) consistent across platforms

Project Member Reported by lima...@gmail.com, Apr 2 2015

Issue description

Version: Version 41.0.2272.101 (64-bit)
OS: Ubuntu

This feature is not implemented yet, See https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc&sq=package:chromium&l=1579&rcl=1427974699

create_params.initial_show_state = ui::SHOW_STATE_MINIMIZED;
Browser* new_window = new Browser(create_params);
new_window->window()->Show();

What is the expected output? What do you see instead?
Minimized window should be shown. but normal window is shown.

 

Comment 1 by lima...@gmail.com, Apr 2 2015

@sky, Could you please triage this issue? whether it should be fixed or not?
My CL(https://codereview.chromium.org/1015123003/) is blocked by this issue. 
If this issue should be fixed, then I'm happy to try to fix.

Comment 2 by tapted@chromium.org, Apr 17 2015

Labels: -OS-Linux OS-All
Status: Available
Summary: Make *::ShowWithWindowState(minimized, maximized, fullscreen) consistent across platforms (was: Implement create new window with ui::SHOW_STATE_MINIMIZED state.)
Thanks for investigating this! I think this is the summary of the status-quo (at r325564). It's not pretty.

ChromeOS (NativeWidgetAura): MINIMIZED missing only [1]
Windows (HWNDMessageHandler): FULLSCREEN missing only [2]
Desktop Linux (DesktopWindowTreeHostX11): MINIMIZED, FULLSCREEN missing [3]
MacViews (NativeWidgetMac): All NOTIMPLEMENTED() TODO(tapted) [4]
Mac Cocoa (BrowserWindowCocoa::Show()): no such thing as maximize on Mac (minimize, fullscreen implemented) [5]

I'll be poking the MacViews eventually. It's likely that will involve a cross-platform test that ensures things are consistent.

[1] https://chromium.googlesource.com/chromium/src/+/e7d827c/ui/views/widget/native_widget_aura.cc#483
[2] https://chromium.googlesource.com/chromium/src/+/e7d827c/ui/views/win/hwnd_message_handler.cc#588
[3] https://chromium.googlesource.com/chromium/src/+/e7d827c/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#366
[4] https://chromium.googlesource.com/chromium/src/+/e7d827c/ui/views/widget/native_widget_mac.mm#336
[5] https://chromium.googlesource.com/chromium/src/+/e7d827c/chrome/browser/ui/cocoa/browser_window_cocoa.mm#176

Comment 3 by joone....@intel.com, May 13 2015

Here is a patch for Linux: https://codereview.chromium.org/1125383008/

I'll submit patches for other platforms soon.
Project Member

Comment 4 by bugdroid1@chromium.org, May 14 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a3f2f572a3a96957a6180056e7cbd30f551200d

commit 3a3f2f572a3a96957a6180056e7cbd30f551200d
Author: joone.hur <joone.hur@intel.com>
Date: Thu May 14 00:41:32 2015

Support MINIMIZED, MAXIMIZED, FULLSCREEN state when showing a chrome window.

Some of ui::WindowShowState were not supported in Linux so this CL implemented
SHOW_STATE_MINIMIZED, SHOW_STATE_MAXIMIZED, and SHOW_STATE_FULLSCREEN state.

BUG=473228

Review URL: https://codereview.chromium.org/1125383008

Cr-Commit-Position: refs/heads/master@{#329764}

[modify] http://crrev.com/3a3f2f572a3a96957a6180056e7cbd30f551200d/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Project Member

Comment 5 by bugdroid1@chromium.org, May 19 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/051aece17c0e035938cdd99233967f1cba865b4a

commit 051aece17c0e035938cdd99233967f1cba865b4a
Author: joone.hur <joone.hur@intel.com>
Date: Tue May 19 20:51:11 2015

Support the full-screen state when showing a chrome window

The SHOW_STATE_FULLSCREEN state has not been supported in Windows
so this CL implements it and allows browser_tests to pass the
test for creating a full screen extension window without manually
calling setFullscreenMode().

BUG=473228

Review URL: https://codereview.chromium.org/1138383008

Cr-Commit-Position: refs/heads/master@{#330602}

[modify] http://crrev.com/051aece17c0e035938cdd99233967f1cba865b4a/chrome/browser/extensions/api/tabs/tabs_api.cc
[modify] http://crrev.com/051aece17c0e035938cdd99233967f1cba865b4a/ui/views/win/hwnd_message_handler.cc

Project Member

Comment 6 by bugdroid1@chromium.org, May 28 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22231ecb82de3ad5ed6f80b81698170bc52f2991

commit 22231ecb82de3ad5ed6f80b81698170bc52f2991
Author: joone.hur <joone.hur@intel.com>
Date: Thu May 28 02:33:42 2015

Remove the exceptional cases to support the minimized/fullscreen state for Desktop Linux

ui::SHOW_STATE_MINIMIZED and ui::SHOW_STATE_FULLSCREEN started to be handled
in Desktop Linux when using chrome.windows.create API in r329764.

So, we can remove the exceptional cases to support the states for Desktop Linux.

BUG= 459841 ,473228

Review URL: https://codereview.chromium.org/1159703006

Cr-Commit-Position: refs/heads/master@{#331726}

[modify] http://crrev.com/22231ecb82de3ad5ed6f80b81698170bc52f2991/chrome/browser/extensions/api/tabs/tabs_api.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 26 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5d6762c5539bc7d6098588323a16a24826e1149

commit d5d6762c5539bc7d6098588323a16a24826e1149
Author: joone.hur <joone.hur@intel.com>
Date: Thu Nov 26 16:06:04 2015

Make the minimize state work when creating a chrome window in CrOS

This CL makes SHOW_STATE_MINIMIZE state work when creating a
chrome window in CrOS, so we don't need to call Minimize()
manually in tabs_api.cc

BUG=473228
TEST=NativeWidgetAuraTest.CreateMinimized

Review URL: https://codereview.chromium.org/1130033003

Cr-Commit-Position: refs/heads/master@{#361898}

[modify] http://crrev.com/d5d6762c5539bc7d6098588323a16a24826e1149/chrome/browser/extensions/api/tabs/tabs_api.cc
[modify] http://crrev.com/d5d6762c5539bc7d6098588323a16a24826e1149/ui/views/widget/native_widget_aura.cc
[modify] http://crrev.com/d5d6762c5539bc7d6098588323a16a24826e1149/ui/views/widget/native_widget_aura_unittest.cc
[modify] http://crrev.com/d5d6762c5539bc7d6098588323a16a24826e1149/ui/views/widget/widget.cc

Project Member

Comment 8 by sheriffbot@chromium.org, Jul 14 2016

Labels: Hotlist-OpenBugWithCL
A change has landed for this issue, but it's been open for over 6 months. Please review and close it if applicable. If this issue should remain open, remove the "Hotlist-OpenBugWithCL" label. If no action is taken, it will be archived in 30 days.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 9 by tapted@chromium.org, Jul 14 2016

Cc: -kalman@chromium.org
Labels: -Pri-2 -Hotlist-OpenBugWithCL Proj-MacViews Pri-3
This still needs to be revisited, but it's not urgent
Owner: joone....@intel.com
Status: Started (was: Available)
Labels: MacViews-Cleanup M-X OS-Mac
Owner: tapted@chromium.org
tapted, is this still in progress?
Blocking: 671916
Owner: ----
Status: Available (was: Started)
I think we still need NativeWidgetMac::ShowWithWindowState() to implement minimize and fullscreen. Maximize is less interesting, but I'm pretty sure the others are needed for session restore (and maybe extension APIs). Tentatively blocking Issue 671916 based on that. session_restore_browsertest.cc seems like it might have some coverage, but a lot of tests are disabled :/.

Other platforms seem to be feature-complete. Some of the tests in CLs above can probably be made cross-platform.

I'm moving this into Available since I'm swamped for at least the next few weeks for m67 stuff.

Sign in to add a comment