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

Issue 159780: Add support for constrained windows on os x, based on Avi's GTMWindowSheetController. (Closed)

Created:
11 years, 4 months ago by Nico
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add support for constrained windows on os x, based on Avi's GTMWindowSheetController. Add carpet bombing dialog as first per-tab sheet. Depends http://codereview.appspot.com/105064 . The main issue with this patch is that GTMWindowSheetController doesn't provide an api to move sheets between windows, so this CL disables tab dragging for tabs with sheets, and fullscreen mode for windows with sheets. We can fix this later. Other stuff that should be done at some point, but not now: * Open/Save panels should be per-tab * Need an ui test that goes to page, then page with sheet, then hit back, forward, reload. * Bookmark sheets should not be sheets but in a separate window BUG=14666 TEST=Go to skypher.com/SkyLined/Repro/Chrome/carpet bombing/repro.html , a per-window sheet should appear. Things to test with this dialog: * Hitting cmd-q while a sheet is open in any tab should not quit but instead focus the sheet. * Hitting cmd-w while a sheet is open in any tab should not close the window but instead focus the sheet. * Dragging a tab with a sheet should move the window (and keep the tab visible), not detach the tab. * Going fullscreen should be disabled for windows with open tabs. * When a per-tab sheet is open in a non-active tab, it shouldn't steal the focus, i.e. going to the page above, then hitting cmd-t, and then hitting cmd-l should work. * Closing a non-frontmost tab with a per-tab sheet shouldn't crash. * Going to the url above and quickly opening a new tab, so that the sheet opens while its tab is not front-most should work (sheet should display only when you switch back to the tab with the sheet). * Go to google.com, then to skypher.com/SkyLined/Repro/Chrome/carpet bombing/repro.html , hit "backward" with open sheet, hit forward, focus location bar, hit enter. This shouldn't crash. * Hitting escape should dismiss the sheet * Hitting enter should confirm the sheet. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23091

Patch Set 1 #

Patch Set 2 : implement methods required by GTMWindowSheetController #

Patch Set 3 : tab dragging for sheet tabs disabled #

Patch Set 4 : ragging tab with sheet in contents moves window #

Patch Set 5 : closing background tabs with sheets work; opening sheets in background tabs work #

Patch Set 6 : closing a tab with a download sheet acts as if "deny" has been clicked; <esc> closes the sheet #

Patch Set 7 : cleanups #

Patch Set 8 : Merge in current trunk #

Total comments: 20

Patch Set 9 : address comments #

Patch Set 10 : Fight git #

Patch Set 11 : explicitly close shelf in delegate; use thomasvl's new localization apis for text on sheet #

Patch Set 12 : add DEPS roll for GTM focus patch #

Patch Set 13 : Merge with ToT #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+738 lines, -42 lines) Patch
M DEPS View 12 1 chunk +1 line, -1 line 0 comments Download
M base/scoped_nsobject.h View 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 2 3 4 5 6 7 8 9 10 11 12 5 chunks +45 lines, -5 lines 0 comments Download
M chrome/browser/cocoa/browser_window_cocoa.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +53 lines, -7 lines 0 comments Download
A chrome/browser/cocoa/constrained_window_mac.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +134 lines, -0 lines 3 comments Download
A chrome/browser/cocoa/constrained_window_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +87 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/download_request_dialog_delegate_mac.h View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/download_request_dialog_delegate_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +105 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/cocoa/tab_strip_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +102 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_view.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/cocoa/tab_view.mm View 3 4 5 6 7 8 8 chunks +37 lines, -17 lines 0 comments Download
M chrome/browser/cocoa/tab_window_controller.h View 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_window_controller.mm View 3 4 5 6 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/constrained_window.h View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/temp_scaffolding_stubs.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Nico
11 years, 4 months ago (2009-08-10 02:45:29 UTC) #1
Avi (use Gerrit)
Lotta nitpicking but overall it LGTM. Pink's out this week, BTW. http://codereview.chromium.org/159780/diff/4026/4027 File base/scoped_nsobject.h (right): ...
11 years, 4 months ago (2009-08-10 21:07:00 UTC) #2
Nico
Thanks for the review, I've addressed all comments. The only thing missing is the "how ...
11 years, 4 months ago (2009-08-10 23:56:41 UTC) #3
Nico
Hi Avi, I've changed the constrained window stuff so that the delegate now explicitly closes ...
11 years, 4 months ago (2009-08-11 03:29:13 UTC) #4
Avi (use Gerrit)
11 years, 4 months ago (2009-08-11 20:27:49 UTC) #5
LG

http://codereview.chromium.org/159780/diff/3145/3152
File chrome/browser/cocoa/constrained_window_mac.h (right):

http://codereview.chromium.org/159780/diff/3145/3152#newcode95
Line 95: // Contrained wiindows work slightly differently on OS X than on the
other
wiindows

http://codereview.chromium.org/159780/diff/3145/3152#newcode97
Line 97: // 1. A constrained window is bound to both a tab and window on os x.
OS X; match yourself five lines up.

http://codereview.chromium.org/159780/diff/3145/3152#newcode98
Line 98: // 2. The delegate is responsible for closing the sheet again when it
is deleted.
80col

Powered by Google App Engine
This is Rietveld 408576698