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

Issue 10584026: Allow ChromeOS file selection dialog to be shown from shell windows. (Closed)

Created:
8 years, 6 months ago by benwells
Modified:
8 years, 6 months ago
CC:
chromium-reviews, jeremya+watch_chromium.org, Aaron Boodman, kinuko+watch, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Allow ChromeOS file selection dialog to be shown from shell windows. This enables the fileSystem APIs to work on ChromeOS. With this change the dialogs are shown full screen when invoked from shell windows. BUG=133594 TEST=Test that file selection dialog can be used successfully on ChromeOS from a range of uses, including loading an extension and saving a file you have downloaded. Check that the dialog looks the same as it always has. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=144021

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 4

Patch Set 3 : Clearer logic #

Patch Set 4 : Uses BaseWindow instead of Browser #

Total comments: 6

Patch Set 5 : Comments addressed #

Total comments: 2

Patch Set 6 : Use display coordinates to ensure dialog is onscreen #

Patch Set 7 : Tidy up #

Total comments: 2

Patch Set 8 : Using AdjustToFit #

Patch Set 9 : Rebase #

Patch Set 10 : Another rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -53 lines) Patch
M chrome/browser/extensions/api/file_system/file_system_api.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_process_manager.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_process_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/shell_window_registry.h View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/shell_window_registry.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/shell_window.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog.h View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog.cc View 1 2 3 4 5 6 7 6 chunks +23 lines, -21 lines 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension.h View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension.cc View 1 2 3 4 7 chunks +56 lines, -15 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
benwells
This changes fixes the problem but doesn't feel great. A better solution would be to ...
8 years, 6 months ago (2012-06-20 05:03:09 UTC) #1
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10584026/diff/2001/chrome/browser/ui/views/select_file_dialog_extension.cc File chrome/browser/ui/views/select_file_dialog_extension.cc (right): http://codereview.chromium.org/10584026/diff/2001/chrome/browser/ui/views/select_file_dialog_extension.cc#newcode259 chrome/browser/ui/views/select_file_dialog_extension.cc:259: // Extension background pages may not supply an owner_window, ...
8 years, 6 months ago (2012-06-20 05:21:06 UTC) #2
benwells
http://codereview.chromium.org/10584026/diff/2001/chrome/browser/ui/views/select_file_dialog_extension.cc File chrome/browser/ui/views/select_file_dialog_extension.cc (right): http://codereview.chromium.org/10584026/diff/2001/chrome/browser/ui/views/select_file_dialog_extension.cc#newcode259 chrome/browser/ui/views/select_file_dialog_extension.cc:259: // Extension background pages may not supply an owner_window, ...
8 years, 6 months ago (2012-06-20 05:41:32 UTC) #3
sky
I agree on this being ick. I would rather see us do the right long ...
8 years, 6 months ago (2012-06-20 14:36:09 UTC) #4
jeremya
It looks to me like browser/ui/views/extension_dialog.cc only needs Browser to get a Profile and a ...
8 years, 6 months ago (2012-06-20 15:32:34 UTC) #5
benwells
Updated to be less icky. It still has the horrible loop through profiles. I'm still ...
8 years, 6 months ago (2012-06-22 16:42:46 UTC) #6
stevenjb (google-dont-use)
http://codereview.chromium.org/10584026/diff/12001/chrome/browser/ui/extensions/shell_window.h File chrome/browser/ui/extensions/shell_window.h (right): http://codereview.chromium.org/10584026/diff/12001/chrome/browser/ui/extensions/shell_window.h#newcode64 chrome/browser/ui/extensions/shell_window.h:64: TabContents* tab_contents() const { return contents_.get(); } The UI ...
8 years, 6 months ago (2012-06-22 17:29:00 UTC) #7
benwells
http://codereview.chromium.org/10584026/diff/12001/chrome/browser/ui/views/select_file_dialog_extension.cc File chrome/browser/ui/views/select_file_dialog_extension.cc (right): http://codereview.chromium.org/10584026/diff/12001/chrome/browser/ui/views/select_file_dialog_extension.cc#newcode291 chrome/browser/ui/views/select_file_dialog_extension.cc:291: } On 2012/06/22 17:29:00, stevenjb1 wrote: > I think ...
8 years, 6 months ago (2012-06-22 19:51:47 UTC) #8
stevenjb (google-dont-use)
Interesting. I knew that we decided not to use the chrome.windows API, but didn't realize ...
8 years, 6 months ago (2012-06-22 21:17:10 UTC) #9
benwells
PTAL http://codereview.chromium.org/10584026/diff/12001/chrome/browser/ui/extensions/shell_window.h File chrome/browser/ui/extensions/shell_window.h (right): http://codereview.chromium.org/10584026/diff/12001/chrome/browser/ui/extensions/shell_window.h#newcode64 chrome/browser/ui/extensions/shell_window.h:64: TabContents* tab_contents() const { return contents_.get(); } On ...
8 years, 6 months ago (2012-06-22 21:54:28 UTC) #10
sky
http://codereview.chromium.org/10584026/diff/20001/chrome/browser/ui/views/extensions/extension_dialog.cc File chrome/browser/ui/views/extensions/extension_dialog.cc (right): http://codereview.chromium.org/10584026/diff/20001/chrome/browser/ui/views/extensions/extension_dialog.cc#newcode164 chrome/browser/ui/views/extensions/extension_dialog.cc:164: if (y < 0) some screens have negative coordinates.
8 years, 6 months ago (2012-06-22 22:28:12 UTC) #11
benwells
http://codereview.chromium.org/10584026/diff/20001/chrome/browser/ui/views/extensions/extension_dialog.cc File chrome/browser/ui/views/extensions/extension_dialog.cc (right): http://codereview.chromium.org/10584026/diff/20001/chrome/browser/ui/views/extensions/extension_dialog.cc#newcode164 chrome/browser/ui/views/extensions/extension_dialog.cc:164: if (y < 0) On 2012/06/22 22:28:12, sky wrote: ...
8 years, 6 months ago (2012-06-22 23:05:03 UTC) #12
sky
LGTM http://codereview.chromium.org/10584026/diff/24002/chrome/browser/ui/views/extensions/extension_dialog.cc File chrome/browser/ui/views/extensions/extension_dialog.cc (right): http://codereview.chromium.org/10584026/diff/24002/chrome/browser/ui/views/extensions/extension_dialog.cc#newcode166 chrome/browser/ui/views/extensions/extension_dialog.cc:166: if (y < screen_rect.y()) Replace all this with ...
8 years, 6 months ago (2012-06-25 14:23:14 UTC) #13
benwells
http://codereview.chromium.org/10584026/diff/24002/chrome/browser/ui/views/extensions/extension_dialog.cc File chrome/browser/ui/views/extensions/extension_dialog.cc (right): http://codereview.chromium.org/10584026/diff/24002/chrome/browser/ui/views/extensions/extension_dialog.cc#newcode166 chrome/browser/ui/views/extensions/extension_dialog.cc:166: if (y < screen_rect.y()) On 2012/06/25 14:23:15, sky wrote: ...
8 years, 6 months ago (2012-06-25 17:52:59 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benwells@chromium.org/10584026/24003
8 years, 6 months ago (2012-06-25 18:00:14 UTC) #15
commit-bot: I haz the power
Try job failure for 10584026-24003 (retry) on linux_chromeos for step "compile" (clobber build). It's a ...
8 years, 6 months ago (2012-06-25 18:22:19 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benwells@chromium.org/10584026/24003
8 years, 6 months ago (2012-06-25 18:59:45 UTC) #17
commit-bot: I haz the power
8 years, 6 months ago (2012-06-25 20:58:29 UTC) #18
Failed to apply patch for chrome/browser/ui/views/extensions/extension_dialog.h:
While running patch -p1 --forward --force;
patching file chrome/browser/ui/views/extensions/extension_dialog.h
Hunk #3 FAILED at 31.
Hunk #4 succeeded at 100 (offset 3 lines).
Hunk #5 succeeded at 109 (offset 3 lines).
1 out of 5 hunks FAILED -- saving rejects to file
chrome/browser/ui/views/extensions/extension_dialog.h.rej

Powered by Google App Engine
This is Rietveld 408576698