Componentize OmniboxMetricsProvider for sharing with iOS
[chromium-blink-merge.git] / components / omnibox / browser / BUILD.gn
blob67a8c9a87c2956cc2d5a9bb7301962d94f939f1c
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("//third_party/protobuf/proto_library.gni")
7 source_set("browser") {
8   sources = [
9     "answers_cache.cc",
10     "answers_cache.h",
11     "autocomplete_classifier.cc",
12     "autocomplete_classifier.h",
13     "autocomplete_controller.cc",
14     "autocomplete_controller.h",
15     "autocomplete_controller_delegate.h",
16     "autocomplete_input.cc",
17     "autocomplete_input.h",
18     "autocomplete_match.cc",
19     "autocomplete_match.h",
20     "autocomplete_match_type.cc",
21     "autocomplete_match_type.h",
22     "autocomplete_provider.cc",
23     "autocomplete_provider.h",
24     "autocomplete_result.cc",
25     "autocomplete_result.h",
26     "autocomplete_scheme_classifier.h",
27     "base_search_provider.cc",
28     "base_search_provider.h",
29     "bookmark_provider.cc",
30     "bookmark_provider.h",
31     "builtin_provider.cc",
32     "builtin_provider.h",
33     "clipboard_url_provider.cc",
34     "clipboard_url_provider.h",
35     "history_provider.cc",
36     "history_provider.h",
37     "history_quick_provider.cc",
38     "history_quick_provider.h",
39     "history_url_provider.cc",
40     "history_url_provider.h",
41     "in_memory_url_index.cc",
42     "in_memory_url_index.h",
43     "in_memory_url_index_types.cc",
44     "in_memory_url_index_types.h",
45     "keyword_extensions_delegate.cc",
46     "keyword_extensions_delegate.h",
47     "keyword_provider.cc",
48     "keyword_provider.h",
49     "omnibox_client.h",
50     "omnibox_controller.cc",
51     "omnibox_controller.h",
52     "omnibox_edit_controller.cc",
53     "omnibox_edit_controller.h",
54     "omnibox_edit_model.cc",
55     "omnibox_edit_model.h",
56     "omnibox_event_global_tracker.cc",
57     "omnibox_event_global_tracker.h",
58     "omnibox_field_trial.cc",
59     "omnibox_field_trial.h",
60     "omnibox_log.cc",
61     "omnibox_log.h",
62     "omnibox_metrics_provider.cc",
63     "omnibox_metrics_provider.h",
64     "omnibox_navigation_observer.h",
65     "omnibox_popup_model.cc",
66     "omnibox_popup_model.h",
67     "omnibox_popup_model_observer.h",
68     "omnibox_popup_view.h",
69     "omnibox_pref_names.cc",
70     "omnibox_pref_names.h",
71     "omnibox_switches.cc",
72     "omnibox_switches.h",
73     "omnibox_view.cc",
74     "omnibox_view.h",
75     "scored_history_match.cc",
76     "scored_history_match.h",
77     "search_provider.cc",
78     "search_provider.h",
79     "search_suggestion_parser.cc",
80     "search_suggestion_parser.h",
81     "shortcuts_backend.cc",
82     "shortcuts_backend.h",
83     "shortcuts_constants.cc",
84     "shortcuts_constants.h",
85     "shortcuts_database.cc",
86     "shortcuts_database.h",
87     "shortcuts_provider.cc",
88     "shortcuts_provider.h",
89     "suggestion_answer.cc",
90     "suggestion_answer.h",
91     "url_index_private_data.cc",
92     "url_index_private_data.h",
93     "url_prefix.cc",
94     "url_prefix.h",
95     "verbatim_match.cc",
96     "verbatim_match.h",
97     "zero_suggest_provider.cc",
98     "zero_suggest_provider.h",
99   ]
101   public_deps = [
102     "//components/history/core/browser",
103     "//components/metrics/proto",
104   ]
105   deps = [
106     "//base",
107     "//base:i18n",
108     "//base:prefs",
109     "//components/bookmarks/browser",
110     "//components/keyed_service/core",
111     "//components/metrics",
112     "//components/omnibox/common",
113     "//components/open_from_clipboard",
114     "//components/pref_registry",
115     "//components/query_parser",
116     "//components/resources",
117     "//components/search",
118     "//components/search_engines",
119     "//components/sessions",
120     "//components/strings",
121     "//components/toolbar",
122     "//components/url_formatter",
123     "//components/variations",
124     "//components/variations/net",
125     "//net",
126     "//skia",
127     "//sql",
128     "//third_party/protobuf:protobuf_lite",
129     "//ui/base",
130     "//ui/gfx",
131     "//url",
132     ":in_memory_url_index_cache_proto",
133   ]
136 proto_library("in_memory_url_index_cache_proto") {
137   sources = [
138     "in_memory_url_index_cache.proto",
139   ]
142 static_library("test_support") {
143   testonly = true
144   sources = [
145     "mock_autocomplete_provider_client.cc",
146     "mock_autocomplete_provider_client.h",
147     "test_scheme_classifier.cc",
148     "test_scheme_classifier.h",
149   ]
151   deps = [
152     ":browser",
153     "//base",
154     "//components/metrics/proto",
155     "//components/search_engines",
156     "//net",
157     "//testing/gmock",
158   ]
161 source_set("unit_tests") {
162   testonly = true
163   sources = [
164     "answers_cache_unittest.cc",
165     "autocomplete_input_unittest.cc",
166     "autocomplete_match_unittest.cc",
167     "autocomplete_result_unittest.cc",
168     "base_search_provider_unittest.cc",
169     "clipboard_url_provider_unittest.cc",
170     "in_memory_url_index_types_unittest.cc",
171     "keyword_provider_unittest.cc",
172     "omnibox_field_trial_unittest.cc",
173     "scored_history_match_unittest.cc",
174     "suggestion_answer_unittest.cc",
175   ]
177   deps = [
178     "//base",
179     "//components/open_from_clipboard:test_support",
180     "//components/search",
181     "//components/search_engines",
182     "//components/variations",
183     "//testing/gmock",
184     "//testing/gtest",
185     "//url",
186     ":browser",
187     ":test_support",
188   ]