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_selection_controller.cc", | 21 "touch_selection_controller.cc", |
20 "touch_selection_controller.h", | 22 "touch_selection_controller.h", |
| 23 "touch_selection_controller_aura.cc", |
| 24 "touch_selection_controller_aura.h", |
| 25 "touch_selection_menu_runner.cc", |
| 26 "touch_selection_menu_runner.h", |
21 "ui_touch_selection_export.h", | 27 "ui_touch_selection_export.h", |
22 ] | 28 ] |
23 | 29 |
24 defines = [ "UI_TOUCH_SELECTION_IMPLEMENTATION" ] | 30 defines = [ "UI_TOUCH_SELECTION_IMPLEMENTATION" ] |
25 | 31 |
26 deps = [ | 32 deps = [ |
27 "//base:base", | 33 "//base:base", |
| 34 "//ui/aura:aura", |
28 "//ui/base:base", | 35 "//ui/base:base", |
| 36 "//ui/compositor:compositor", |
29 "//ui/events:events", | 37 "//ui/events:events", |
30 "//ui/events:gesture_detection", | 38 "//ui/events:gesture_detection", |
| 39 "//ui/gfx:gfx", |
31 "//ui/gfx/geometry:geometry", | 40 "//ui/gfx/geometry:geometry", |
32 ] | 41 ] |
| 42 |
| 43 if (!use_aura) { |
| 44 deps -= [ |
| 45 "//ui/aura:aura", |
| 46 "//ui/compositor:compositor", |
| 47 "//ui/gfx:gfx", |
| 48 ] |
| 49 sources -= [ |
| 50 "touch_handle_drawable_aura.cc", |
| 51 "touch_handle_drawable_aura.h", |
| 52 "touch_selection_controller_aura.cc", |
| 53 "touch_selection_controller_aura.h", |
| 54 "touch_selection_menu_runner.cc", |
| 55 "touch_selection_menu_runner.h", |
| 56 ] |
| 57 } |
33 } | 58 } |
34 | 59 |
35 test("ui_touch_selection_unittests") { | 60 test("ui_touch_selection_unittests") { |
36 sources = [ | 61 sources = [ |
| 62 "run_all_unittests.cc", |
37 "touch_handle_unittest.cc", | 63 "touch_handle_unittest.cc", |
| 64 "touch_selection_controller_aura_unittest.cc", |
38 "touch_selection_controller_unittest.cc", | 65 "touch_selection_controller_unittest.cc", |
39 ] | 66 ] |
40 | 67 |
41 deps = [ | 68 deps = [ |
42 ":touch_selection", | 69 ":touch_selection", |
43 "//base/test:run_all_unittests", | |
44 "//testing/gtest:gtest", | 70 "//testing/gtest:gtest", |
| 71 "//ui/aura:test_support", |
45 "//ui/base:base", | 72 "//ui/base:base", |
46 "//ui/events:test_support", | 73 "//ui/events:test_support", |
47 "//ui/gfx:gfx", | 74 "//ui/gfx:gfx", |
48 "//ui/gfx:test_support", | 75 "//ui/gfx:test_support", |
49 ] | 76 ] |
| 77 |
| 78 if (!use_aura) { |
| 79 deps -= [ "//ui/aura:test_support" ] |
| 80 sources -= [ "touch_selection_controller_aura_unittest.cc" ] |
| 81 } |
50 } | 82 } |
51 | 83 |
52 if (is_android) { | 84 if (is_android) { |
53 java_cpp_enum("ui_touch_selection_enums_srcjar") { | 85 java_cpp_enum("ui_touch_selection_enums_srcjar") { |
54 sources = [ | 86 sources = [ |
55 "selection_event_type.h", | 87 "selection_event_type.h", |
56 ] | 88 ] |
57 outputs = [ | 89 outputs = [ |
58 "org/chromium/ui/touch_selection/SelectionEventType.java", | 90 "org/chromium/ui/touch_selection/SelectionEventType.java", |
59 ] | 91 ] |
60 } | 92 } |
61 } | 93 } |
OLD | NEW |