OLD | NEW |
| (Empty) |
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 | |
5 import("//build/config/ui.gni") | |
6 import("//third_party/mojo/src/mojo/public/mojo_application.gni") | |
7 | |
8 if (is_android) { | |
9 import("//build/config/android/config.gni") | |
10 import("//build/config/android/rules.gni") | |
11 | |
12 group("native_viewport") { | |
13 deps = [ | |
14 ":lib", | |
15 ":native_viewport_java", | |
16 ":jni_headers", | |
17 ] | |
18 } | |
19 | |
20 android_library("native_viewport_java") { | |
21 java_files = | |
22 [ "android/src/org/chromium/mojo/PlatformViewportAndroid.java" ] | |
23 | |
24 deps = [ | |
25 "//base:base_java", | |
26 ] | |
27 } | |
28 | |
29 generate_jni("jni_headers") { | |
30 sources = [ | |
31 "android/src/org/chromium/mojo/PlatformViewportAndroid.java", | |
32 ] | |
33 | |
34 jni_package = "mojo" | |
35 } | |
36 } else { | |
37 mojo_native_application("native_viewport") { | |
38 output_name = "native_viewport_service" | |
39 sources = [ | |
40 "main.cc", | |
41 ] | |
42 deps = [ | |
43 ":lib", | |
44 "//base", | |
45 "//components/gles2", | |
46 "//components/native_viewport/public/cpp:args", | |
47 "//components/native_viewport/public/interfaces", | |
48 "//mojo/application", | |
49 "//third_party/mojo/src/mojo/public/cpp/bindings:bindings", | |
50 "//ui/events", | |
51 "//ui/events/platform", | |
52 "//ui/gl", | |
53 ] | |
54 } | |
55 } | |
56 | |
57 source_set("lib") { | |
58 sources = [ | |
59 "native_viewport_application_delegate.cc", | |
60 "native_viewport_application_delegate.h", | |
61 "native_viewport_impl.cc", | |
62 "native_viewport_impl.h", | |
63 "onscreen_context_provider.cc", | |
64 "onscreen_context_provider.h", | |
65 "platform_viewport.h", | |
66 "platform_viewport_android.cc", | |
67 "platform_viewport_android.h", | |
68 "platform_viewport_headless.cc", | |
69 "platform_viewport_headless.h", | |
70 "platform_viewport_stub.cc", | |
71 "platform_viewport_win.cc", | |
72 "platform_viewport_x11.cc", | |
73 ] | |
74 | |
75 if (!is_ios) { | |
76 sources -= [ "platform_viewport_stub.cc" ] | |
77 } | |
78 | |
79 deps = [ | |
80 "//base", | |
81 "//components/gles2", | |
82 "//components/native_viewport/public/interfaces", | |
83 "//gpu/command_buffer/service", | |
84 "//mojo/application", | |
85 "//mojo/common", | |
86 "//mojo/common:tracing_impl", | |
87 "//mojo/converters/geometry", | |
88 "//mojo/converters/input_events", | |
89 "//mojo/environment:chromium", | |
90 "//ui/events", | |
91 "//ui/events/platform", | |
92 "//ui/gfx", | |
93 "//ui/gfx/geometry", | |
94 "//ui/gl", | |
95 "//ui/mojo/geometry:interfaces", | |
96 "//ui/platform_window", | |
97 ] | |
98 | |
99 if (is_android) { | |
100 deps += [ ":jni_headers" ] | |
101 } | |
102 | |
103 if (use_x11) { | |
104 deps += [ "//ui/platform_window/x11" ] | |
105 } else { | |
106 sources -= [ "platform_viewport_x11.cc" ] | |
107 } | |
108 | |
109 if (is_win) { | |
110 deps += [ "//ui/platform_window/win" ] | |
111 } | |
112 } | |
OLD | NEW |