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

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

Issue 10908262: [cros] disable GDrive option on certain file pickers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: invert default in file manager Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/select_file_dialog_extension.h" 5 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 virtual_path = default_dialog_path.BaseName(); 329 virtual_path = default_dialog_path.BaseName();
330 } 330 }
331 331
332 has_multiple_file_type_choices_ = 332 has_multiple_file_type_choices_ =
333 file_types ? file_types->extensions.size() > 1 : true; 333 file_types ? file_types->extensions.size() > 1 : true;
334 334
335 GURL file_browser_url = file_manager_util::GetFileBrowserUrlWithParams( 335 GURL file_browser_url = file_manager_util::GetFileBrowserUrlWithParams(
336 type, title, virtual_path, file_types, file_type_index, 336 type, title, virtual_path, file_types, file_type_index,
337 default_extension); 337 default_extension);
338 338
339 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url, 339 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url,
340 base_window, profile_, tab->web_contents(), 340 base_window, profile_, tab->web_contents(),
341 kFileManagerWidth, kFileManagerHeight, 341 kFileManagerWidth, kFileManagerHeight,
342 #if defined(USE_AURA) 342 #if defined(USE_AURA)
343 file_manager_util::GetTitleFromType(type), 343 file_manager_util::GetTitleFromType(type),
344 #else 344 #else
345 // HTML-based header used. 345 // HTML-based header used.
346 string16(), 346 string16(),
347 #endif 347 #endif
348 this /* ExtensionDialog::Observer */); 348 this /* ExtensionDialog::Observer */);
349 if (!dialog) { 349 if (!dialog) {
350 LOG(ERROR) << "Unable to create extension dialog"; 350 LOG(ERROR) << "Unable to create extension dialog";
351 return; 351 return;
352 } 352 }
353 353
354 dialog->SetMinimumContentsSize(kFileManagerMinimumWidth, 354 dialog->SetMinimumContentsSize(kFileManagerMinimumWidth,
355 kFileManagerMinimumHeight); 355 kFileManagerMinimumHeight);
356 356
357 // Connect our listener to FileDialogFunction's per-tab callbacks. 357 // Connect our listener to FileDialogFunction's per-tab callbacks.
358 AddPending(tab_id); 358 AddPending(tab_id);
359 359
360 extension_dialog_ = dialog; 360 extension_dialog_ = dialog;
361 params_ = params; 361 params_ = params;
362 tab_id_ = tab_id; 362 tab_id_ = tab_id;
363 owner_window_ = owner_window; 363 owner_window_ = owner_window;
364 } 364 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698