| 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 | 7 |
| 8 if (is_android) { | 8 if (is_android) { |
| 9 import("//build/config/android/rules.gni") | 9 import("//build/config/android/rules.gni") |
| 10 } | 10 } |
| 11 | 11 |
| 12 component("touch_selection") { | 12 component("touch_selection") { |
| 13 output_name = "ui_touch_selection" | 13 output_name = "ui_touch_selection" |
| 14 | 14 |
| 15 sources = [ | 15 sources = [ |
| 16 "selection_event_type.h", | 16 "selection_event_type.h", |
| 17 "touch_handle.cc", | 17 "touch_handle.cc", |
| 18 "touch_handle.h", | 18 "touch_handle.h", |
| 19 "touch_handle_drawable_aura.cc", |
| 20 "touch_handle_drawable_aura.h", |
| 19 "touch_handle_orientation.h", | 21 "touch_handle_orientation.h", |
| 20 "touch_selection_controller.cc", | 22 "touch_selection_controller.cc", |
| 21 "touch_selection_controller.h", | 23 "touch_selection_controller.h", |
| 24 "touch_selection_controller_android.cc", |
| 25 "touch_selection_controller_android.h", |
| 26 "touch_selection_controller_aura.cc", |
| 27 "touch_selection_controller_aura.h", |
| 28 "touch_selection_menu_runner.cc", |
| 29 "touch_selection_menu_runner.h", |
| 22 "ui_touch_selection_export.h", | 30 "ui_touch_selection_export.h", |
| 23 ] | 31 ] |
| 24 | 32 |
| 25 defines = [ "UI_TOUCH_SELECTION_IMPLEMENTATION" ] | 33 defines = [ "UI_TOUCH_SELECTION_IMPLEMENTATION" ] |
| 26 | 34 |
| 27 deps = [ | 35 deps = [ |
| 28 "//base:base", | 36 "//base:base", |
| 37 "//ui/aura:aura", |
| 38 "//ui/aura_extra:aura_extra", |
| 29 "//ui/base:base", | 39 "//ui/base:base", |
| 40 "//ui/compositor:compositor", |
| 30 "//ui/events:events", | 41 "//ui/events:events", |
| 31 "//ui/events:gesture_detection", | 42 "//ui/events:gesture_detection", |
| 43 "//ui/gfx:gfx", |
| 32 "//ui/gfx/geometry:geometry", | 44 "//ui/gfx/geometry:geometry", |
| 33 ] | 45 ] |
| 46 |
| 47 if (!use_aura) { |
| 48 deps -= [ |
| 49 "//ui/aura:aura", |
| 50 "//ui/aura_extra:aura_extra", |
| 51 "//ui/compositor:compositor", |
| 52 "//ui/gfx:gfx", |
| 53 ] |
| 54 sources -= [ |
| 55 "touch_handle_drawable_aura.cc", |
| 56 "touch_handle_drawable_aura.h", |
| 57 "touch_selection_controller_aura.cc", |
| 58 "touch_selection_controller_aura.h", |
| 59 "touch_selection_menu_runner.cc", |
| 60 "touch_selection_menu_runner.h", |
| 61 ] |
| 62 } |
| 34 } | 63 } |
| 35 | 64 |
| 36 test("ui_touch_selection_unittests") { | 65 test("ui_touch_selection_unittests") { |
| 37 sources = [ | 66 sources = [ |
| 67 "run_all_unittests.cc", |
| 38 "touch_handle_unittest.cc", | 68 "touch_handle_unittest.cc", |
| 69 "touch_selection_controller_aura_test_api.cc", |
| 70 "touch_selection_controller_aura_test_api.h", |
| 71 "touch_selection_controller_aura_unittest.cc", |
| 39 "touch_selection_controller_unittest.cc", | 72 "touch_selection_controller_unittest.cc", |
| 40 ] | 73 ] |
| 41 | 74 |
| 42 deps = [ | 75 deps = [ |
| 43 ":touch_selection", | 76 ":touch_selection", |
| 44 "//base/test:run_all_unittests", | |
| 45 "//testing/gmock:gmock", | 77 "//testing/gmock:gmock", |
| 46 "//testing/gtest:gtest", | 78 "//testing/gtest:gtest", |
| 79 "//ui/aura:test_support", |
| 47 "//ui/base:base", | 80 "//ui/base:base", |
| 48 "//ui/events:test_support", | 81 "//ui/events:test_support", |
| 49 "//ui/gfx:gfx", | 82 "//ui/gfx:gfx", |
| 50 "//ui/gfx:test_support", | 83 "//ui/gfx:test_support", |
| 84 "//ui/resources:ui_test_pak", |
| 51 ] | 85 ] |
| 86 |
| 87 if (!use_aura) { |
| 88 deps -= [ |
| 89 "//ui/aura:test_support", |
| 90 "//ui/resources:ui_test_pak", |
| 91 ] |
| 92 sources -= [ |
| 93 "touch_selection_controller_aura_test_api.cc", |
| 94 "touch_selection_controller_aura_test_api.h", |
| 95 "touch_selection_controller_aura_unittest.cc", |
| 96 ] |
| 97 } |
| 52 } | 98 } |
| 53 | 99 |
| 54 if (is_android) { | 100 if (is_android) { |
| 55 java_cpp_enum("ui_touch_selection_enums_srcjar") { | 101 java_cpp_enum("ui_touch_selection_enums_srcjar") { |
| 56 sources = [ | 102 sources = [ |
| 57 "selection_event_type.h", | 103 "selection_event_type.h", |
| 58 ] | 104 ] |
| 59 outputs = [ | 105 outputs = [ |
| 60 "org/chromium/ui/touch_selection/SelectionEventType.java", | 106 "org/chromium/ui/touch_selection/SelectionEventType.java", |
| 61 ] | 107 ] |
| 62 } | 108 } |
| 63 java_cpp_enum("ui_touch_handle_orientation_srcjar") { | 109 java_cpp_enum("ui_touch_handle_orientation_srcjar") { |
| 64 sources = [ | 110 sources = [ |
| 65 "touch_handle_orientation.h", | 111 "touch_handle_orientation.h", |
| 66 ] | 112 ] |
| 67 outputs = [ | 113 outputs = [ |
| 68 "org/chromium/ui/touch_selection/TouchHandleOrientation.java", | 114 "org/chromium/ui/touch_selection/TouchHandleOrientation.java", |
| 69 ] | 115 ] |
| 70 } | 116 } |
| 71 } | 117 } |
| OLD | NEW |