Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / shell_dialogs / BUILD.gn
blob3579f17e5d36b788b5af3c9c8f5bb201d99c6baa
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.
5 import("//build/config/ui.gni")
6 if (is_android) {
7   import("//build/config/android/config.gni")
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   ]
36   defines = [ "SHELL_DIALOGS_IMPLEMENTATION" ]
38   deps = [
39     "//base",
40     "//base:i18n",
41     "//skia",
42     "//ui/base",
43     "//ui/strings",
44   ]
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   }
54   if (is_android) {
55     deps += [ "//ui/base:ui_base_jni_headers" ]
56     include_dirs = [ "$root_gen_dir/ui" ]
57     libs = [ "jnigraphics" ]
59     if (!is_android_webview_build) {
60       #deps += [ '../android/ui_android.gyp:ui_java' ]  TODO(GYP)
61     }
62   }
64   if (is_win) {
65     #deps += [ '../../win8/win8.gyp:metro_viewer' ]  TODO(GYP)
66   }
69 # TODO(GYP) enable shell_dialogs_unittests when media is converted.
70 if (false) {
72 test("shell_dialogs_unittests") {
73   sources = [
74     "select_file_dialog_win_unittest.cc",
75   ]
77   deps = [
78     ":shell_dialogs",
79     "//base",
80     "//base/test:test_support",
81     "//base/test:run_all_unittests",
82     "//testing/gtest",
83   ]
86 }  # if false