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("//mojo/public/tools/bindings/mojom.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",
21 "keyboard_layout_manager.h",
22 "keyboard_layout_manager.cc",
24 "keyboard_switches.cc",
25 "keyboard_switches.h",
28 "webui/vk_mojo_handler.cc",
29 "webui/vk_mojo_handler.h",
30 "webui/vk_webui_controller.cc",
31 "webui/vk_webui_controller.h",
34 defines = [ "KEYBOARD_IMPLEMENTATION" ]
37 ":keyboard_mojom_bindings",
40 "//base/third_party/dynamic_annotations",
41 "//content/public/browser",
42 "//content/public/common",
45 "//mojo/environment:chromium",
46 "//mojo/public/cpp/bindings",
47 "//mojo/public/cpp/system",
53 "//ui/events:dom4_keycode_converter",
60 # GYP version: ui/keyboard/keyboard.gyp:keyboard_mojom_bindings
61 mojom("keyboard_mojom_bindings") {
63 "webui/keyboard.mojom",
67 grit("resources_grit") {
68 source = "keyboard_resources.grd"
70 "grit/keyboard_resources.h",
71 "grit/keyboard_resources_map.h",
72 "keyboard_resources.pak",
73 "keyboard_resources.rc",
76 inputview_dir = "//third_party/google_input_tools/src/chrome/os/inputview"
77 inputview_gen_js = "$root_gen_dir/ui/keyboard/resources/inputview.js"
78 keyboard_mojom_gen_js = "$root_gen_dir/ui/keyboard/webui/keyboard.mojom.js"
81 "inputview_dir=" + rebase_path(inputview_dir, "."),
83 "inputview_gen_js=" + rebase_path(inputview_gen_js, root_build_dir),
85 "keyboard_mojom_gen_js=" +
86 rebase_path(keyboard_mojom_gen_js, root_build_dir),
91 ":keyboard_mojom_bindings",
97 "$target_gen_dir/keyboard_resources.pak",
100 "$root_out_dir/keyboard_resources.pak",
107 build_closure("inputview") {
108 sources = inputview_sources
109 target = "$target_gen_dir/resources/inputview.js"
110 json_file = "//third_party/google_input_tools/inputview.gypi"
111 sources += [ json_file ]
112 json_sources = "variables.inputview_sources"
113 path = rebase_path("//third_party/google_input_tools")
116 test("keyboard_unittests") {
118 "test/run_all_unittests.cc",
119 "keyboard_controller_unittest.cc",
126 "//base/test:test_support",
130 "//ui/aura:test_support",
131 "//ui/base:test_support",
132 "//ui/compositor:test_support",
133 "//ui/events:test_support",
137 "//ui/resources:ui_test_pak",