| OLD | NEW |
| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 bool file_operation, | 324 bool file_operation, |
| 325 bool multiple_selection, | 325 bool multiple_selection, |
| 326 base::CommandLine* command_line) { | 326 base::CommandLine* command_line) { |
| 327 CHECK(command_line); | 327 CHECK(command_line); |
| 328 | 328 |
| 329 // Attach to the current Chrome window. | 329 // Attach to the current Chrome window. |
| 330 if (parent != None) { | 330 if (parent != None) { |
| 331 command_line->AppendSwitchNative( | 331 command_line->AppendSwitchNative( |
| 332 desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE3 ? | 332 desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE3 ? |
| 333 "--embed" : "--attach", | 333 "--embed" : "--attach", |
| 334 base::IntToString(parent)); | 334 base::Uint64ToString(parent)); |
| 335 } | 335 } |
| 336 | 336 |
| 337 // Set the correct title for the dialog. | 337 // Set the correct title for the dialog. |
| 338 if (!title.empty()) | 338 if (!title.empty()) |
| 339 command_line->AppendSwitchNative("--title", title); | 339 command_line->AppendSwitchNative("--title", title); |
| 340 // Enable multiple file selection if we need to. | 340 // Enable multiple file selection if we need to. |
| 341 if (multiple_selection) { | 341 if (multiple_selection) { |
| 342 command_line->AppendSwitch("--multiple"); | 342 command_line->AppendSwitch("--multiple"); |
| 343 command_line->AppendSwitch("--separate-output"); | 343 command_line->AppendSwitch("--separate-output"); |
| 344 } | 344 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 } | 507 } |
| 508 | 508 |
| 509 if (filenames_fp.empty()) { | 509 if (filenames_fp.empty()) { |
| 510 FileNotSelected(params); | 510 FileNotSelected(params); |
| 511 return; | 511 return; |
| 512 } | 512 } |
| 513 MultiFilesSelected(filenames_fp, params); | 513 MultiFilesSelected(filenames_fp, params); |
| 514 } | 514 } |
| 515 | 515 |
| 516 } // namespace libgtk2ui | 516 } // namespace libgtk2ui |
| OLD | NEW |