# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/ui.gni") import("//chrome/version.gni") import("//testing/test.gni") shared_library("metro_driver") { sources = [ "display_properties.cc", "display_properties.h", "metro_driver.cc", "metro_driver.h", "metro_driver_win7.cc", "stdafx.h", "winrt_utils.cc", "winrt_utils.h", ] deps = [ ":copy_resources", ":version_resources", "//base", "//chrome/common:constants", "//chrome/installer/util:with_no_strings", "//crypto", "//ipc", "//sandbox", "//ui/events", "//ui/gfx", "//ui/gfx/geometry", "//ui/metro_viewer", "//url", ] if (use_aura) { sources += [ "chrome_app_view_ash.cc", "chrome_app_view_ash.h", "direct3d_helper.cc", "direct3d_helper.h", "file_picker_ash.cc", "file_picker_ash.h", ] deps += [ "//ui/events:gesture_detection", "//win8:metro_viewer_constants", "//win8/metro_driver/ime", ] } else { sources = [ "chrome_app_view.cc", "chrome_app_view.h", "chrome_url_launch_handler.cc", "chrome_url_launch_handler.h", "devices_handler.cc", "devices_handler.h", "file_picker.cc", "file_picker.h", "metro_dialog_box.cc", "metro_dialog_box.h", "print_document_source.cc", "print_document_source.h", "print_handler.cc", "print_handler.h", "secondary_tile.cc", "secondary_tile.h", "settings_handler.cc", "settings_handler.h", "toast_notification_handler.cc", "toast_notification_handler.h", ] } libs = [ "D2D1.lib", "D3D11.lib", "runtimeobject.lib", ] ldflags = [ "/DELAYLOAD:API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL", "/DELAYLOAD:API-MS-WIN-CORE-WINRT-L1-1-0.DLL", "/DELAYLOAD:API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL", ] } process_version("version_resources") { visibility = [ ":*" ] sources = [ "metro_driver_dll.ver", ] output = "$target_gen_dir/metro_driver_dll_version.rc" template_file = chrome_version_rc_template } copy("copy_resources") { visibility = [ ":*" ] sources = [ "resources/Logo.png", "resources/SecondaryTile.png", "resources/SmallLogo.png", "resources/chrome.VisualElementsManifest.xml", ] outputs = [ "$root_out_dir/{{source_file_part}}", ] } test("metro_driver_unittests") { sources = [ "run_all_unittests.cc", "winrt_utils.cc", "winrt_utils.h", "winrt_utils_unittest.cc", ] deps = [ ":metro_driver", "//base", "//chrome/installer/util:with_rc_strings", "//testing/gtest", ] }