Inline NetLog IPv6 reachability events.
[chromium-blink-merge.git] / components / native_viewport / BUILD.gn
blob71ad60538c6d6d0100cdbdf028d67fdd8bfbbc1e
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("//build/config/ui.gni")
6 import("//third_party/mojo/src/mojo/public/mojo_application.gni")
8 if (is_android) {
9   import("//build/config/android/config.gni")
10   import("//build/config/android/rules.gni")
12   group("native_viewport") {
13     deps = [
14       ":lib",
15       ":native_viewport_java",
16       ":jni_headers",
17     ]
18   }
20   android_library("native_viewport_java") {
21     java_files =
22         [ "android/src/org/chromium/mojo/PlatformViewportAndroid.java" ]
24     deps = [
25       "//base:base_java",
26     ]
27   }
29   generate_jni("jni_headers") {
30     sources = [
31       "android/src/org/chromium/mojo/PlatformViewportAndroid.java",
32     ]
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       "//mojo/common:tracing_impl",
50       "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
51       "//ui/events",
52       "//ui/events/platform",
53       "//ui/gl",
54     ]
55   }
58 source_set("lib") {
59   sources = [
60     "native_viewport_impl.cc",
61     "native_viewport_impl.h",
62     "onscreen_context_provider.cc",
63     "onscreen_context_provider.h",
64     "platform_viewport.h",
65     "platform_viewport_android.cc",
66     "platform_viewport_android.h",
67     "platform_viewport_headless.cc",
68     "platform_viewport_headless.h",
69     "platform_viewport_stub.cc",
70     "platform_viewport_win.cc",
71     "platform_viewport_x11.cc",
72   ]
74   if (!is_ios) {
75     sources -= [ "platform_viewport_stub.cc" ]
76   }
78   deps = [
79     "//base",
80     "//components/gles2",
81     "//components/native_viewport/public/interfaces",
82     "//gpu/command_buffer/service",
83     "//mojo/application",
84     "//mojo/common",
85     "//mojo/converters/geometry",
86     "//mojo/converters/input_events",
87     "//mojo/environment:chromium",
88     "//ui/events",
89     "//ui/events/platform",
90     "//ui/gfx",
91     "//ui/gfx/geometry",
92     "//ui/gl",
93     "//ui/mojo/geometry:interfaces",
94     "//ui/platform_window",
95   ]
97   if (is_android) {
98     deps += [ ":jni_headers" ]
99   }
101   if (use_x11) {
102     deps += [ "//ui/platform_window/x11" ]
103   } else {
104     sources -= [ "platform_viewport_x11.cc" ]
105   }
107   if (is_win) {
108     deps += [ "//ui/platform_window/win:win_window" ]
109   }