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

Issue 10173035: Add key modifier on minimize/restore button click to minimize/restore all Panels for Mac. (Closed)

Created:
8 years, 8 months ago by jennb
Modified:
8 years, 8 months ago
Reviewers:
jianli
CC:
chromium-reviews, jennb, jianli, Dmitry Titov, dcheng, Andrei
Visibility:
Public.

Description

Add key modifier on minimize/restore button click to minimize/restore all Panels for Mac. Panel.xib changed to remove animation layer for minimize and restore buttons. Bad 'copy-paste' from wrench menu button. Gets rid of kCGError warnings when running interactive_ui_tests. BUG=123176 TEST=new test added. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=134295

Patch Set 1 #

Total comments: 10

Patch Set 2 : feedback changes. xib fix. #

Patch Set 3 : removed IsActive checks from new test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -45 lines) Patch
M chrome/app/nibs/Panel.xib View 1 3 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/ui/panels/detached_panel_strip.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/detached_panel_strip.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/docked_panel_strip.h View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/panels/docked_panel_strip.cc View 1 3 chunks +31 lines, -27 lines 0 comments Download
M chrome/browser/ui/panels/panel.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/panels/panel.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_browsertest.cc View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_strip.h View 1 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/panels/panel_window_controller_cocoa.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/panels/panel_window_controller_cocoa.mm View 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jennb
8 years, 8 months ago (2012-04-26 01:15:54 UTC) #1
jianli
http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docked_panel_strip.cc File chrome/browser/ui/panels/docked_panel_strip.cc (right): http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docked_panel_strip.cc#newcode512 chrome/browser/ui/panels/docked_panel_strip.cc:512: AutoReset<bool> pin(&minimizing_all_, true); nit: please add comment for this. ...
8 years, 8 months ago (2012-04-26 18:06:57 UTC) #2
jennb
http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docked_panel_strip.cc File chrome/browser/ui/panels/docked_panel_strip.cc (right): http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docked_panel_strip.cc#newcode512 chrome/browser/ui/panels/docked_panel_strip.cc:512: AutoReset<bool> pin(&minimizing_all_, true); On 2012/04/26 18:06:57, jianli wrote: > ...
8 years, 8 months ago (2012-04-27 00:30:10 UTC) #3
jianli
lgtm http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docked_panel_strip.cc File chrome/browser/ui/panels/docked_panel_strip.cc (right): http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docked_panel_strip.cc#newcode526 chrome/browser/ui/panels/docked_panel_strip.cc:526: if (minimized_active_panel) { On 2012/04/27 00:30:11, jennb wrote: ...
8 years, 8 months ago (2012-04-27 00:39:04 UTC) #4
jennb
8 years, 8 months ago (2012-04-27 16:47:45 UTC) #5
Removed the IsActive checks from the new test. RunAllPending is not a good way
to wait for "enough time" before checking active status. We can't do a
WaitForPanelActiveState reliably because that would block forever unless we know
for sure which panel was active and would become inactive.

http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docke...
File chrome/browser/ui/panels/docked_panel_strip.cc (right):

http://codereview.chromium.org/10173035/diff/1/chrome/browser/ui/panels/docke...
chrome/browser/ui/panels/docked_panel_strip.cc:526: if (minimized_active_panel)
{
On 2012/04/27 00:39:04, jianli wrote:
> On 2012/04/27 00:30:11, jennb wrote:
> > On 2012/04/26 18:06:57, jianli wrote:
> > > I think it might be a little bit safer to iterate all the panels again and
> > > deactivate those that are minimized and still active. This is because we
> might
> > > have the edge case that other panel get activated by the system or the
> > tracking
> > > panel is being closed.
> > 
> > If another panel is activated by the system while we are minimizing all,
that
> > active panel will not be any of the minimized panels as minimized panels
> cannot
> > be activated. The active panel can only be one that has not yet been
> minimized,
> > which means we will eventually find it when we get around to minimizing it.
> > Thus, there is no need to iterate through again.
> 
> What if minimized_active_panel is closed before we call Deactivate for it?
This
> could happen though it is rare.

The closure would happen on a separate pass of the message loop. We are
deactivating the panel in the same method where we minimize it so it all gets
processed in one message loop pass.

Powered by Google App Engine
This is Rietveld 408576698