| 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_overrides/v8.gni") |  | 
|    6 import("//mojo/public/mojo_application.gni") |  | 
|    7 import("//testing/test.gni") |  | 
|    8 import("//tools/grit/grit_rule.gni") |  | 
|    9 import("//tools/grit/repack.gni") |  | 
|   10  |  | 
|   11 if (is_android) { |  | 
|   12   import("//build/config/android/rules.gni") |  | 
|   13 } |  | 
|   14  |  | 
|   15 grit("html_viewer_resources_grit") { |  | 
|   16   source = "html_viewer_resources.grd" |  | 
|   17   outputs = [ |  | 
|   18     "grit/html_viewer_resources.h", |  | 
|   19     "html_viewer_resources.pak", |  | 
|   20   ] |  | 
|   21 } |  | 
|   22  |  | 
|   23 copy("copy_html_viewer_resources") { |  | 
|   24   sources = [ |  | 
|   25     "$target_gen_dir/html_viewer_resources.pak", |  | 
|   26   ] |  | 
|   27   outputs = [ |  | 
|   28     "$root_out_dir/html_viewer_resources.pak", |  | 
|   29   ] |  | 
|   30  |  | 
|   31   public_deps = [ |  | 
|   32     ":html_viewer_resources_grit", |  | 
|   33   ] |  | 
|   34 } |  | 
|   35  |  | 
|   36 repack("pak") { |  | 
|   37   sources = [ |  | 
|   38     "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak"
     , |  | 
|   39     "$root_gen_dir/blink/public/resources/blink_resources.pak", |  | 
|   40     "$root_gen_dir/components/html_viewer/html_viewer_resources.pak", |  | 
|   41     "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", |  | 
|   42     "$root_gen_dir/ui/strings/ui_strings_en-US.pak", |  | 
|   43   ] |  | 
|   44   if (!is_component_build) { |  | 
|   45     sources += [ "$root_gen_dir/ui/resources/ui_resources_100_percent.pak" ] |  | 
|   46   } |  | 
|   47   output = "$root_out_dir/html_viewer.pak" |  | 
|   48   deps = [ |  | 
|   49     ":copy_html_viewer_resources", |  | 
|   50     "//third_party/WebKit/public:image_resources", |  | 
|   51     "//third_party/WebKit/public:resources", |  | 
|   52     "//ui/resources", |  | 
|   53     "//ui/strings", |  | 
|   54   ] |  | 
|   55 } |  | 
|   56  |  | 
|   57 source_set("lib") { |  | 
|   58   sources = [ |  | 
|   59     "ax_provider_impl.cc", |  | 
|   60     "ax_provider_impl.h", |  | 
|   61     "blink_basic_type_converters.cc", |  | 
|   62     "blink_basic_type_converters.h", |  | 
|   63     "blink_find_type_converters.cc", |  | 
|   64     "blink_find_type_converters.h", |  | 
|   65     "blink_platform_impl.cc", |  | 
|   66     "blink_platform_impl.h", |  | 
|   67     "blink_resource_constants.h", |  | 
|   68     "blink_settings.cc", |  | 
|   69     "blink_settings.h", |  | 
|   70     "blink_settings_impl.cc", |  | 
|   71     "blink_settings_impl.h", |  | 
|   72     "blink_text_input_type_converters.cc", |  | 
|   73     "blink_text_input_type_converters.h", |  | 
|   74     "blink_url_request_type_converters.cc", |  | 
|   75     "blink_url_request_type_converters.h", |  | 
|   76     "content_handler_impl.cc", |  | 
|   77     "content_handler_impl.h", |  | 
|   78     "devtools_agent_impl.cc", |  | 
|   79     "devtools_agent_impl.h", |  | 
|   80     "discardable_memory_allocator.cc", |  | 
|   81     "discardable_memory_allocator.h", |  | 
|   82     "document_resource_waiter.cc", |  | 
|   83     "document_resource_waiter.h", |  | 
|   84     "geolocation_client_impl.cc", |  | 
|   85     "geolocation_client_impl.h", |  | 
|   86     "global_state.cc", |  | 
|   87     "global_state.h", |  | 
|   88     "html_document.cc", |  | 
|   89     "html_document.h", |  | 
|   90     "html_document_application_delegate.cc", |  | 
|   91     "html_document_application_delegate.h", |  | 
|   92     "html_factory.h", |  | 
|   93     "html_frame.cc", |  | 
|   94     "html_frame.h", |  | 
|   95     "html_frame_delegate.h", |  | 
|   96     "html_frame_properties.cc", |  | 
|   97     "html_frame_properties.h", |  | 
|   98     "html_frame_tree_manager.cc", |  | 
|   99     "html_frame_tree_manager.h", |  | 
|  100     "html_frame_tree_manager_observer.h", |  | 
|  101     "html_viewer.cc", |  | 
|  102     "html_viewer.h", |  | 
|  103     "html_widget.cc", |  | 
|  104     "html_widget.h", |  | 
|  105     "ime_controller.cc", |  | 
|  106     "ime_controller.h", |  | 
|  107     "media_factory.cc", |  | 
|  108     "media_factory.h", |  | 
|  109     "mock_web_blob_registry_impl.cc", |  | 
|  110     "mock_web_blob_registry_impl.h", |  | 
|  111     "replicated_frame_state.cc", |  | 
|  112     "replicated_frame_state.h", |  | 
|  113     "stats_collection_controller.cc", |  | 
|  114     "stats_collection_controller.h", |  | 
|  115     "test_html_viewer_impl.cc", |  | 
|  116     "test_html_viewer_impl.h", |  | 
|  117     "touch_handler.cc", |  | 
|  118     "touch_handler.h", |  | 
|  119     "web_clipboard_impl.cc", |  | 
|  120     "web_clipboard_impl.h", |  | 
|  121     "web_cookie_jar_impl.cc", |  | 
|  122     "web_cookie_jar_impl.h", |  | 
|  123     "web_graphics_context_3d_command_buffer_impl.cc", |  | 
|  124     "web_graphics_context_3d_command_buffer_impl.h", |  | 
|  125     "web_layer_tree_view_impl.cc", |  | 
|  126     "web_layer_tree_view_impl.h", |  | 
|  127     "web_mime_registry_impl.cc", |  | 
|  128     "web_mime_registry_impl.h", |  | 
|  129     "web_notification_manager_impl.cc", |  | 
|  130     "web_notification_manager_impl.h", |  | 
|  131     "web_preferences.cc", |  | 
|  132     "web_preferences.h", |  | 
|  133     "web_socket_handle_impl.cc", |  | 
|  134     "web_socket_handle_impl.h", |  | 
|  135     "web_storage_namespace_impl.cc", |  | 
|  136     "web_storage_namespace_impl.h", |  | 
|  137     "web_theme_engine_impl.cc", |  | 
|  138     "web_theme_engine_impl.h", |  | 
|  139     "web_url_loader_impl.cc", |  | 
|  140     "web_url_loader_impl.h", |  | 
|  141   ] |  | 
|  142  |  | 
|  143   include_dirs = [ "third_party/WebKit" ] |  | 
|  144  |  | 
|  145   deps = [ |  | 
|  146     "//base", |  | 
|  147     "//base:i18n", |  | 
|  148     "//base/third_party/dynamic_annotations", |  | 
|  149     "//cc", |  | 
|  150     "//cc/blink", |  | 
|  151     "//cc/surfaces", |  | 
|  152     "//cc/surfaces:surface_id", |  | 
|  153     "//components/clipboard/public/interfaces", |  | 
|  154     "//components/devtools_service/public/interfaces", |  | 
|  155     "//components/html_viewer/public/interfaces", |  | 
|  156     "//components/message_port", |  | 
|  157     "//components/mime_util", |  | 
|  158     "//components/mus/gles2:lib", |  | 
|  159     "//components/mus/public/interfaces", |  | 
|  160     "//components/resource_provider/public/cpp", |  | 
|  161     "//components/resource_provider/public/interfaces", |  | 
|  162     "//components/scheduler:scheduler", |  | 
|  163     "//components/startup_metric_utils/browser:lib", |  | 
|  164     "//components/web_view:switches", |  | 
|  165     "//components/web_view/public/interfaces", |  | 
|  166     "//components/webcrypto", |  | 
|  167     "//gin", |  | 
|  168     "//gpu/blink:blink", |  | 
|  169     "//gpu/command_buffer/common:gles2_utils", |  | 
|  170     "//media", |  | 
|  171     "//media:shared_memory_support", |  | 
|  172     "//media/blink", |  | 
|  173     "//media/mojo", |  | 
|  174     "//mojo/common", |  | 
|  175     "//mojo/converters/blink", |  | 
|  176     "//mojo/converters/surfaces", |  | 
|  177     "//mojo/gles2:headers", |  | 
|  178     "//mojo/gpu:mojo_gles2_implementation", |  | 
|  179     "//mojo/logging", |  | 
|  180     "//mojo/message_pump", |  | 
|  181     "//mojo/platform_handle", |  | 
|  182     "//mojo/public/cpp/environment:environment", |  | 
|  183     "//mojo/services/accessibility/public/interfaces", |  | 
|  184     "//mojo/services/network/public/cpp", |  | 
|  185     "//mojo/services/network/public/interfaces", |  | 
|  186     "//mojo/services/tracing/public/cpp", |  | 
|  187     "//mojo/services/tracing/public/interfaces", |  | 
|  188     "//mojo/shell/public/cpp", |  | 
|  189     "//mojo/shell/public/interfaces", |  | 
|  190     "//net", |  | 
|  191     "//skia", |  | 
|  192     "//third_party/WebKit/public:image_resources", |  | 
|  193     "//third_party/WebKit/public:resources", |  | 
|  194     "//ui/base:base", |  | 
|  195     "//ui/events", |  | 
|  196     "//ui/events:gesture_detection", |  | 
|  197     "//ui/events/blink", |  | 
|  198     "//ui/events/gestures/blink", |  | 
|  199     "//ui/gfx", |  | 
|  200     "//ui/gfx/geometry", |  | 
|  201     "//ui/mojo/geometry:interfaces_cpp_sources", |  | 
|  202     "//ui/mojo/ime:interfaces_cpp_sources", |  | 
|  203     "//ui/mojo/init", |  | 
|  204     "//ui/native_theme", |  | 
|  205     "//url", |  | 
|  206     "//v8", |  | 
|  207   ] |  | 
|  208  |  | 
|  209   public_deps = [ |  | 
|  210     "//components/mus/public/cpp", |  | 
|  211     "//mojo/public/cpp/bindings", |  | 
|  212     "//third_party/WebKit/public:blink", |  | 
|  213   ] |  | 
|  214  |  | 
|  215   if (is_win) { |  | 
|  216     sources += [ "html_viewer_version.rc" ] |  | 
|  217   } |  | 
|  218  |  | 
|  219   if (is_linux && !is_android) { |  | 
|  220     deps += [ "//components/font_service/public/cpp" ] |  | 
|  221   } |  | 
|  222  |  | 
|  223   data_deps = [ |  | 
|  224     "//components/clipboard", |  | 
|  225     "//components/mus/ws:lib", |  | 
|  226     "//mojo/services/network:network", |  | 
|  227     "//mojo/services/tracing", |  | 
|  228   ] |  | 
|  229  |  | 
|  230   configs += [ "//v8:external_startup_data" ] |  | 
|  231 } |  | 
|  232  |  | 
|  233 mojo_native_application("html_viewer") { |  | 
|  234   sources = [ |  | 
|  235     "html_viewer_main.cc", |  | 
|  236   ] |  | 
|  237   deps = [ |  | 
|  238     ":lib", |  | 
|  239     ":pak", |  | 
|  240     "//base", |  | 
|  241     "//mojo/shell/public/cpp:sources", |  | 
|  242   ] |  | 
|  243   resources = [ "$root_out_dir/html_viewer.pak" ] |  | 
|  244  |  | 
|  245   if (v8_use_external_startup_data) { |  | 
|  246     resources += [ |  | 
|  247       "$root_out_dir/natives_blob.bin", |  | 
|  248       "$root_out_dir/snapshot_blob.bin", |  | 
|  249     ] |  | 
|  250     deps += [ "//gin" ] |  | 
|  251   } |  | 
|  252 } |  | 
|  253  |  | 
|  254 mojo_native_application("layout_test_html_viewer") { |  | 
|  255   testonly = true |  | 
|  256   sources = [ |  | 
|  257     "layout_test_blink_settings_impl.cc", |  | 
|  258     "layout_test_blink_settings_impl.h", |  | 
|  259     "layout_test_content_handler_impl.cc", |  | 
|  260     "layout_test_content_handler_impl.h", |  | 
|  261     "layout_test_html_viewer.cc", |  | 
|  262     "layout_test_html_viewer.h", |  | 
|  263     "layout_test_html_viewer_main.cc", |  | 
|  264     "web_test_delegate_impl.cc", |  | 
|  265     "web_test_delegate_impl.h", |  | 
|  266   ] |  | 
|  267   deps = [ |  | 
|  268     ":lib", |  | 
|  269     ":pak", |  | 
|  270     "//cc", |  | 
|  271     "//components/test_runner", |  | 
|  272     "//components/web_view/test_runner/public/interfaces", |  | 
|  273     "//mojo/public/c/system:for_shared_library", |  | 
|  274     "//mojo/shell/public/cpp:sources", |  | 
|  275     "//third_party/WebKit/public:blink", |  | 
|  276     "//third_party/WebKit/public:test_support", |  | 
|  277     "//ui/base", |  | 
|  278     "//url", |  | 
|  279   ] |  | 
|  280   resources = [ "$root_out_dir/html_viewer.pak" ] |  | 
|  281  |  | 
|  282   if (v8_use_external_startup_data) { |  | 
|  283     resources += [ |  | 
|  284       "$root_out_dir/natives_blob.bin", |  | 
|  285       "$root_out_dir/snapshot_blob.bin", |  | 
|  286     ] |  | 
|  287     deps += [ "//gin" ] |  | 
|  288   } |  | 
|  289 } |  | 
|  290  |  | 
|  291 if (is_android) { |  | 
|  292   android_assets("unittest_assets") { |  | 
|  293     sources = [ |  | 
|  294       "$root_build_dir/html_viewer.pak", |  | 
|  295     ] |  | 
|  296     deps = [ |  | 
|  297       ":pak", |  | 
|  298       "//v8:v8_external_startup_data_assets", |  | 
|  299     ] |  | 
|  300     disable_compression = true |  | 
|  301   } |  | 
|  302 } |  | 
|  303  |  | 
|  304 test("html_viewer_unittests") { |  | 
|  305   sources = [ |  | 
|  306     "ax_provider_impl_unittest.cc", |  | 
|  307     "discardable_memory_allocator_unittest.cc", |  | 
|  308     "input_events_unittest.cc", |  | 
|  309     "run_all_unittests.cc", |  | 
|  310   ] |  | 
|  311   deps = [ |  | 
|  312     ":lib", |  | 
|  313     ":pak", |  | 
|  314     "//base/test:test_support", |  | 
|  315     "//components/scheduler", |  | 
|  316     "//gin", |  | 
|  317     "//mojo/converters/blink", |  | 
|  318     "//mojo/converters/input_events", |  | 
|  319     "//mojo/gles2", |  | 
|  320     "//mojo/platform_handle:platform_handle_impl", |  | 
|  321     "//testing/gtest:gtest", |  | 
|  322     "//third_party/mojo/src/mojo/edk/system", |  | 
|  323     "//ui/base", |  | 
|  324     "//ui/events", |  | 
|  325     "//ui/events:test_support", |  | 
|  326     "//ui/mojo/init", |  | 
|  327   ] |  | 
|  328  |  | 
|  329   if (is_android) { |  | 
|  330     deps += [ ":unittest_assets" ] |  | 
|  331     write_asset_list = true |  | 
|  332   } |  | 
|  333  |  | 
|  334   configs += [ "//v8:external_startup_data" ] |  | 
|  335 } |  | 
|  336  |  | 
|  337 mojo_native_application("apptests") { |  | 
|  338   output_name = "html_viewer_apptests" |  | 
|  339   testonly = true |  | 
|  340  |  | 
|  341   sources = [ |  | 
|  342     "ax_provider_apptest.cc", |  | 
|  343     "html_frame_apptest.cc", |  | 
|  344   ] |  | 
|  345  |  | 
|  346   deps = [ |  | 
|  347     "//base", |  | 
|  348     "//components/html_viewer/public/interfaces", |  | 
|  349     "//components/mus/public/cpp", |  | 
|  350     "//components/mus/public/cpp/tests:test_support", |  | 
|  351     "//components/scheduler", |  | 
|  352     "//components/web_view:lib", |  | 
|  353     "//components/web_view:test_support", |  | 
|  354     "//components/web_view/public/interfaces", |  | 
|  355     "//mojo/converters/network", |  | 
|  356     "//mojo/public/c/system:for_shared_library", |  | 
|  357     "//mojo/services/accessibility/public/interfaces", |  | 
|  358     "//mojo/shell/public/cpp:sources", |  | 
|  359     "//mojo/shell/public/cpp:test_support", |  | 
|  360     "//net:test_support", |  | 
|  361     "//testing/gtest", |  | 
|  362   ] |  | 
|  363  |  | 
|  364   data_deps = [ |  | 
|  365     ":html_viewer", |  | 
|  366   ] |  | 
|  367  |  | 
|  368   if (is_linux && !is_android) { |  | 
|  369     data_deps += [ "//components/font_service" ] |  | 
|  370   } |  | 
|  371 } |  | 
| OLD | NEW |