| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 | 7 |
| 8 component("native_theme") { | 8 component("native_theme") { |
| 9 sources = [ | 9 sources = [ |
| 10 "common_theme.cc", | 10 "common_theme.cc", |
| 11 "common_theme.h", | 11 "common_theme.h", |
| 12 "native_theme.cc", | 12 "native_theme.cc", |
| 13 "native_theme.h", | 13 "native_theme.h", |
| 14 "native_theme_android.cc", | 14 "native_theme_android.cc", |
| 15 "native_theme_android.h", | 15 "native_theme_android.h", |
| 16 "native_theme_base.cc", | 16 "native_theme_base.cc", |
| 17 "native_theme_base.h", | 17 "native_theme_base.h", |
| 18 "native_theme_dark_win.cc", | |
| 19 "native_theme_dark_win.h", | |
| 20 "native_theme_mac.h", | 18 "native_theme_mac.h", |
| 21 "native_theme_mac.mm", | 19 "native_theme_mac.mm", |
| 22 "native_theme_observer.cc", | 20 "native_theme_observer.cc", |
| 23 "native_theme_observer.h", | 21 "native_theme_observer.h", |
| 24 "native_theme_switches.cc", | 22 "native_theme_switches.cc", |
| 25 "native_theme_switches.h", | 23 "native_theme_switches.h", |
| 26 "native_theme_win.cc", | |
| 27 "native_theme_win.h", | |
| 28 ] | 24 ] |
| 29 | 25 |
| 30 if (use_aura) { | 26 if (use_aura) { |
| 31 sources += [ | 27 sources += [ |
| 32 "native_theme_aura.cc", | 28 "native_theme_aura.cc", |
| 33 "native_theme_aura.h", | 29 "native_theme_aura.h", |
| 34 "native_theme_dark_aura.cc", | 30 "native_theme_dark_aura.cc", |
| 35 "native_theme_dark_aura.h", | 31 "native_theme_dark_aura.h", |
| 36 ] | 32 ] |
| 37 | |
| 38 if (is_win) { | |
| 39 sources += [ | |
| 40 "native_theme_aurawin.cc", | |
| 41 "native_theme_aurawin.h", | |
| 42 ] | |
| 43 } | |
| 44 } | 33 } |
| 45 | 34 |
| 46 defines = [ "NATIVE_THEME_IMPLEMENTATION" ] | 35 defines = [ "NATIVE_THEME_IMPLEMENTATION" ] |
| 47 | 36 |
| 48 deps = [ | 37 deps = [ |
| 49 "//base", | 38 "//base", |
| 50 "//base/third_party/dynamic_annotations", | 39 "//base/third_party/dynamic_annotations", |
| 51 "//skia", | 40 "//skia", |
| 52 "//ui/base", | 41 "//ui/base", |
| 53 "//ui/display", | 42 "//ui/display", |
| 54 "//ui/gfx", | 43 "//ui/gfx", |
| 55 "//ui/gfx/geometry", | 44 "//ui/gfx/geometry", |
| 56 "//ui/resources", | 45 "//ui/resources", |
| 57 ] | 46 ] |
| 58 | 47 |
| 59 if (is_mac) { | 48 if (is_mac) { |
| 60 libs = [ | 49 libs = [ |
| 61 "CoreGraphics.framework", | 50 "CoreGraphics.framework", |
| 62 "AppKit.framework", | 51 "AppKit.framework", |
| 63 ] | 52 ] |
| 64 } | 53 } |
| 65 } | 54 } |
| 66 | 55 |
| 56 component("native_theme_browser") { |
| 57 defines = [ "NATIVE_THEME_IMPLEMENTATION" ] |
| 58 |
| 59 # These files cannot work in the renderer on Windows. |
| 60 sources = [ |
| 61 "native_theme_dark_win.cc", |
| 62 "native_theme_dark_win.h", |
| 63 "native_theme_win.cc", |
| 64 "native_theme_win.h", |
| 65 ] |
| 66 |
| 67 deps = [ |
| 68 ":native_theme", |
| 69 "//base", |
| 70 "//ui/base", |
| 71 "//ui/display", |
| 72 "//ui/gfx", |
| 73 ] |
| 74 } |
| 75 |
| 67 test("native_theme_unittests") { | 76 test("native_theme_unittests") { |
| 68 sources = [] | 77 sources = [] |
| 69 | 78 |
| 70 if (use_aura) { | 79 if (use_aura) { |
| 71 sources += [ "native_theme_aura_unittest.cc" ] | 80 sources += [ "native_theme_aura_unittest.cc" ] |
| 72 } | 81 } |
| 73 | 82 |
| 74 if (is_mac) { | 83 if (is_mac) { |
| 75 sources += [ "native_theme_mac_unittest.cc" ] | 84 sources += [ "native_theme_mac_unittest.cc" ] |
| 76 } | 85 } |
| 77 | 86 |
| 78 deps = [ | 87 deps = [ |
| 79 ":native_theme", | 88 ":native_theme", |
| 80 "//base/test:run_all_unittests", | 89 "//base/test:run_all_unittests", |
| 81 "//base/test:test_support", | 90 "//base/test:test_support", |
| 82 "//skia:skia", | 91 "//skia:skia", |
| 83 "//testing/gtest", | 92 "//testing/gtest", |
| 84 "//ui/base", | 93 "//ui/base", |
| 85 "//ui/gfx/geometry:geometry", | 94 "//ui/gfx/geometry:geometry", |
| 86 ] | 95 ] |
| 87 } | 96 } |
| OLD | NEW |