• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4
5import("//build/config/ui.gni")
6
7component("views_examples_lib") {
8  testonly = true
9
10  sources = [
11    "bubble_example.cc",
12    "bubble_example.h",
13    "button_example.cc",
14    "button_example.h",
15    "checkbox_example.cc",
16    "checkbox_example.h",
17    "combobox_example.cc",
18    "combobox_example.h",
19    "double_split_view_example.cc",
20    "double_split_view_example.h",
21    "example_base.cc",
22    "example_base.h",
23    "example_combobox_model.cc",
24    "example_combobox_model.h",
25    "examples_window.cc",
26    "examples_window.h",
27    "label_example.cc",
28    "label_example.h",
29    "link_example.cc",
30    "link_example.h",
31    "message_box_example.cc",
32    "message_box_example.h",
33    "menu_example.cc",
34    "menu_example.h",
35    "multiline_example.cc",
36    "multiline_example.h",
37    "progress_bar_example.cc",
38    "progress_bar_example.h",
39    "radio_button_example.cc",
40    "radio_button_example.h",
41    "scroll_view_example.cc",
42    "scroll_view_example.h",
43    "single_split_view_example.cc",
44    "single_split_view_example.h",
45    "slider_example.cc",
46    "slider_example.h",
47    "tabbed_pane_example.cc",
48    "tabbed_pane_example.h",
49    "table_example.cc",
50    "table_example.h",
51    "text_example.cc",
52    "text_example.h",
53    "textfield_example.cc",
54    "textfield_example.h",
55    "throbber_example.cc",
56    "throbber_example.h",
57    "tree_view_example.cc",
58    "tree_view_example.h",
59    "views_examples_export.h",
60    "widget_example.cc",
61    "widget_example.h",
62  ]
63
64  defines = [ "VIEWS_EXAMPLES_IMPLEMENTATION" ]
65
66  deps = [
67    "//base",
68    "//skia",
69    "//third_party/icu",
70    "//ui/base",
71    "//ui/events",
72    "//ui/gfx",
73    "//ui/gfx/geometry",
74    "//ui/resources",
75    "//ui/resources:ui_test_pak",
76    "//ui/views",
77  ]
78
79  if (is_win) {
80    deps += [ "//third_party/wtl" ]
81
82    # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
83    cflags = [ "/wd4267" ]
84  }
85
86  if (use_aura) {
87    deps += [ "//ui/aura" ]
88  }
89}
90
91executable("views_examples_exe") {
92  testonly = true
93
94  sources = [
95    "examples_main.cc",
96  ]
97
98  deps = [
99    ":views_examples_lib",
100    "//base",
101    "//base:i18n",
102    "//ui/base",
103    "//ui/compositor",
104    "//ui/compositor:test_support",
105    "//ui/gfx",
106    "//ui/gl",
107    "//ui/resources:ui_test_pak",
108    "//ui/views",
109    "//ui/views:test_support",
110    "//ui/wm",
111  ]
112
113  if (use_aura) {
114    deps += [ "//ui/aura" ]
115  }
116  if (use_x11) {
117    deps += [ "//ui/gfx/x" ]
118  }
119}
120
121component("views_examples_with_content_lib") {
122  testonly = true
123  sources = [
124    "examples_window_with_content.cc",
125    "examples_window_with_content.h",
126    "views_examples_with_content_export.h",
127    "webview_example.cc",
128    "webview_example.h",
129  ]
130
131  defines = [ "VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION" ]
132
133  deps = [
134    ":views_examples_lib",
135    "//base",
136    "//content",
137    "//skia",
138    "//ui/events",
139    "//ui/views",
140    "//ui/views/controls/webview",
141    "//url",
142  ]
143}
144
145executable("views_examples_with_content_exe") {
146  testonly = true
147
148  sources = [
149    "examples_with_content_main_exe.cc",
150  ]
151
152  defines = [ "VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION" ]
153
154  deps = [
155    ":views_examples_with_content_lib",
156    "//base",
157    "//content",
158    "//ui/views_content_client",
159  ]
160}
161