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

Side by Side Diff: chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc

Issue 445883002: Support <input webkitdirectory> in KDE file chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 5 #include <set>
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 command_line->AppendArg(GetMimeTypeFilterString()); 347 command_line->AppendArg(GetMimeTypeFilterString());
348 VLOG(1) << "KDialog command line: " << command_line->GetCommandLineString(); 348 VLOG(1) << "KDialog command line: " << command_line->GetCommandLineString();
349 } 349 }
350 350
351 void SelectFileDialogImplKDE::FileSelected(const base::FilePath& path, 351 void SelectFileDialogImplKDE::FileSelected(const base::FilePath& path,
352 void* params) { 352 void* params) {
353 if (type_ == SELECT_SAVEAS_FILE) 353 if (type_ == SELECT_SAVEAS_FILE)
354 *last_saved_path_ = path.DirName(); 354 *last_saved_path_ = path.DirName();
355 else if (type_ == SELECT_OPEN_FILE) 355 else if (type_ == SELECT_OPEN_FILE)
356 *last_opened_path_ = path.DirName(); 356 *last_opened_path_ = path.DirName();
357 else if (type_ == SELECT_FOLDER) 357 else if (type_ == SELECT_FOLDER || type_ == SELECT_UPLOAD_FOLDER)
358 *last_opened_path_ = path; 358 *last_opened_path_ = path;
359 else 359 else
360 NOTREACHED(); 360 NOTREACHED();
361 if (listener_) { // What does the filter index actually do? 361 if (listener_) { // What does the filter index actually do?
362 // TODO(dfilimon): Get a reasonable index value from somewhere. 362 // TODO(dfilimon): Get a reasonable index value from somewhere.
363 listener_->FileSelected(path, 1, params); 363 listener_->FileSelected(path, 1, params);
364 } 364 }
365 } 365 }
366 366
367 void SelectFileDialogImplKDE::MultiFilesSelected( 367 void SelectFileDialogImplKDE::MultiFilesSelected(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 } 501 }
502 502
503 if (filenames_fp.empty()) { 503 if (filenames_fp.empty()) {
504 FileNotSelected(params); 504 FileNotSelected(params);
505 return; 505 return;
506 } 506 }
507 MultiFilesSelected(filenames_fp, params); 507 MultiFilesSelected(filenames_fp, params);
508 } 508 }
509 509
510 } // namespace libgtk2ui 510 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698