| 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 | 6 |
| 7 if (is_android) { | 7 if (is_android) { |
| 8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
| 9 import("//build/config/android/rules.gni") | 9 import("//build/config/android/rules.gni") |
| 10 } | 10 } |
| 11 | 11 |
| 12 component("base") { | 12 component("base") { |
| 13 output_name = "ui_base" | 13 output_name = "ui_base" |
| 14 sources = [ | 14 sources = [ |
| 15 "android/system_ui_resource_manager.h", | 15 "android/system_ui_resource_manager.h", |
| 16 "android/ui_base_jni_registrar.cc", | 16 "android/ui_base_jni_registrar.cc", |
| 17 "android/ui_base_jni_registrar.h", | 17 "android/ui_base_jni_registrar.h", |
| 18 "android/view_android.cc", | 18 "android/view_android.cc", |
| 19 "android/view_android.h", | 19 "android/view_android.h", |
| 20 "android/window_android.cc", | 20 "android/window_android.cc", |
| 21 "android/window_android.h", | 21 "android/window_android.h", |
| 22 "android/window_android_compositor.h", | 22 "android/window_android_compositor.h", |
| 23 "android/window_android_observer.h", | 23 "android/window_android_observer.h", |
| 24 "cursor/cursor.h", | 24 "cursor/cursor.h", |
| 25 "hit_test.h", | 25 "hit_test.h", |
| 26 "touch/touch_device.h", | |
| 27 "touch/touch_enabled.cc", | |
| 28 "touch/touch_enabled.h", | |
| 29 "ui_base_export.h", | 26 "ui_base_export.h", |
| 30 "ui_base_paths.cc", | |
| 31 "ui_base_paths.h", | |
| 32 "ui_base_switches.cc", | 27 "ui_base_switches.cc", |
| 33 "ui_base_switches.h", | 28 "ui_base_switches.h", |
| 34 "ui_base_switches_util.cc", | |
| 35 "ui_base_switches_util.h", | |
| 36 "ui_base_types.cc", | |
| 37 "ui_base_types.h", | |
| 38 "view_prop.cc", | 29 "view_prop.cc", |
| 39 "view_prop.h", | 30 "view_prop.h", |
| 40 "win/accessibility_ids_win.h", | 31 "win/accessibility_ids_win.h", |
| 41 "win/accessibility_misc_utils.cc", | 32 "win/accessibility_misc_utils.cc", |
| 42 "win/accessibility_misc_utils.h", | 33 "win/accessibility_misc_utils.h", |
| 43 "win/atl_module.h", | 34 "win/atl_module.h", |
| 44 "win/foreground_helper.cc", | 35 "win/foreground_helper.cc", |
| 45 "win/foreground_helper.h", | 36 "win/foreground_helper.h", |
| 46 "win/hidden_window.cc", | 37 "win/hidden_window.cc", |
| 47 "win/hidden_window.h", | 38 "win/hidden_window.h", |
| (...skipping 12 matching lines...) Expand all Loading... |
| 60 "win/scoped_ole_initializer.cc", | 51 "win/scoped_ole_initializer.cc", |
| 61 "win/scoped_ole_initializer.h", | 52 "win/scoped_ole_initializer.h", |
| 62 "win/shell.cc", | 53 "win/shell.cc", |
| 63 "win/shell.h", | 54 "win/shell.h", |
| 64 "win/touch_input.cc", | 55 "win/touch_input.cc", |
| 65 "win/touch_input.h", | 56 "win/touch_input.h", |
| 66 "win/window_event_target.cc", | 57 "win/window_event_target.cc", |
| 67 "win/window_event_target.h", | 58 "win/window_event_target.h", |
| 68 ] | 59 ] |
| 69 | 60 |
| 70 if (is_win) { | |
| 71 sources += [ "touch/touch_device_win.cc" ] | |
| 72 } else if (is_android) { | |
| 73 sources += [ "touch/touch_device_android.cc" ] | |
| 74 } else if (use_x11) { | |
| 75 sources += [ "touch/touch_device_x11.cc" ] | |
| 76 } else { | |
| 77 # Empty implementation for all other cases. | |
| 78 sources += [ "touch/touch_device.cc" ] | |
| 79 } | |
| 80 | |
| 81 defines = [ "UI_BASE_IMPLEMENTATION" ] | 61 defines = [ "UI_BASE_IMPLEMENTATION" ] |
| 82 | 62 |
| 83 public_deps = [ | 63 public_deps = [ |
| 84 "//base", | 64 "//base", |
| 85 "//skia", | 65 "//skia", |
| 86 "//ui/events", | 66 "//ui/events", |
| 87 "//ui/events/platform", | 67 "//ui/events/platform", |
| 88 "//ui/events:events_base", | 68 "//ui/events:events_base", |
| 89 "//ui/gfx", | 69 "//ui/gfx", |
| 90 "//ui/gfx/geometry", | 70 "//ui/gfx/geometry", |
| 91 ] | 71 ] |
| 92 deps = [ | 72 deps = [ |
| 93 "//base/third_party/dynamic_annotations", | 73 "//base/third_party/dynamic_annotations", |
| 94 "//base:base_static", | 74 "//base:base_static", |
| 95 "//base:i18n", | 75 "//base:i18n", |
| 96 "//net", | 76 "//net", |
| 97 "//third_party/icu", | 77 "//third_party/icu", |
| 98 "//url", | 78 "//url", |
| 99 ] | 79 ] |
| 100 | 80 |
| 101 if (use_x11) { | 81 if (use_x11) { |
| 102 sources += [ | 82 sources += [ |
| 103 "x/x11_foreign_window_manager.cc", | |
| 104 "x/x11_foreign_window_manager.h", | |
| 105 "x/x11_menu_list.cc", | |
| 106 "x/x11_menu_list.h", | |
| 107 "x/x11_util.cc", | 83 "x/x11_util.cc", |
| 108 "x/x11_util.h", | 84 "x/x11_util.h", |
| 109 "x/x11_util_internal.h", | 85 "x/x11_util_internal.h", |
| 110 ] | 86 ] |
| 111 deps += [ "//ui/gfx/x" ] | 87 deps += [ "//ui/gfx/x" ] |
| 112 } | 88 } |
| 113 | 89 |
| 114 if (is_linux) { | 90 if (is_linux) { |
| 115 configs += [ | 91 configs += [ |
| 116 "//build/config/linux:fontconfig", | 92 "//build/config/linux:fontconfig", |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (use_x11) { | 135 if (use_x11) { |
| 160 #'all_dependent_settings': { | 136 #'all_dependent_settings': { |
| 161 #'ldflags': [ | 137 #'ldflags': [ |
| 162 #'-L<(PRODUCT_DIR)', | 138 #'-L<(PRODUCT_DIR)', |
| 163 #], | 139 #], |
| 164 #}, | 140 #}, |
| 165 configs += [ "//build/config/linux:x11" ] | 141 configs += [ "//build/config/linux:x11" ] |
| 166 } | 142 } |
| 167 | 143 |
| 168 if (is_android) { | 144 if (is_android) { |
| 169 sources -= [ "ui_base_types.cc" ] | |
| 170 | |
| 171 deps += [ ":ui_base_jni_headers" ] | 145 deps += [ ":ui_base_jni_headers" ] |
| 172 | 146 |
| 173 libs += [ "jnigraphics" ] | 147 libs += [ "jnigraphics" ] |
| 174 } | 148 } |
| 175 | 149 |
| 176 if (is_android && is_android_webview_build) { | 150 if (is_android && is_android_webview_build) { |
| 177 deps += [ | 151 deps += [ |
| 178 #TODO(GYP): port this component to GN. | 152 #TODO(GYP): port this component to GN. |
| 179 #"//ui/android:ui_java", | 153 #"//ui/android:ui_java", |
| 180 ] | 154 ] |
| 181 } | 155 } |
| 182 } | 156 } |
| 183 | 157 |
| 184 if (is_android) { | 158 if (is_android) { |
| 185 generate_jni("ui_base_jni_headers") { | 159 generate_jni("ui_base_jni_headers") { |
| 186 sources = [ | 160 sources = [ |
| 187 "../android/java/src/org/chromium/ui/base/DeviceFormFactor.java", | 161 "../android/java/src/org/chromium/ui/base/DeviceFormFactor.java", |
| 188 "../android/java/src/org/chromium/ui/base/SelectFileDialog.java", | 162 "../android/java/src/org/chromium/ui/base/SelectFileDialog.java", |
| 189 "../android/java/src/org/chromium/ui/base/TouchDevice.java", | |
| 190 "../android/java/src/org/chromium/ui/base/ViewAndroid.java", | 163 "../android/java/src/org/chromium/ui/base/ViewAndroid.java", |
| 191 "../android/java/src/org/chromium/ui/base/WindowAndroid.java", | 164 "../android/java/src/org/chromium/ui/base/WindowAndroid.java", |
| 192 ] | 165 ] |
| 193 jni_package = "base" | 166 jni_package = "base" |
| 194 } | 167 } |
| 195 } | 168 } |
| 196 | 169 |
| 197 if (false) { | 170 if (false) { |
| 198 # TODO(GYP): Make this work on Android and reenable it. | 171 # TODO(GYP): Make this work on Android and reenable it. |
| 199 if (!is_android) { | 172 if (!is_android) { |
| 200 # TODO(tfarina): Rename this target to ui_base_unittests. | 173 # TODO(tfarina): Rename this target to ui_base_unittests. |
| 201 # In order to do this we will need to keep this target, add a dummy | 174 # In order to do this we will need to keep this target, add a dummy |
| 202 # ui_base_unittests target that just points to ui_unittests, change | 175 # ui_base_unittests target that just points to ui_unittests, change |
| 203 # buildbot code to reference the new 'ui_base_unittests' target. | 176 # buildbot code to reference the new 'ui_base_unittests' target. |
| 204 # After buildbot is updated, we can make the changes in Chromium and | 177 # After buildbot is updated, we can make the changes in Chromium and |
| 205 # remove 'ui_unittests' target. crbug.com/331829 | 178 # remove 'ui_unittests' target. crbug.com/331829 |
| 206 test("ui_unittests") { | 179 test("ui_unittests") { |
| 207 sources = [ | 180 sources = [ |
| 208 "layout_unittest.cc", | |
| 209 "test/run_all_unittests.cc", | 181 "test/run_all_unittests.cc", |
| 210 ] | 182 ] |
| 211 | 183 |
| 212 sources += [ | 184 sources += [ |
| 213 "accelerators/accelerator_manager_unittest.cc", | |
| 214 "accelerators/menu_label_accelerator_util_linux_unittest.cc", | |
| 215 "test/data/resource.h", | 185 "test/data/resource.h", |
| 216 "view_prop_unittest.cc", | 186 "view_prop_unittest.cc", |
| 217 ] | 187 ] |
| 218 | 188 |
| 219 deps = [ | 189 deps = [ |
| 220 "//base", | 190 "//base", |
| 221 "//base/allocator", | 191 "//base/allocator", |
| 222 "//base/test:test_support", | 192 "//base/test:test_support", |
| 223 "//net", | 193 "//net", |
| 224 "//skia", | 194 "//skia", |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 "//chromeos", | 259 "//chromeos", |
| 290 "//ui/aura:test_support", | 260 "//ui/aura:test_support", |
| 291 "//ui/events:gesture_detection", | 261 "//ui/events:gesture_detection", |
| 292 "//ui/chromeos:ui_chromeos", | 262 "//ui/chromeos:ui_chromeos", |
| 293 ] | 263 ] |
| 294 } | 264 } |
| 295 } | 265 } |
| 296 } | 266 } |
| 297 } | 267 } |
| 298 # TODO(GYP) Mac (ui_unittest_bundle) and Android (ui_unittests_apk). | 268 # TODO(GYP) Mac (ui_unittest_bundle) and Android (ui_unittests_apk). |
| OLD | NEW |