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