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 } else { 49 sources -= [ 50 "snapshot_aura.cc" 51 ] 52 } 53 } 54 55 # TODO(GYP) enable this when all targets are converted and it links 56 #test("snapshot_unittests") { 57 # sources = [ 58 # "snapshot_aura_unittest.cc", 59 # "snapshot_mac_unittest.mm", 60 # "test/run_all_unittests.cc", 61 # ] 62 # 63 # deps = [ 64 # "//base", 65 # "//base/allocator", 66 # "//base/test:test_support", 67 # "//skia", 68 # "//testing/gtest", 69 # "//ui/base", 70 # "//ui/gfx", 71 # "//ui/gfx/geometry", 72 # ] 73 # 74 # if (use_aura) { 75 # deps += [ 76 # #"//ui/aura:test_support", TODO(GYP) 77 # "//ui/compositor", 78 # "//ui/compositor:test_support", 79 # ] 80 # } else { 81 # sources -= [ "snapshot_aura_unittest.cc" ] 82 # } 83 #} 84 85 if (is_win) { 86 source_set("test_support") { 87 sources = [ 88 "test/snapshot_desktop.h", 89 "test/snapshot_desktop_win.cc", 90 ] 91 deps = [ 92 ":snapshot", 93 ] 94 } 95 } 96