Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: device/power_save_blocker/BUILD.gn

Issue 2075153002: Reland of 'Move content/browser/power_save_blocker to //device/power_save_blocker' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing libs for component mac Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/BUILD.gn ('k') | device/power_save_blocker/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 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/features.gni")
6 import("//build/config/ui.gni")
7
8 if (is_android) {
9 import("//build/config/android/rules.gni")
10 }
11
12 component("power_save_blocker") {
13 sources = [
14 "power_save_blocker.h",
15 "power_save_blocker_android.cc",
16 "power_save_blocker_android.h",
17 "power_save_blocker_chromeos.cc",
18 "power_save_blocker_impl.cc",
19 "power_save_blocker_impl.h",
20 "power_save_blocker_mac.cc",
21 "power_save_blocker_ozone.cc",
22 "power_save_blocker_win.cc",
23 "power_save_blocker_x11.cc",
24 ]
25
26 defines = [ "DEVICE_POWER_SAVE_BLOCKER_IMPLEMENTATION" ]
27
28 deps = [
29 "//base",
30 ]
31
32 if (use_dbus) {
33 deps += [ "//dbus" ]
34 }
35
36 if (use_x11) {
37 configs += [ "//build/config/linux:x11" ]
38 if (!is_chromeos) {
39 configs += [ "//build/config/linux:xscrnsaver" ]
40 }
41 deps += [ "//ui/gfx/x" ]
42 }
43
44 # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
45 # given the interaction between os_chromeos and the feature flags for X11 and
46 # ozone, so do it all in one spot.
47 if (is_chromeos || !use_ozone) {
48 sources -= [ "power_save_blocker_ozone.cc" ]
49 }
50 if (is_chromeos || !use_x11) {
51 sources -= [ "power_save_blocker_x11.cc" ]
52 }
53
54 if (is_android) {
55 sources += [
56 "power_save_blocker_jni_registrar.cc",
57 "power_save_blocker_jni_registrar.h",
58 ]
59
60 deps += [
61 ":jni_headers",
62 "//ui/android",
63 ]
64 }
65
66 if (is_chromeos) {
67 deps += [
68 "//chromeos",
69 "//chromeos:power_manager_proto",
70 ]
71 }
72
73 if (is_mac) {
74 libs = [
75 "CoreFoundation.framework",
76 "IOKit.framework",
77 ]
78 }
79 }
80
81 if (is_android) {
82 java_sources_needing_jni = [ "android/java/src/org/chromium/device/power_save_ blocker/PowerSaveBlocker.java" ]
83
84 generate_jni("jni_headers") {
85 sources = java_sources_needing_jni
86 jni_package = "device"
87 }
88
89 android_library("java") {
90 java_files = java_sources_needing_jni
91 deps = [
92 "//base:base_java",
93 "//ui/android:ui_java",
94 ]
95 }
96 }
OLDNEW
« no previous file with comments | « device/BUILD.gn ('k') | device/power_save_blocker/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698