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("//testing/test.gni")
6 import("//third_party/google_input_tools/closure.gni")
7 import("//third_party/google_input_tools/inputview.gni")
8 import("//tools/grit/grit_rule.gni")
10 component("keyboard") {
14 "keyboard_constants.cc",
15 "keyboard_constants.h",
16 "keyboard_controller.cc",
17 "keyboard_controller.h",
18 "keyboard_controller_observer.h",
19 "keyboard_controller_proxy.cc",
20 "keyboard_controller_proxy.h",
22 "keyboard_layout_manager.cc",
23 "keyboard_layout_manager.h",
24 "keyboard_switches.cc",
25 "keyboard_switches.h",
30 defines = [ "KEYBOARD_IMPLEMENTATION" ]
35 "//base/third_party/dynamic_annotations",
36 "//content/public/browser",
37 "//content/public/common",
45 "//ui/events:dom_keycode_converter",
46 "//ui/events:events_base",
54 deps += [ "//ui/ozone" ]
58 grit("resources_grit") {
59 source = "keyboard_resources.grd"
61 "grit/keyboard_resources.h",
62 "grit/keyboard_resources_map.h",
63 "keyboard_resources.pak",
64 "keyboard_resources.rc",
67 input_tools_root_dir = "//third_party/google_input_tools/src/chrome/os"
68 inputview_gen_js = "$root_gen_dir/ui/keyboard/resources/inputview.js"
71 "input_tools_root_dir=" + rebase_path(input_tools_root_dir, "."),
73 "inputview_gen_js=" + rebase_path(inputview_gen_js, root_build_dir),
83 "$target_gen_dir/keyboard_resources.pak",
86 "$root_out_dir/keyboard_resources.pak",
93 build_closure("inputview") {
94 sources = inputview_sources
95 target = "$target_gen_dir/resources/inputview.js"
96 json_file = "//third_party/google_input_tools/inputview.gypi"
97 sources += [ json_file ]
98 json_sources = "variables.inputview_sources"
99 path = rebase_path("//third_party/google_input_tools")
102 test("keyboard_unittests") {
104 "keyboard_controller_unittest.cc",
105 "test/run_all_unittests.cc",
112 "//base/test:test_support",
116 "//ui/aura:test_support",
119 "//ui/base:test_support",
120 "//ui/compositor:test_support",
121 "//ui/events:test_support",
125 "//ui/resources:ui_test_pak",