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 # TODO(GYP) this is a placeholder so that targets that depend on ash can get | 5 import("//build/config/features.gni") |
6 # the resources generated. | 6 import("//build/config/ui.gni") |
7 group("ash") { | 7 |
| 8 gypi_values = exec_script( |
| 9 "//build/gypi_to_gn.py", |
| 10 [ rebase_path("ash.gyp") ], |
| 11 "scope", |
| 12 [ "ash.gyp" ]) |
| 13 |
| 14 component("ash") { |
| 15 sources = gypi_values.ash_sources |
| 16 |
| 17 defines = [ "ASH_IMPLEMENTATION" ] |
| 18 |
8 deps = [ | 19 deps = [ |
9 "//ash/resources", | 20 "//ash/resources", |
10 "//ash/strings", | 21 "//ash/strings", |
11 ] | 22 "//base", |
12 } | 23 "//base:i18n", |
| 24 "//base/third_party/dynamic_annotations", |
| 25 "//cc", |
| 26 "//content/public/browser", |
| 27 "//net", |
| 28 "//skia", |
| 29 "//third_party/icu", |
| 30 "//ui/accessibility", |
| 31 "//ui/aura", |
| 32 "//ui/base", |
| 33 "//ui/compositor", |
| 34 "//ui/events", |
| 35 "//ui/events:events_base", |
| 36 "//ui/gfx", |
| 37 "//ui/gfx/geometry", |
| 38 "//ui/keyboard", |
| 39 "//ui/resources", |
| 40 "//ui/strings", |
| 41 "//ui/web_dialogs", |
| 42 "//ui/wm", |
| 43 "//url", |
| 44 #'../components/components.gyp:user_manager', TODO(GYP) |
| 45 #'../media/media.gyp:media', TODO(GYP) |
| 46 #"//ui/app_list", TODO(GYP) |
| 47 #'../ui/message_center/message_center.gyp:message_center', TODO(GYP) |
| 48 #'../ui/views/controls/webview/webview.gyp:webview', TODO(GYP) |
| 49 #'../ui/views/views.gyp:views' TODO(GYP), |
| 50 ] |
| 51 |
| 52 forward_dependent_configs_from = [ |
| 53 "//ash/resources", |
| 54 "//ash/strings", |
| 55 ] |
| 56 |
| 57 if (is_win) { |
| 58 sources -= [ |
| 59 "host/window_tree_host_factory.cc", |
| 60 "sticky_keys/sticky_keys_controller.cc", |
| 61 "sticky_keys/sticky_keys_controller.h", |
| 62 ] |
| 63 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 64 cflags = [ "/wd4267" ] |
| 65 } |
| 66 |
| 67 if (use_x11) { |
| 68 configs += [ |
| 69 "//build/config/linux:xfixes", |
| 70 ] |
| 71 } else { |
| 72 sources -= [ |
| 73 "accelerators/key_hold_detector.cc", |
| 74 "accelerators/key_hold_detector.h", |
| 75 "accelerators/magnifier_key_scroller.cc", |
| 76 "accelerators/magnifier_key_scroller.h", |
| 77 "accelerators/spoken_feedback_toggler.cc", |
| 78 "accelerators/spoken_feedback_toggler.h", |
| 79 "touch/touch_transformer_controller.cc", |
| 80 "touch/touch_transformer_controller.h", |
| 81 ] |
| 82 } |
| 83 |
| 84 if (is_chromeos) { |
| 85 deps += [ |
| 86 #'../chromeos/chromeos.gyp:chromeos', TODO(GYP) |
| 87 # Ash #includes power_supply_properties.pb.h directly. |
| 88 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP) |
| 89 #'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP) |
| 90 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources', TODO(GYP) |
| 91 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings', TODO(GYP) |
| 92 #'../ui/chromeos/ui_chromeos.gyp:ui_chromeos', TODO(GYP) |
| 93 #'../ui/display/display.gyp:display', TODO(GYP) |
| 94 #'../ui/display/display.gyp:display_util', TODO(GYP) |
| 95 ] |
| 96 } else { |
| 97 sources -= [ |
| 98 "display/display_configurator_animation.cc", |
| 99 "display/display_configurator_animation.h", |
| 100 "display/resolution_notification_controller.cc", |
| 101 "display/resolution_notification_controller.h", |
| 102 "system/tray/media_security/media_capture_observer.h", |
| 103 "system/tray/media_security/multi_profile_media_tray_item.cc", |
| 104 "system/tray/media_security/multi_profile_media_tray_item.h", |
| 105 "touch/touch_transformer_controller.cc", |
| 106 "touch/touch_transformer_controller.h", |
| 107 ] |
| 108 } |
| 109 } |
| 110 |
| 111 component("ash_with_content") { |
| 112 sources = [ |
| 113 "content_support/ash_with_content_export.h", |
| 114 "content_support/gpu_support_impl.cc", |
| 115 "content_support/gpu_support_impl.h", |
| 116 "screensaver/screensaver_view.cc", |
| 117 "screensaver/screensaver_view.h", |
| 118 "keyboard_overlay/keyboard_overlay_delegate.cc", |
| 119 "keyboard_overlay/keyboard_overlay_delegate.h", |
| 120 "keyboard_overlay/keyboard_overlay_view.cc", |
| 121 "keyboard_overlay/keyboard_overlay_view.h", |
| 122 ] |
| 123 |
| 124 defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ] |
| 125 |
| 126 deps = [ |
| 127 ":ash", |
| 128 "//base", |
| 129 "//base/third_party/dynamic_annotations", |
| 130 "//content/public/browser", |
| 131 "//ipc", |
| 132 "//skia", |
| 133 "//ui/aura", |
| 134 "//ui/base", |
| 135 "//ui/compositor", |
| 136 "//ui/events", |
| 137 "//ui/gfx", |
| 138 "//ui/gfx/geometry", |
| 139 "//ui/resources", |
| 140 "//ui/strings", |
| 141 "//ui/web_dialogs", |
| 142 "//url", |
| 143 #'../ui/views/controls/webview/webview.gyp:webview', TODO(GYP) |
| 144 #'../ui/views/views.gyp:views', TODO(GYP) |
| 145 ] |
| 146 |
| 147 forward_dependent_configs_from = [ |
| 148 ":ash", |
| 149 ] |
| 150 } |
| 151 |
| 152 static_library("test_support") { |
| 153 sources = gypi_values.ash_test_support_sources |
| 154 |
| 155 deps = [ |
| 156 ":ash", |
| 157 "//ash/resources", |
| 158 "//skia", |
| 159 "//testing/gtest", |
| 160 "//ui/accessibility", |
| 161 #"//ui/app_list", TODO(GYP) |
| 162 #"//ui/views", TODO(GYP) |
| 163 ] |
| 164 |
| 165 if (is_win) { |
| 166 sources += [ |
| 167 "test/test_metro_viewer_process_host.cc", |
| 168 "test/test_metro_viewer_process_host.h", |
| 169 ] |
| 170 deps += [ |
| 171 "//ipc", |
| 172 #'../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', TODO(GYP) |
| 173 #'../win8/win8.gyp:metro_viewer', TODO(GYP) |
| 174 #'../win8/win8.gyp:test_support_win8', TODO(GYP) |
| 175 #'../win8/win8_tests.gyp:test_registrar', TODO(GYP) |
| 176 ] |
| 177 } |
| 178 } |
| 179 |
| 180 static_library("ash_shell_lib") { |
| 181 sources = gypi_values.ash_shell_lib_sources |
| 182 |
| 183 deps = [ |
| 184 ":ash", |
| 185 ":ash_with_content", |
| 186 ":test_support", |
| 187 "//ash/resources", |
| 188 "//ash/strings", |
| 189 "//base", |
| 190 "//base:i18n", |
| 191 #"//chrome:packed_resources", TODO(GYP) |
| 192 "//content", |
| 193 "//skia", |
| 194 "//third_party/icu", |
| 195 #"//ui/app_list", TODO(GYP) |
| 196 "//ui/aura", |
| 197 "//ui/base", |
| 198 "//ui/compositor", |
| 199 "//ui/events", |
| 200 "//ui/gfx", |
| 201 "//ui/gfx/geometry", |
| 202 "//ui/keyboard", |
| 203 #"//ui/message_center", TODO(GYP) |
| 204 "//ui/resources", |
| 205 #'../content/content_shell_and_tests.gyp:content_shell_lib', TODO(GYP) |
| 206 #'../ui/views/examples/examples.gyp:views_examples_lib', TODO(GYP) |
| 207 #'../ui/views/examples/examples.gyp:views_examples_with_content_lib', TODO(
GYP) |
| 208 #'../ui/views/views.gyp:views', TODO(GYP) |
| 209 #'../ui/views/views.gyp:views_test_support', TODO(GYP) |
| 210 ] |
| 211 } |
| 212 |
| 213 if (false) { # TODO(GYP) enable ash shell and unit tests when they link. |
| 214 |
| 215 test("ash_unittests") { |
| 216 sources = gypi_values.ash_unittests_sources |
| 217 |
| 218 deps = [ |
| 219 ":ash", |
| 220 ":ash_with_content", |
| 221 ":test_support", |
| 222 "//ash/resources", |
| 223 "//ash/strings", |
| 224 "//base", |
| 225 "//base/allocator", |
| 226 "//base/test:test_support", |
| 227 "//content/public/browser", |
| 228 "//skia", |
| 229 "//testing/gtest", |
| 230 "//third_party/icu", |
| 231 "//ui/accessibility", |
| 232 "//ui/aura", |
| 233 "//ui/aura:test_support", |
| 234 "//ui/base", |
| 235 "//ui/base:test_support", |
| 236 "//ui/compositor", |
| 237 "//ui/compositor:test_support", |
| 238 "//ui/events", |
| 239 "//ui/events:test_support", |
| 240 "//ui/events:gesture_detection", |
| 241 "//ui/gfx", |
| 242 "//ui/gfx/geometry", |
| 243 "//ui/keyboard", |
| 244 "//ui/resources", |
| 245 "//ui/web_dialogs", |
| 246 "//ui/wm", |
| 247 "//url", |
| 248 #'../components/components.gyp:user_manager', TODO(GYP) |
| 249 #'../content/content_shell_and_tests.gyp:test_support_content', TODO(GYP) |
| 250 #'../ui/message_center/message_center.gyp:message_center', TODO(GYP) |
| 251 #'../ui/message_center/message_center.gyp:message_center_test_support', TOD
O(GYP) |
| 252 #'../ui/views/controls/webview/webview_tests.gyp:webview_test_support', TOD
O(GYP) |
| 253 #'../ui/views/views.gyp:views', TODO(GYP) |
| 254 #'../ui/views/views.gyp:views_test_support', TODO(GYP) |
| 255 ] |
| 256 |
| 257 if (!is_chromeos) { |
| 258 sources -= [ |
| 259 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906 |
| 260 "focus_cycler_unittest.cc", |
| 261 # All tests for multiple displays: not supported on Windows Ash. |
| 262 "accelerators/nested_dispatcher_controller_unittest.cc", |
| 263 "wm/drag_window_resizer_unittest.cc", |
| 264 # Can't resize on Windows Ash. http://crbug.com/165962 |
| 265 "ash_root_window_transformer_unittest.cc", |
| 266 "magnifier/magnification_controller_unittest.cc", |
| 267 "wm/workspace/workspace_window_resizer_unittest.cc", |
| 268 "sticky_keys/sticky_keys_overlay_unittest.cc", |
| 269 "sticky_keys/sticky_keys_unittest.cc", |
| 270 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc", |
| 271 "autoclick/autoclick_unittest.cc", |
| 272 ] |
| 273 source += [ |
| 274 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO
(GYP) |
| 275 ] |
| 276 } |
| 277 |
| 278 if (is_win) { |
| 279 cflags = [ "/wd4267" ] |
| 280 } |
| 281 |
| 282 if (!use_x11) { |
| 283 sources -= [ |
| 284 "accelerators/magnifier_key_scroller_unittest.cc", |
| 285 "accelerators/spoken_feedback_toggler_unittest.cc", |
| 286 "touch/touch_transformer_controller_unittest.cc", |
| 287 ] |
| 288 } |
| 289 if (is_chromeos) { |
| 290 sources += [ "first_run/first_run_helper_unittest.cc" ] |
| 291 deps += [ |
| 292 #'../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', TODO(GYP
) |
| 293 #'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP) |
| 294 #'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP) |
| 295 #'../ui/display/display.gyp:display', TODO(GYP) |
| 296 #'../ui/display/display.gyp:display_test_util', TODO(GYP) |
| 297 #'../ui/display/display.gyp:display_types', TODO(GYP) |
| 298 ] |
| 299 } else { |
| 300 sources -= [ |
| 301 "display/resolution_notification_controller_unittest.cc", |
| 302 "touch/touch_transformer_controller_unittest.cc", |
| 303 ] |
| 304 } |
| 305 |
| 306 # TODO(GYP) is this necessary? |
| 307 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', { |
| 308 # ldflags = "-rdynamic" |
| 309 |
| 310 if (use_ozone) { |
| 311 sources -= [ |
| 312 "sticky_keys/sticky_keys_unittest.cc", # crbug.com/354035 |
| 313 ] |
| 314 } |
| 315 } |
| 316 |
| 317 executable("ash_shell") { |
| 318 sources = [ |
| 319 "shell/shell_main.cc", |
| 320 ] |
| 321 |
| 322 deps = [ |
| 323 ":ash_shell_lib", |
| 324 #'../components/components.gyp:user_manager', TODO(GYP) |
| 325 ] |
| 326 |
| 327 if (is_win) { |
| 328 configs -= [ "//build/config/win:console" ] |
| 329 configs += [ "//build/config/win:windowed" ] |
| 330 deps += [ |
| 331 "//sandbox", |
| 332 ] |
| 333 } |
| 334 |
| 335 if (is_chromeos) { |
| 336 deps += [ |
| 337 "../device/bluetooth/bluetooth.gyp:device_bluetooth", |
| 338 ] |
| 339 } |
| 340 } |
| 341 |
| 342 test("ash_shell_unittests") { |
| 343 sources = [ |
| 344 "shell/window_watcher_unittest.cc", |
| 345 "test/ash_unittests.cc", |
| 346 ] |
| 347 |
| 348 deps = [ |
| 349 "//base/test:test_support", |
| 350 "//skia", |
| 351 "//testing/gtest", |
| 352 "//ui/aaccessibility", |
| 353 #'../components/components.gyp:user_manager', TODO(GYP) |
| 354 #'../content/content_shell_and_tests.gyp:test_support_content', TODO(GYP) |
| 355 ] |
| 356 |
| 357 if (is_chromeos) { |
| 358 #deps += [ "//ui/display" ] TODO(GYP) |
| 359 } |
| 360 } |
| 361 |
| 362 } # if false |
OLD | NEW |