Popular sites on the NTP: Favicon improvements
[chromium-blink-merge.git] / ui / keyboard / BUILD.gn
blobcdeb0a953fa2c015c2af12bd4493dfcd3e3d57cc
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") {
11   sources = [
12     "keyboard.cc",
13     "keyboard.h",
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_export.h",
22     "keyboard_layout_manager.cc",
23     "keyboard_layout_manager.h",
24     "keyboard_switches.cc",
25     "keyboard_switches.h",
26     "keyboard_util.cc",
27     "keyboard_util.h",
28   ]
30   defines = [ "KEYBOARD_IMPLEMENTATION" ]
32   deps = [
33     ":resources",
34     "//base",
35     "//base/third_party/dynamic_annotations",
36     "//content/public/browser",
37     "//content/public/common",
38     "//ipc",
39     "//skia",
40     "//ui/aura",
41     "//ui/base",
42     "//ui/base/ime",
43     "//ui/compositor",
44     "//ui/events",
45     "//ui/events:dom_keycode_converter",
46     "//ui/events:events_base",
47     "//ui/gfx",
48     "//ui/gfx/geometry",
49     "//ui/wm",
50     "//url",
51   ]
53   if (use_ozone) {
54     deps += [ "//ui/ozone" ]
55   }
58 grit("resources_grit") {
59   source = "keyboard_resources.grd"
60   outputs = [
61     "grit/keyboard_resources.h",
62     "grit/keyboard_resources_map.h",
63     "keyboard_resources.pak",
64   ]
66   input_tools_root_dir = "//third_party/google_input_tools/src/chrome/os"
67   inputview_gen_js = "$root_gen_dir/ui/keyboard/resources/inputview.js"
68   grit_flags = [
69     "-E",
70     "input_tools_root_dir=" + rebase_path(input_tools_root_dir, "."),
71     "-E",
72     "inputview_gen_js=" + rebase_path(inputview_gen_js, root_build_dir),
73   ]
75   deps = [
76     ":inputview",
77   ]
80 copy("resources") {
81   sources = [
82     "$target_gen_dir/keyboard_resources.pak",
83   ]
84   outputs = [
85     "$root_out_dir/keyboard_resources.pak",
86   ]
87   public_deps = [
88     ":resources_grit",
89   ]
92 build_closure("inputview") {
93   sources = inputview_sources
94   target = "$target_gen_dir/resources/inputview.js"
95   json_file = "//third_party/google_input_tools/inputview.gypi"
96   sources += [ json_file ]
97   json_sources = "variables.inputview_sources"
98   path = rebase_path("//third_party/google_input_tools")
101 test("keyboard_unittests") {
102   sources = [
103     "keyboard_controller_unittest.cc",
104     "test/run_all_unittests.cc",
105   ]
107   deps = [
108     ":keyboard",
109     "//base",
110     "//base/allocator",
111     "//base/test:test_support",
112     "//content",
113     "//skia",
114     "//testing/gtest",
115     "//ui/aura:test_support",
116     "//ui/base",
117     "//ui/base/ime",
118     "//ui/base:test_support",
119     "//ui/compositor:test_support",
120     "//ui/events:test_support",
121     "//ui/gfx",
122     "//ui/gfx/geometry",
123     "//ui/gl",
124     "//ui/resources:ui_test_pak",
125     "//ui/wm",
126     "//url",
127   ]