Chromium Code Reviews
Help | Chromium Project | Sign in
(20)

Issue 164547: Mac: make save/open dialogs operate as tab-modal sheets....

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 9 months ago by viettrungluu-gmail
Modified:
11 months, 2 weeks ago
Reviewers:
pink, Nico, Avi
CC:
chromium-reviews_googlegroups.com, John Grabowski, Paul Godavari, brettw
Visibility:
Public.

Description

Mac: make save/open dialogs operate as tab-modal sheets. (... at least whenever possible, which is usually.) Depends on: http://codereview.appspot.com/109050 [Patch Set 5] Includes: - Save Page As... (from File menu, or Cmd-S) - Open File... (from File menu, or Cmd-O) - Save Link/Image As... (from context menu) - file upload (e.g., attaching a file to a new bug at crbug.com) Also: - improves enabling/disabling behaviour (some bug fixes); the disabling of the Encoding menu contents is now more Mac-ish To do/issues: - Closing a tab nukes any save/open sheet; for open, fine, but for save? Presumably, if you wanted to save something, it might be imporant. Perhaps it just reactivate as a response? - Quitting always refuses to nuke any save/open sheet, but instead pops you to one; this seems unnecessary for open. - Make Cmd-Shift-[/] work while a save/open sheet is open and active? - Still need to add a check in CreateConstrainedDialog(). - Maybe still some races left? - Modality nearly complete. (Perhaps) still not right: - Edit menu items (cut/copy/paste/etc. should apply to the sheet!) -- oy! - Print... are wonky -- not my fault. - Should Email Page Location be affected by sheets? (No, unless it ever wants to pop up an error message as a tab-modal sheet?) It's not currently hooked up to anything right now, anyway. - Open Recent has an IDC_... for disabling, but it doesn't do anything, ever, right now. - I have no idea what "Create Application Shortcut..." is supposed to do. - Bug: this CL has turned into a monster. Hopefully-very-temporary note: - If you play with this and chromium dies a horrible death (due to a failed assertion), it's probably this bug: <http://crbug.com/19116>;. BUG=19333 TEST=Try the above (saving/opening/cancelling), try switching/creating tabs, try closing tabs (while open/save sheet active, with tab selected and unselected), open/close bookmark bar while switching between tabs with/without sheets.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : Fewer crashes. Choice of SelectFile[InTab]() made explicit. #

Patch Set 9 : Kinda works better. Will redesign. Saving snapshot. #

Patch Set 10 : Yet Another Snapshot. Works a bit better. Will now unhack, and hack GTM (?). #

Patch Set 11 : YAS. Works about the same, but no more sets/multisets. Off to hack GTM. #

Patch Set 12 : '' #

Patch Set 13 : Change to match pending GTM patch update. #

Patch Set 14 : '' #

Patch Set 15 : Some stability and modality improvements. #

Patch Set 16 : propset #

Patch Set 17 : Rebased to ToT. #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : Merged ToT (not even compiled yet). #

Patch Set 21 : Painfully (but hopefully correctly) merged ToT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1214 lines, -144 lines) Patch
M chrome/app/chrome_dll_resource.h View 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/app/nibs/MainMenu.xib View 15 16 17 18 19 20 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/app/nibs/TabContents.xib View 12 13 14 15 16 17 18 19 20 5 chunks +20 lines, -24 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/blocked_popup_container.h View 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/browser.h View 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +174 lines, -5 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm View 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.h View 18 19 20 6 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 18 19 20 5 chunks +33 lines, -1 line 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller_unittest.mm View 18 19 20 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm View 14 15 16 17 18 19 20 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/cocoa/browser_window_controller.h View 12 13 14 15 16 17 18 19 20 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/browser_window_controller.mm View 12 13 14 15 16 17 18 19 20 9 chunks +51 lines, -8 lines 0 comments Download
M chrome/browser/cocoa/constrained_window_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +58 lines, -10 lines 0 comments Download
M chrome/browser/cocoa/constrained_window_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +47 lines, -7 lines 0 comments Download
M chrome/browser/cocoa/download_request_dialog_delegate_mac.mm View 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/history_menu_cocoa_controller.mm View 14 15 16 17 18 19 20 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/cocoa/shell_dialogs_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 11 chunks +328 lines, -22 lines 0 comments Download
A chrome/browser/cocoa/tab_contents_controller_view.h View 12 13 14 15 16 17 18 19 20 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/tab_contents_controller_view.mm View 12 13 14 15 16 17 18 19 20 1 chunk +53 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/tab_strip_controller.mm View 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/cocoa/toolbar_controller.mm View 12 13 14 15 16 17 18 19 20 3 chunks +27 lines, -2 lines 0 comments Download
M chrome/browser/debugger/devtools_window.h View 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +18 lines, -1 line 0 comments Download
M chrome/browser/download/download_request_manager.h View 15 16 17 18 19 20 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/download/download_request_manager.cc View 15 16 17 18 19 20 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/download/save_package.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/gtk/dialogs_gtk.cc View 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +20 lines, -8 lines 0 comments Download
M chrome/browser/login_prompt_mac.mm View 15 16 17 18 19 20 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/shell_dialogs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +21 lines, -2 lines 0 comments Download
M chrome/browser/tab_contents/constrained_window.h View 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +42 lines, -1 line 0 comments Download
A chrome/browser/tab_contents/constrained_window.cc View 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +43 lines, -16 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +67 lines, -11 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_delegate.h View 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/views/shell_dialogs_win.cc View 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +20 lines, -8 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -0 lines 0 comments Download
Trybot results: Sign in to try more bots
Commit: CQ not working?

Messages

Total messages: 8 (0 generated)
viettrungluu-gmail
Have a look. It needs a second- and third-look to make sure it's not leaking ...
5 years, 9 months ago (2009-08-14 05:47:51 UTC) #1
viettrungluu-gmail
I don't know how y'all feel about tab-modal save/open dialogs, but here it is anyway. ...
5 years, 9 months ago (2009-08-14 15:53:04 UTC) #2
Nico
What happens when, say, a http auth sheet is open and you hit cmd-s on ...
5 years, 9 months ago (2009-08-14 16:08:05 UTC) #3
viettrungluu-gmail
On 2009/08/14 16:08:05, thakis wrote: > What happens when, say, a http auth sheet is ...
5 years, 9 months ago (2009-08-14 16:12:04 UTC) #4
Nico
Also, if this goes in, it should probably happen on all platforms. I know it's ...
5 years, 9 months ago (2009-08-14 16:21:04 UTC) #5
viettrungluu-gmail
Argh. The patch is in for an overhaul. After some meditation on the topic, I ...
5 years, 9 months ago (2009-08-15 15:46:39 UTC) #6
Nico
I wouldn't worry about this. While it should arguably be possible to open a file ...
5 years, 9 months ago (2009-08-15 15:56:22 UTC) #7
viettrungluu-gmail
5 years, 9 months ago (2009-08-15 19:28:27 UTC) #8
Fair enough about the simplicity, but we still need to disable navigation while
save/open dialogs are up.

Given that neither Mac nor gtk support multiple constrained windows, it seems a
little silly to maintain a complicated interface in TabContents for that
purpose. I fired off an email to erg@... about this (it's unclear, at least to
me, from svn logs who the right person to ask is, but he seems like a reasonably
likely candidate).

On 2009/08/15 15:56:22, thakis wrote:
> I wouldn't worry about this. While it should arguably be possible to
> open a file in a tab with an auth dialog, not supporting this is not a
> huge deal. And the mental model "only one sheet per tab, if you want a
> new one get rid of the existing one" is simpler, too.
> 
> So, I'd vote to make all tab-sheets what you call "content-modal". If
> you really don't like this, then let cmd-o open a new tab with an
> "open file" sheet if the current tab already has a sheet.
> 
> Would be nice to check who wrote the constrainedwindow stuff on
> windows and ask him/her why tabcontents seems to support several
> constrainedwindows.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be