| 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("display") { |    8 component("display") { | 
|    9   sources = [ |    9   sources = [ | 
|   10     "chromeos/apply_content_protection_task.cc", |  | 
|   11     "chromeos/apply_content_protection_task.h", |  | 
|   12     "chromeos/configure_displays_task.cc", |  | 
|   13     "chromeos/configure_displays_task.h", |  | 
|   14     "chromeos/display_configurator.cc", |  | 
|   15     "chromeos/display_configurator.h", |  | 
|   16     "chromeos/display_layout_manager.h", |  | 
|   17     "chromeos/display_snapshot_virtual.cc", |  | 
|   18     "chromeos/display_snapshot_virtual.h", |  | 
|   19     "chromeos/display_util.cc", |  | 
|   20     "chromeos/display_util.h", |  | 
|   21     "chromeos/query_content_protection_task.cc", |  | 
|   22     "chromeos/query_content_protection_task.h", |  | 
|   23     "chromeos/touchscreen_util.cc", |  | 
|   24     "chromeos/touchscreen_util.h", |  | 
|   25     "chromeos/update_display_configuration_task.cc", |  | 
|   26     "chromeos/update_display_configuration_task.h", |  | 
|   27     "display.cc", |   10     "display.cc", | 
|   28     "display.h", |   11     "display.h", | 
|   29     "display_change_notifier.cc", |   12     "display_change_notifier.cc", | 
|   30     "display_change_notifier.h", |   13     "display_change_notifier.h", | 
|   31     "display_export.h", |   14     "display_export.h", | 
|   32     "display_finder.cc", |   15     "display_finder.cc", | 
|   33     "display_finder.h", |   16     "display_finder.h", | 
 |   17     "display_layout.cc", | 
 |   18     "display_layout.h", | 
 |   19     "display_layout_builder.cc", | 
 |   20     "display_layout_builder.h", | 
|   34     "display_list.cc", |   21     "display_list.cc", | 
|   35     "display_list.h", |   22     "display_list.h", | 
|   36     "display_observer.cc", |   23     "display_observer.cc", | 
|   37     "display_observer.h", |   24     "display_observer.h", | 
|   38     "display_switches.cc", |   25     "display_switches.cc", | 
|   39     "display_switches.h", |   26     "display_switches.h", | 
|   40     "fake_display_delegate.cc", |   27     "fake_display_delegate.cc", | 
|   41     "fake_display_delegate.h", |   28     "fake_display_delegate.h", | 
|   42     "fake_display_snapshot.cc", |   29     "fake_display_snapshot.cc", | 
|   43     "fake_display_snapshot.h", |   30     "fake_display_snapshot.h", | 
|   44     "ios/screen_ios.mm", |   31     "ios/screen_ios.mm", | 
|   45     "mac/screen_mac.mm", |   32     "mac/screen_mac.mm", | 
|   46     "manager/display_layout.cc", |  | 
|   47     "manager/display_layout.h", |  | 
|   48     "manager/display_layout_builder.cc", |  | 
|   49     "manager/display_layout_builder.h", |  | 
|   50     "manager/display_layout_store.cc", |  | 
|   51     "manager/display_layout_store.h", |  | 
|   52     "manager/display_manager.cc", |  | 
|   53     "manager/display_manager.h", |  | 
|   54     "manager/display_manager_utilities.cc", |  | 
|   55     "manager/display_manager_utilities.h", |  | 
|   56     "manager/managed_display_info.cc", |  | 
|   57     "manager/managed_display_info.h", |  | 
|   58     "screen.cc", |   33     "screen.cc", | 
|   59     "screen.h", |   34     "screen.h", | 
|   60     "screen_aura.cc", |   35     "screen_aura.cc", | 
|   61     "screen_base.cc", |   36     "screen_base.cc", | 
|   62     "screen_base.h", |   37     "screen_base.h", | 
|   63     "win/display_info.cc", |   38     "win/display_info.cc", | 
|   64     "win/display_info.h", |   39     "win/display_info.h", | 
|   65     "win/dpi.cc", |   40     "win/dpi.cc", | 
|   66     "win/dpi.h", |   41     "win/dpi.h", | 
|   67     "win/scaling_util.cc", |   42     "win/scaling_util.cc", | 
|   68     "win/scaling_util.h", |   43     "win/scaling_util.h", | 
|   69     "win/screen_win.cc", |   44     "win/screen_win.cc", | 
|   70     "win/screen_win.h", |   45     "win/screen_win.h", | 
|   71     "win/screen_win_display.cc", |   46     "win/screen_win_display.cc", | 
|   72     "win/screen_win_display.h", |   47     "win/screen_win_display.h", | 
|   73   ] |   48   ] | 
|   74  |   49  | 
|   75   defines = [ "DISPLAY_IMPLEMENTATION" ] |   50   defines = [ "DISPLAY_IMPLEMENTATION" ] | 
|   76  |   51  | 
|   77   public_deps = [ |   52   public_deps = [ | 
|   78     "//ui/display/types", |   53     "//ui/display/types", | 
|   79     "//ui/gfx:gfx", |   54     "//ui/gfx:gfx", | 
|   80   ] |   55   ] | 
|   81  |   56  | 
|   82   deps = [ |   57   deps = [ | 
|   83     "//base", |   58     "//base", | 
|   84     "//third_party/re2", |   59     "//third_party/re2", | 
|   85     "//ui/display/util", |   60     "//ui/display/util", | 
|   86     "//ui/events/devices", |  | 
|   87     "//ui/gfx", |   61     "//ui/gfx", | 
|   88     "//ui/gfx/geometry", |   62     "//ui/gfx/geometry", | 
|   89   ] |   63   ] | 
|   90  |   64  | 
|   91   if (is_chromeos && use_x11) { |  | 
|   92     sources += [ |  | 
|   93       "chromeos/x11/display_mode_x11.cc", |  | 
|   94       "chromeos/x11/display_mode_x11.h", |  | 
|   95       "chromeos/x11/display_snapshot_x11.cc", |  | 
|   96       "chromeos/x11/display_snapshot_x11.h", |  | 
|   97       "chromeos/x11/display_util_x11.cc", |  | 
|   98       "chromeos/x11/display_util_x11.h", |  | 
|   99       "chromeos/x11/native_display_delegate_x11.cc", |  | 
|  100       "chromeos/x11/native_display_delegate_x11.h", |  | 
|  101       "chromeos/x11/native_display_event_dispatcher_x11.cc", |  | 
|  102       "chromeos/x11/native_display_event_dispatcher_x11.h", |  | 
|  103     ] |  | 
|  104  |  | 
|  105     configs += [ |  | 
|  106       "//build/config/linux:x11", |  | 
|  107       "//build/config/linux:xext", |  | 
|  108       "//build/config/linux:xi", |  | 
|  109       "//build/config/linux:xrandr", |  | 
|  110     ] |  | 
|  111  |  | 
|  112     deps += [ "//ui/events/platform" ] |  | 
|  113   } |  | 
|  114  |  | 
|  115   if (use_x11) { |  | 
|  116     deps += [ "//ui/gfx/x" ] |  | 
|  117   } |  | 
|  118  |  | 
|  119   if (!use_aura) { |   65   if (!use_aura) { | 
|  120     sources -= [ "screen_aura.cc" ] |   66     sources -= [ "screen_aura.cc" ] | 
|  121   } |   67   } | 
|  122  |   68  | 
|  123   if (is_mac) { |   69   if (is_mac) { | 
|  124     libs = [ |   70     libs = [ | 
|  125       "AppKit.framework", |   71       "AppKit.framework", | 
|  126       "CoreGraphics.framework", |   72       "CoreGraphics.framework", | 
|  127     ] |   73     ] | 
|  128   } |   74   } | 
|  129 } |   75 } | 
|  130  |   76  | 
|  131 component("display_manager_test_api") { |   77 component("display_manager_test_api") { | 
|  132   testonly = true |   78   testonly = true | 
|  133   sources = [ |   79   sources = [ | 
|  134     "test/display_manager_test_api.cc", |   80     "test/display_manager_test_api.cc", | 
|  135     "test/display_manager_test_api.h", |   81     "test/display_manager_test_api.h", | 
|  136   ] |   82   ] | 
|  137  |   83  | 
|  138   defines = [ "DISPLAY_IMPLEMENTATION" ] |   84   defines = [ "DISPLAY_IMPLEMENTATION" ] | 
|  139  |   85  | 
|  140   public_deps = [ |   86   public_deps = [ | 
|  141     ":display", |   87     "//ui/display/manager", | 
|  142   ] |   88   ] | 
|  143  |   89  | 
|  144   deps = [ |   90   deps = [ | 
|  145     "//base", |   91     "//base", | 
|  146     "//ui/display", |   92     "//ui/display", | 
|  147     "//ui/display/types", |   93     "//ui/display/types", | 
|  148   ] |   94   ] | 
|  149 } |   95 } | 
|  150  |   96  | 
|  151 static_library("test_support") { |   97 static_library("test_support") { | 
|  152   testonly = true |   98   testonly = true | 
|  153   sources = [ |   99   sources = [ | 
|  154     "chromeos/test/action_logger.cc", |  100     "manager/chromeos/test/action_logger.cc", | 
|  155     "chromeos/test/action_logger.h", |  101     "manager/chromeos/test/action_logger.h", | 
|  156     "chromeos/test/action_logger_util.cc", |  102     "manager/chromeos/test/action_logger_util.cc", | 
|  157     "chromeos/test/action_logger_util.h", |  103     "manager/chromeos/test/action_logger_util.h", | 
|  158     "chromeos/test/test_display_layout_manager.cc", |  104     "manager/chromeos/test/test_display_layout_manager.cc", | 
|  159     "chromeos/test/test_display_layout_manager.h", |  105     "manager/chromeos/test/test_display_layout_manager.h", | 
|  160     "chromeos/test/test_native_display_delegate.cc", |  106     "manager/chromeos/test/test_native_display_delegate.cc", | 
|  161     "chromeos/test/test_native_display_delegate.h", |  107     "manager/chromeos/test/test_native_display_delegate.h", | 
|  162     "test/display_matchers.cc", |  108     "test/display_matchers.cc", | 
|  163     "test/display_matchers.h", |  109     "test/display_matchers.h", | 
|  164     "test/display_test_util.h", |  110     "test/display_test_util.h", | 
|  165     "test/test_screen.cc", |  111     "test/test_screen.cc", | 
|  166     "test/test_screen.h", |  112     "test/test_screen.h", | 
|  167     "win/test/screen_util_win.cc", |  113     "win/test/screen_util_win.cc", | 
|  168     "win/test/screen_util_win.h", |  114     "win/test/screen_util_win.h", | 
|  169   ] |  115   ] | 
|  170  |  116  | 
|  171   public_deps = [ |  117   public_deps = [ | 
|  172     ":display", |  118     ":display", | 
 |  119     "//ui/display/manager", | 
|  173   ] |  120   ] | 
|  174   deps = [ |  121   deps = [ | 
|  175     "//base", |  122     "//base", | 
|  176     "//testing/gmock", |  123     "//testing/gmock", | 
|  177     "//ui/display/types", |  124     "//ui/display/types", | 
|  178     "//ui/gfx", |  125     "//ui/gfx", | 
|  179     "//ui/gfx:test_support", |  126     "//ui/gfx:test_support", | 
|  180     "//ui/gfx/geometry", |  127     "//ui/gfx/geometry", | 
|  181   ] |  128   ] | 
|  182 } |  129 } | 
|  183  |  130  | 
|  184 # This test covers all testable components in display. |  131 # This test covers all testable components in display. | 
|  185 test("display_unittests") { |  132 test("display_unittests") { | 
|  186   sources = [ |  133   sources = [ | 
|  187     "chromeos/apply_content_protection_task_unittest.cc", |  | 
|  188     "chromeos/configure_displays_task_unittest.cc", |  | 
|  189     "chromeos/display_configurator_unittest.cc", |  | 
|  190     "chromeos/query_content_protection_task_unittest.cc", |  | 
|  191     "chromeos/touchscreen_util_unittest.cc", |  | 
|  192     "chromeos/update_display_configuration_task_unittest.cc", |  | 
|  193     "display_change_notifier_unittest.cc", |  134     "display_change_notifier_unittest.cc", | 
|  194     "display_list_unittest.cc", |  135     "display_list_unittest.cc", | 
|  195     "display_unittest.cc", |  136     "display_unittest.cc", | 
|  196     "fake_display_snapshot_unittests.cc", |  137     "fake_display_snapshot_unittests.cc", | 
 |  138     "manager/chromeos/apply_content_protection_task_unittest.cc", | 
 |  139     "manager/chromeos/configure_displays_task_unittest.cc", | 
 |  140     "manager/chromeos/display_configurator_unittest.cc", | 
 |  141     "manager/chromeos/query_content_protection_task_unittest.cc", | 
 |  142     "manager/chromeos/touchscreen_util_unittest.cc", | 
 |  143     "manager/chromeos/update_display_configuration_task_unittest.cc", | 
|  197     "manager/display_layout_builder_unittest.cc", |  144     "manager/display_layout_builder_unittest.cc", | 
|  198     "manager/display_layout_unittest.cc", |  145     "manager/display_layout_unittest.cc", | 
|  199     "manager/display_manager_utilities_unittest.cc", |  146     "manager/display_manager_utilities_unittest.cc", | 
|  200     "manager/managed_display_info_unittest.cc", |  147     "manager/managed_display_info_unittest.cc", | 
|  201     "screen_unittest.cc", |  148     "screen_unittest.cc", | 
|  202     "util/display_util_unittest.cc", |  149     "util/display_util_unittest.cc", | 
|  203     "util/edid_parser_unittest.cc", |  150     "util/edid_parser_unittest.cc", | 
|  204     "win/scaling_util_unittest.cc", |  151     "win/scaling_util_unittest.cc", | 
|  205     "win/screen_win_unittest.cc", |  152     "win/screen_win_unittest.cc", | 
|  206   ] |  153   ] | 
|  207  |  154  | 
|  208   deps = [ |  155   deps = [ | 
|  209     ":display", |  156     ":display", | 
|  210     ":display_manager_test_api", |  157     ":display_manager_test_api", | 
|  211     ":test_support", |  158     ":test_support", | 
|  212     "//base", |  159     "//base", | 
|  213     "//base/test:run_all_unittests", |  160     "//base/test:run_all_unittests", | 
|  214     "//base/test:test_support", |  161     "//base/test:test_support", | 
|  215     "//testing/gmock", |  162     "//testing/gmock", | 
|  216     "//testing/gtest", |  163     "//testing/gtest", | 
 |  164     "//ui/display/manager", | 
|  217     "//ui/display/types", |  165     "//ui/display/types", | 
|  218     "//ui/display/util", |  166     "//ui/display/util", | 
|  219     "//ui/events/devices", |  167     "//ui/events/devices", | 
|  220     "//ui/gfx:test_support", |  168     "//ui/gfx:test_support", | 
|  221     "//ui/gfx/geometry", |  169     "//ui/gfx/geometry", | 
|  222   ] |  170   ] | 
|  223  |  171  | 
|  224   if (is_android) { |  172   if (is_android) { | 
|  225     # Do not run display_change_notifier_unittest.cc on Android because it |  173     # Do not run display_change_notifier_unittest.cc on Android because it | 
|  226     # does not compile display_observer.cc |  174     # does not compile display_observer.cc | 
|  227     sources -= [ "display_change_notifier_unittest.cc" ] |  175     sources -= [ "display_change_notifier_unittest.cc" ] | 
|  228   } |  176   } | 
|  229  |  177  | 
|  230   if (is_chromeos && use_x11) { |  178   if (is_chromeos && use_x11) { | 
|  231     sources += [ |  179     sources += [ | 
|  232       "chromeos/x11/display_util_x11_unittest.cc", |  180       "manager/chromeos/x11/display_util_x11_unittest.cc", | 
|  233       "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", |  181       "manager/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", | 
|  234     ] |  182     ] | 
|  235   } |  183   } | 
|  236 } |  184 } | 
| OLD | NEW |