Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 if (is_android) { | 7 if (is_android) { |
| 8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
| 9 } | 9 } |
| 10 | 10 |
| 11 component("shell_dialogs") { | 11 component("shell_dialogs") { |
| 12 sources = [ | 12 sources = [ |
| 13 "android/shell_dialogs_jni_registrar.cc", | 13 "android/shell_dialogs_jni_registrar.cc", |
| 14 "android/shell_dialogs_jni_registrar.h", | 14 "android/shell_dialogs_jni_registrar.h", |
| 15 "base_shell_dialog.cc", | 15 "base_shell_dialog.cc", |
| 16 "base_shell_dialog.h", | 16 "base_shell_dialog.h", |
| 17 "base_shell_dialog_win.cc", | 17 "base_shell_dialog_win.cc", |
| 18 "base_shell_dialog_win.h", | 18 "base_shell_dialog_win.h", |
| 19 "linux_shell_dialog.cc", | 19 "linux_shell_dialog.cc", |
| 20 "linux_shell_dialog.h", | 20 "linux_shell_dialog.h", |
| 21 "select_file_dialog.cc", | 21 "select_file_dialog.cc", |
| 22 "select_file_dialog.h", | 22 "select_file_dialog.h", |
| 23 "select_file_dialog_android.cc", | 23 "select_file_dialog_android.cc", |
| 24 "select_file_dialog_android.h", | 24 "select_file_dialog_android.h", |
| 25 "select_file_dialog_auraandroid.cc", | |
|
sky
2015/10/15 21:51:47
Can you conditionally include below rather than li
mfomitchev
2015/10/15 22:12:40
Are there some guidelines which explain when it's
brettw
2015/10/20 02:49:26
You should conditionally include now unless for so
mfomitchev
2015/10/20 17:55:44
Thanks Brett! Done.
| |
| 26 "select_file_dialog_auraandroid.h", | |
| 25 "select_file_dialog_factory.cc", | 27 "select_file_dialog_factory.cc", |
| 26 "select_file_dialog_factory.h", | 28 "select_file_dialog_factory.h", |
| 27 "select_file_dialog_mac.h", | 29 "select_file_dialog_mac.h", |
| 28 "select_file_dialog_mac.mm", | 30 "select_file_dialog_mac.mm", |
| 29 "select_file_dialog_win.cc", | 31 "select_file_dialog_win.cc", |
| 30 "select_file_dialog_win.h", | 32 "select_file_dialog_win.h", |
| 31 "select_file_policy.cc", | 33 "select_file_policy.cc", |
| 32 "select_file_policy.h", | 34 "select_file_policy.h", |
| 33 "selected_file_info.cc", | 35 "selected_file_info.cc", |
| 34 "selected_file_info.h", | 36 "selected_file_info.h", |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 45 ] | 47 ] |
| 46 | 48 |
| 47 if (use_aura) { | 49 if (use_aura) { |
| 48 if (is_mac) { | 50 if (is_mac) { |
| 49 # Will be automatically filtered out on non-Mac. | 51 # Will be automatically filtered out on non-Mac. |
| 50 sources -= [ "select_file_dialog_mac.mm" ] | 52 sources -= [ "select_file_dialog_mac.mm" ] |
| 51 } | 53 } |
| 52 deps += [ "//ui/aura" ] | 54 deps += [ "//ui/aura" ] |
| 53 } | 55 } |
| 54 | 56 |
| 55 if (is_android) { | 57 if (is_android && !use_aura) { |
| 56 deps += [ | 58 deps += [ |
| 57 "//ui/android", | 59 "//ui/android", |
| 58 "//ui/android:ui_java", | 60 "//ui/android:ui_java", |
| 59 "//ui/base:ui_base_jni_headers", | 61 "//ui/base:ui_base_jni_headers", |
| 60 ] | 62 ] |
| 61 include_dirs = [ "$root_gen_dir/ui" ] | 63 include_dirs = [ "$root_gen_dir/ui" ] |
| 62 libs = [ "jnigraphics" ] | 64 libs = [ "jnigraphics" ] |
| 63 } | 65 } |
| 64 | 66 |
| 67 if (is_android && use_aura) { | |
| 68 sources -= [ | |
| 69 "android/shell_dialogs_jni_registrar.cc", | |
| 70 "android/shell_dialogs_jni_registrar.h", | |
| 71 "select_file_dialog_android.cc", | |
| 72 "select_file_dialog_android.h", | |
| 73 ] | |
| 74 } else { | |
| 75 sources -= [ | |
| 76 "select_file_dialog_auraandroid.cc", | |
| 77 "select_file_dialog_auraandroid.h", | |
| 78 ] | |
| 79 } | |
| 80 | |
| 65 if (is_win) { | 81 if (is_win) { |
| 66 deps += [ "//win8:metro_viewer" ] | 82 deps += [ "//win8:metro_viewer" ] |
| 67 } | 83 } |
| 68 } | 84 } |
| 69 | 85 |
| 70 test("shell_dialogs_unittests") { | 86 test("shell_dialogs_unittests") { |
| 71 sources = [ | 87 sources = [ |
| 72 "select_file_dialog_win_unittest.cc", | 88 "select_file_dialog_win_unittest.cc", |
| 73 ] | 89 ] |
| 74 | 90 |
| 75 deps = [ | 91 deps = [ |
| 76 ":shell_dialogs", | 92 ":shell_dialogs", |
| 77 "//base", | 93 "//base", |
| 78 "//base/test:test_support", | 94 "//base/test:test_support", |
| 79 "//base/test:run_all_unittests", | 95 "//base/test:run_all_unittests", |
| 80 "//testing/gtest", | 96 "//testing/gtest", |
| 81 ] | 97 ] |
| 82 } | 98 } |
| OLD | NEW |