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

Side by Side Diff: chrome/browser/ui/views/file_manager_dialog.cc

Issue 8497008: Implement Bookmark All Tabs Dialog with WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/file_manager_dialog.h" 5 #include "chrome/browser/ui/views/file_manager_dialog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "chrome/browser/extensions/extension_file_browser_private_api.h" 10 #include "chrome/browser/extensions/extension_file_browser_private_api.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 hasMultipleFileTypeChoices_ = 207 hasMultipleFileTypeChoices_ =
208 file_types ? file_types->extensions.size() > 1 : true; 208 file_types ? file_types->extensions.size() > 1 : true;
209 209
210 GURL file_browser_url = FileManagerUtil::GetFileBrowserUrlWithParams( 210 GURL file_browser_url = FileManagerUtil::GetFileBrowserUrlWithParams(
211 type, title, virtual_path, file_types, file_type_index, 211 type, title, virtual_path, file_types, file_type_index,
212 default_extension); 212 default_extension);
213 TabContentsWrapper* tab = owner_browser->GetSelectedTabContentsWrapper(); 213 TabContentsWrapper* tab = owner_browser->GetSelectedTabContentsWrapper();
214 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url, 214 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url,
215 owner_browser, tab->tab_contents(), 215 owner_browser, tab->tab_contents(),
216 kFileManagerWidth, kFileManagerHeight, 216 kFileManagerWidth, kFileManagerHeight, string16(),
217 this /* ExtensionDialog::Observer */); 217 this /* ExtensionDialog::Observer */);
218 if (!dialog) { 218 if (!dialog) {
219 LOG(ERROR) << "Unable to create extension dialog"; 219 LOG(ERROR) << "Unable to create extension dialog";
220 return; 220 return;
221 } 221 }
222 222
223 // Connect our listener to FileDialogFunction's per-tab callbacks. 223 // Connect our listener to FileDialogFunction's per-tab callbacks.
224 int32 tab_id = (tab ? tab->restore_tab_helper()->session_id().id() : 0); 224 int32 tab_id = (tab ? tab->restore_tab_helper()->session_id().id() : 0);
225 AddPending(tab_id); 225 AddPending(tab_id);
226 226
227 extension_dialog_ = dialog; 227 extension_dialog_ = dialog;
228 params_ = params; 228 params_ = params;
229 tab_id_ = tab_id; 229 tab_id_ = tab_id;
230 owner_window_ = owner_window; 230 owner_window_ = owner_window;
231 } 231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698