jamescook | 6211792 | 2014-10-20 14:35:11 | [diff] [blame] | 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("//tools/grit/grit_rule.gni") |
| 6 | |
| 7 | grit("resources") { |
| 8 | source = "app_shell_resources.grd" |
| 9 | outputs = [ |
| 10 | "grit/app_shell_resources.h", |
| 11 | "app_shell_resources.pak", |
| 12 | ] |
| 13 | } |
mukai | a3cb150 | 2014-10-29 06:43:08 | [diff] [blame^] | 14 | |
| 15 | source_set("app_shell_lib") { |
| 16 | # This library is testonly because it depends on testonly libarries, |
| 17 | # namely //base:prefs_test_support and //content/shell:content_shell_lib |
| 18 | # TODO(jamescook): investigate and get rid of test dependencies. |
| 19 | testonly = true |
| 20 | deps = [ |
| 21 | ":resources", |
| 22 | ":version_header", |
| 23 | "//base", |
| 24 | "//base:prefs_test_support", |
| 25 | "//components/omaha_query_params", |
| 26 | "//components/pref_registry", |
| 27 | "//components/user_prefs", |
| 28 | "//components/web_cache/renderer", |
| 29 | "//content", |
| 30 | "//content/shell:content_shell_lib", |
| 31 | "//device/core", |
| 32 | "//device/hid", |
| 33 | "//extensions/common/api", |
| 34 | "//extensions/common/api:api_registration", |
| 35 | "//extensions/browser", |
| 36 | "//extensions/common", |
| 37 | "//extensions/renderer", |
| 38 | "//extensions/shell/common/api", |
| 39 | "//extensions/shell/common/api:api_registration", |
| 40 | "//extensions:extensions_resources", |
| 41 | "//extensions:shell_and_test_pak", |
| 42 | "//mojo/edk/system", |
| 43 | "//mojo/environment:chromium", |
| 44 | "//skia", |
| 45 | "//third_party/WebKit/public:blink", |
| 46 | "//ui/wm", |
| 47 | "//v8", |
| 48 | ] |
| 49 | sources = [ |
| 50 | "app/shell_main_delegate.cc", |
| 51 | "app/shell_main_delegate.h", |
| 52 | "browser/api/identity/identity_api.cc", |
| 53 | "browser/api/identity/identity_api.h", |
| 54 | "browser/default_shell_browser_main_delegate.cc", |
| 55 | "browser/default_shell_browser_main_delegate.h", |
| 56 | "browser/desktop_controller.cc", |
| 57 | "browser/desktop_controller.h", |
| 58 | "browser/media_capture_util.cc", |
| 59 | "browser/media_capture_util.h", |
| 60 | "browser/shell_app_delegate.cc", |
| 61 | "browser/shell_app_delegate.h", |
| 62 | "browser/shell_app_window_client.cc", |
| 63 | "browser/shell_app_window_client.h", |
| 64 | "browser/shell_audio_controller_chromeos.cc", |
| 65 | "browser/shell_audio_controller_chromeos.h", |
| 66 | "browser/shell_browser_context.cc", |
| 67 | "browser/shell_browser_context.h", |
| 68 | "browser/shell_browser_main_delegate.h", |
| 69 | "browser/shell_browser_main_parts.cc", |
| 70 | "browser/shell_browser_main_parts.h", |
| 71 | "browser/shell_content_browser_client.cc", |
| 72 | "browser/shell_content_browser_client.h", |
| 73 | "browser/shell_desktop_controller.cc", |
| 74 | "browser/shell_desktop_controller.h", |
| 75 | "browser/shell_device_client.cc", |
| 76 | "browser/shell_device_client.h", |
| 77 | "browser/shell_display_info_provider.cc", |
| 78 | "browser/shell_display_info_provider.h", |
| 79 | "browser/shell_extension_host_delegate.cc", |
| 80 | "browser/shell_extension_host_delegate.h", |
| 81 | "browser/shell_extension_system.cc", |
| 82 | "browser/shell_extension_system.h", |
| 83 | "browser/shell_extension_system_factory.cc", |
| 84 | "browser/shell_extension_system_factory.h", |
| 85 | "browser/shell_extension_web_contents_observer.cc", |
| 86 | "browser/shell_extension_web_contents_observer.h", |
| 87 | "browser/shell_extensions_browser_client.cc", |
| 88 | "browser/shell_extensions_browser_client.h", |
| 89 | "browser/shell_native_app_window.cc", |
| 90 | "browser/shell_native_app_window.h", |
| 91 | "browser/shell_network_controller_chromeos.cc", |
| 92 | "browser/shell_network_controller_chromeos.h", |
| 93 | "browser/shell_network_delegate.cc", |
| 94 | "browser/shell_network_delegate.h", |
| 95 | "browser/shell_oauth2_token_service.cc", |
| 96 | "browser/shell_oauth2_token_service.h", |
| 97 | "browser/shell_omaha_query_params_delegate.cc", |
| 98 | "browser/shell_omaha_query_params_delegate.h", |
| 99 | "browser/shell_runtime_api_delegate.cc", |
| 100 | "browser/shell_runtime_api_delegate.h", |
| 101 | "browser/shell_special_storage_policy.cc", |
| 102 | "browser/shell_special_storage_policy.h", |
| 103 | "browser/shell_url_request_context_getter.cc", |
| 104 | "browser/shell_url_request_context_getter.h", |
| 105 | "browser/shell_web_contents_modal_dialog_manager.cc", |
| 106 | "common/shell_content_client.cc", |
| 107 | "common/shell_content_client.h", |
| 108 | "common/shell_extensions_client.cc", |
| 109 | "common/shell_extensions_client.h", |
| 110 | "common/switches.cc", |
| 111 | "common/switches.h", |
| 112 | "renderer/shell_content_renderer_client.cc", |
| 113 | "renderer/shell_content_renderer_client.h", |
| 114 | "renderer/shell_extensions_renderer_client.cc", |
| 115 | "renderer/shell_extensions_renderer_client.h", |
| 116 | ] |
| 117 | if (is_chromeos) { |
| 118 | deps += [ |
| 119 | "//chromeos", |
| 120 | "//ui/chromeos:ui_chromeos", |
| 121 | "//ui/display", |
| 122 | ] |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | executable("app_shell") { |
| 127 | # testonly because :app_shell_lib is testonly. See :app_shell_lib comment. |
| 128 | testonly = true |
| 129 | deps = [ |
| 130 | ":app_shell_lib", |
| 131 | "//extensions:shell_and_test_pak", |
| 132 | ] |
| 133 | sources = [ "app/shell_main.cc" ] |
| 134 | } |
| 135 | |
| 136 | action("version_header") { |
| 137 | script = "//build/util/version.py" |
| 138 | version_path = "//chrome/VERSION" |
| 139 | lastchange_path = "//build/util/LASTCHANGE" |
| 140 | version_h = "common/version.h.in" |
| 141 | version_full = exec_script( |
| 142 | script, |
| 143 | ["-f", rebase_path(version_path, root_build_dir), |
| 144 | "-t", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"], |
| 145 | "trim string", |
| 146 | ["VERSION"]) |
| 147 | inputs = [ |
| 148 | lastchange_path, |
| 149 | version_path, |
| 150 | version_h |
| 151 | ] |
| 152 | outputs = [ "$target_gen_dir/common/version.h" ] |
| 153 | args = [ |
| 154 | "-f", rebase_path(lastchange_path, root_build_dir), |
| 155 | "-e", "VERSION_FULL=\"$version_full\"", |
| 156 | rebase_path(version_h, root_build_dir), |
| 157 | rebase_path("$target_gen_dir/common/version.h") |
| 158 | ] |
| 159 | } |