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 3 # found in the LICENSE file. 4 5 import("//build/config/ui.gni") 6 if (is_android) { 7 import("//build/config/android/config.gni") 8 } 9 10 component("shell_dialogs") { 11 sources = [ 12 "android/shell_dialogs_jni_registrar.cc", 13 "android/shell_dialogs_jni_registrar.h", 14 "base_shell_dialog.cc", 15 "base_shell_dialog.h", 16 "base_shell_dialog_win.cc", 17 "base_shell_dialog_win.h", 18 "linux_shell_dialog.cc", 19 "linux_shell_dialog.h", 20 "select_file_dialog.cc", 21 "select_file_dialog.h", 22 "select_file_dialog_android.cc", 23 "select_file_dialog_android.h", 24 "select_file_dialog_factory.cc", 25 "select_file_dialog_factory.h", 26 "select_file_dialog_mac.h", 27 "select_file_dialog_mac.mm", 28 "select_file_dialog_win.cc", 29 "select_file_dialog_win.h", 30 "select_file_policy.cc", 31 "select_file_policy.h", 32 "selected_file_info.cc", 33 "selected_file_info.h", 34 ] 35 36 defines = [ "SHELL_DIALOGS_IMPLEMENTATION" ] 37 38 deps = [ 39 "//base", 40 "//base:i18n", 41 "//skia", 42 "//ui/base", 43 "//ui/strings", 44 ] 45 46 if (use_aura) { 47 if (is_mac) { 48 # Will be automatically filtered out on non-Mac. 49 sources -= [ "select_file_dialog_mac.mm" ] 50 } 51 deps += [ "//ui/aura" ] 52 } 53 54 if (is_android) { 55 deps += [ "//ui/base:ui_base_jni_headers" ] 56 include_dirs = [ "$root_gen_dir/ui" ] 57 libs = [ "jnigraphics" ] 58 59 if (!is_android_webview_build) { 60 #deps += [ '../android/ui_android.gyp:ui_java' ] TODO(GYP) 61 } 62 } 63 64 if (is_win) { 65 #deps += [ '../../win8/win8.gyp:metro_viewer' ] TODO(GYP) 66 } 67 } 68 69 test("shell_dialogs_unittests") { 70 sources = [ 71 "select_file_dialog_win_unittest.cc", 72 ] 73 74 deps = [ 75 ":shell_dialogs", 76 "//base", 77 "//base/test:test_support", 78 "//base/test:run_all_unittests", 79 "//testing/gtest", 80 ] 81 } 82