OLD | NEW |
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 "content/public/browser/browser_thread.h" | 5 #include <gdk/gdkx.h> |
| 6 #include <gtk/gtk.h> |
6 | 7 |
7 #include <set> | 8 #include <set> |
8 | 9 |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/nix/mime_util_xdg.h" | 14 #include "base/nix/mime_util_xdg.h" |
14 #include "base/nix/xdg_util.h" | 15 #include "base/nix/xdg_util.h" |
15 #include "base/process_util.h" | 16 #include "base/process_util.h" |
16 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
17 #include "base/string_util.h" | 18 #include "base/string_util.h" |
18 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/ui/gtk/select_file_dialog_impl.h" | 20 #include "chrome/browser/ui/gtk/select_file_dialog_impl.h" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
21 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
22 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
23 | 24 |
24 // These conflict with base/tracked_objects.h, so need to come last. | |
25 #include <gdk/gdkx.h> | |
26 #include <gtk/gtk.h> | |
27 | |
28 using content::BrowserThread; | 25 using content::BrowserThread; |
29 | 26 |
30 namespace { | 27 namespace { |
31 | 28 |
32 std::string GetTitle(const std::string& title, int message_id) { | 29 std::string GetTitle(const std::string& title, int message_id) { |
33 return title.empty() ? l10n_util::GetStringUTF8(message_id) : title; | 30 return title.empty() ? l10n_util::GetStringUTF8(message_id) : title; |
34 } | 31 } |
35 | 32 |
36 } // namespace | 33 } // namespace |
37 | 34 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 continue; | 409 continue; |
413 filenames_fp.push_back(path); | 410 filenames_fp.push_back(path); |
414 } | 411 } |
415 | 412 |
416 if (filenames_fp.empty()) { | 413 if (filenames_fp.empty()) { |
417 FileNotSelected(params); | 414 FileNotSelected(params); |
418 return; | 415 return; |
419 } | 416 } |
420 MultiFilesSelected(filenames_fp, params); | 417 MultiFilesSelected(filenames_fp, params); |
421 } | 418 } |
OLD | NEW |