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

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

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 <set> 5 #include <set>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 params.kdialog_params)); 292 params.kdialog_params));
293 } 293 }
294 294
295 void SelectFileDialogImplKDE::GetKDialogCommandLine(const std::string& type, 295 void SelectFileDialogImplKDE::GetKDialogCommandLine(const std::string& type,
296 const std::string& title, const base::FilePath& path, 296 const std::string& title, const base::FilePath& path,
297 gfx::NativeWindow parent, bool file_operation, bool multiple_selection, 297 gfx::NativeWindow parent, bool file_operation, bool multiple_selection,
298 CommandLine* command_line) { 298 CommandLine* command_line) {
299 CHECK(command_line); 299 CHECK(command_line);
300 300
301 // Attach to the current Chrome window. 301 // Attach to the current Chrome window.
302 int window_id = parent->GetDispatcher()->host()->GetAcceleratedWidget(); 302 int window_id = parent->GetHost()->GetAcceleratedWidget();
303 command_line->AppendSwitchNative( 303 command_line->AppendSwitchNative(
304 desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE3 ? "--embed" : "--attach", 304 desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE3 ? "--embed" : "--attach",
305 base::IntToString(window_id)); 305 base::IntToString(window_id));
306 // Set the correct title for the dialog. 306 // Set the correct title for the dialog.
307 if (!title.empty()) 307 if (!title.empty())
308 command_line->AppendSwitchNative("--title", title); 308 command_line->AppendSwitchNative("--title", title);
309 // Enable multiple file selection if we need to. 309 // Enable multiple file selection if we need to.
310 if (multiple_selection) { 310 if (multiple_selection) {
311 command_line->AppendSwitch("--multiple"); 311 command_line->AppendSwitch("--multiple");
312 command_line->AppendSwitch("--separate-output"); 312 command_line->AppendSwitch("--separate-output");
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 if (filenames_fp.empty()) { 475 if (filenames_fp.empty()) {
476 FileNotSelected(params); 476 FileNotSelected(params);
477 return; 477 return;
478 } 478 }
479 MultiFilesSelected(filenames_fp, params); 479 MultiFilesSelected(filenames_fp, params);
480 } 480 }
481 481
482 } // namespace libgtk2ui 482 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc ('k') | chrome/browser/ui/views/certificate_viewer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698