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 |
| 7 component("snapshot") { |
| 8 sources = [ |
| 9 "snapshot.h", |
| 10 "snapshot_android.cc", |
| 11 "snapshot_async.cc", |
| 12 "snapshot_async.h", |
| 13 "snapshot_aura.cc", |
| 14 "snapshot_export.h", |
| 15 "snapshot_ios.mm", |
| 16 "snapshot_mac.mm", |
| 17 "snapshot_win.cc", |
| 18 "snapshot_win.h", |
| 19 ] |
| 20 |
| 21 defines = [ "SNAPSHOT_IMPLEMENTATION" ] |
| 22 |
| 23 deps = [ |
| 24 "//base", |
| 25 "//skia", |
| 26 "//ui/base", |
| 27 "//ui/gfx", |
| 28 "//ui/gfx/geometry", |
| 29 ] |
| 30 |
| 31 if (use_aura || is_android) { |
| 32 deps += [ |
| 33 "//cc", |
| 34 "//gpu/command_buffer/common", |
| 35 ] |
| 36 } else { |
| 37 sources -= [ |
| 38 "snapshot_async.cc", |
| 39 "snapshot_async.h", |
| 40 ] |
| 41 } |
| 42 |
| 43 if (use_aura) { |
| 44 deps += [ |
| 45 #"//ui/aura", TODO(GYP) |
| 46 "//ui/compositor", |
| 47 ] |
| 48 } |
| 49 } |
| 50 |
| 51 # TODO(GYP) enable this when all targets are converted and it links |
| 52 #test("snapshot_unittests") { |
| 53 # sources = [ |
| 54 # "snapshot_aura_unittest.cc", |
| 55 # "snapshot_mac_unittest.mm", |
| 56 # "test/run_all_unittests.cc", |
| 57 # ] |
| 58 # |
| 59 # deps = [ |
| 60 # "//base", |
| 61 # "//base/allocator", |
| 62 # "//base/test:test_support", |
| 63 # "//skia", |
| 64 # "//testing/gtest", |
| 65 # "//ui/base", |
| 66 # "//ui/gfx", |
| 67 # "//ui/gfx/geometry", |
| 68 # ] |
| 69 # |
| 70 # if (use_aura) { |
| 71 # deps += [ |
| 72 # #"//ui/aura:test_support", TODO(GYP) |
| 73 # "//ui/compositor", |
| 74 # "//ui/compositor:test_support", |
| 75 # ] |
| 76 # } else { |
| 77 # sources -= [ "snapshot_aura_unittest.cc" ] |
| 78 # } |
| 79 #} |
| 80 |
| 81 if (is_win) { |
| 82 source_set("test_support") { |
| 83 sources = [ |
| 84 "test/snapshot_desktop.h", |
| 85 "test/snapshot_desktop_win.cc", |
| 86 ] |
| 87 deps = [ |
| 88 ":snapshot", |
| 89 ] |
| 90 } |
| 91 } |
OLD | NEW |