Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / keyboard / BUILD.gn
blobd528115731abe7b45c126117624b8f8849af5cd9
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("//tools/grit/grit_rule.gni")
7 component("keyboard") {
8   sources = [
9     "keyboard.cc",
10     "keyboard.h",
11     "keyboard_constants.cc",
12     "keyboard_constants.h",
13     "keyboard_controller.cc",
14     "keyboard_controller.h",
15     "keyboard_controller_observer.h",
16     "keyboard_controller_proxy.cc",
17     "keyboard_controller_proxy.h",
18     "keyboard_layout_manager.h",
19     "keyboard_layout_manager.cc",
20     "keyboard_export.h",
21     "keyboard_switches.cc",
22     "keyboard_switches.h",
23     "keyboard_util.cc",
24     "keyboard_util.h",
25   ]
27   defines = [ "KEYBOARD_IMPLEMENTATION" ]
29   deps = [
30     ":resources",
31     "//base",
32     "//base/third_party/dynamic_annotations",
33     "//content/public/browser",
34     "//url",
35     "//ui/aura",
36     "//ui/base",
37     "//ui/compositor",
38     "//ui/events",
39     "//ui/gfx",
40     "//ui/gfx/geometry",
41     "//ui/keyboard/webui",
42     "//ui/wm",
43   ]
46 grit("resources_grit") {
47   source = "keyboard_resources.grd"
48   outputs = [
49     "grit/keyboard_resources.h",
50     "grit/keyboard_resources_map.h",
51     "keyboard_resources.pak",
52     "keyboard_resources.rc",
53   ]
55   keyboard_mojom_gen_js = "$root_gen_dir/ui/keyboard/webui/keyboard.mojom.js"
56   grit_flags = [
57     "-E", "keyboard_mojom_gen_js=" +
58           rebase_path(keyboard_mojom_gen_js, root_build_dir),
59   ]
61   deps = [
62     "webui:mojo_bindings"
63   ]
66 copy("resources") {
67   sources = [ "$target_gen_dir/keyboard_resources.pak" ]
68   outputs = [ "$root_out_dir/keyboard_resources.pak" ]
69   deps = [ ":resources_grit" ]
70   forward_dependent_configs_from = deps
73 test("keyboard_unittests") {
74   sources = [
75     "test/run_all_unittests.cc",
76     "keyboard_controller_unittest.cc",
77   ]
79   deps = [
80     ":keyboard",
81     "//base",
82     "//base/allocator",
83     "//base/test:test_support",
84     "//content",
85     "//skia",
86     "//testing/gtest",
87     "//ui/aura",
88     "//ui/aura:test_support",
89     "//ui/base",
90     "//ui/compositor",
91     "//ui/compositor:test_support",
92     "//ui/gfx",
93     "//ui/gfx/geometry",
94     "//ui/resources:ui_test_pak",
95     "//ui/wm",
96     "//url",
97   ]