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

Unified Diff: chrome/browser/ui/views/file_manager_dialog.cc

Issue 7830024: CrOS - Fix file picker to route callbacks using TabContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/file_manager_dialog.cc
diff --git a/chrome/browser/ui/views/file_manager_dialog.cc b/chrome/browser/ui/views/file_manager_dialog.cc
index 322ee872bcb69fb787c215403b3d6a01468bd27f..e7f156469eb72f9c2d42d52acb2a2baddcfce180 100644
--- a/chrome/browser/ui/views/file_manager_dialog.cc
+++ b/chrome/browser/ui/views/file_manager_dialog.cc
@@ -182,18 +182,19 @@ void FileManagerDialog::SelectFileImpl(
virtual_path = FilePath();
}
+ // Connect our listener to FileDialogFunction's per-tab callbacks.
+ TabContentsWrapper* tab = owner_browser->GetSelectedTabContentsWrapper();
+ int32 tab_id = (tab ? tab->restore_tab_helper()->session_id().id() : 0);
+ PendingDialog::Add(tab_id, this);
+
GURL file_browser_url = FileManagerUtil::GetFileBrowserUrlWithParams(
type, title, virtual_path, file_types, file_type_index,
default_extension);
extension_dialog_ = ExtensionDialog::Show(file_browser_url,
- owner_browser, kFileManagerWidth, kFileManagerHeight,
+ owner_browser, tab->tab_contents(),
+ kFileManagerWidth, kFileManagerHeight,
this /* ExtensionDialog::Observer */);
- // Connect our listener to FileDialogFunction's per-tab callbacks.
- TabContentsWrapper* tab = owner_browser->GetSelectedTabContentsWrapper();
- int32 tab_id = (tab ? tab->restore_tab_helper()->session_id().id() : 0);
- PendingDialog::Add(tab_id, this);
-
params_ = params;
tab_id_ = tab_id;
owner_window_ = owner_window;
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_dialog.cc ('k') | chrome/browser/ui/views/file_manager_dialog_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698