Home | History | Annotate | Download | only in base
      1 # Copyright 2018 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("//mojo/public/tools/bindings/mojom.gni")
      6 
      7 component("base") {
      8   output_name = "mojo_base_lib"
      9 
     10   sources = [
     11     "big_buffer.cc",
     12     "big_buffer.h",
     13   ]
     14 
     15   defines = [ "IS_MOJO_BASE_IMPL" ]
     16 
     17   public_deps = [
     18     "//base",
     19     "//mojo/public/cpp/bindings",
     20     "//mojo/public/cpp/system",
     21   ]
     22 }
     23 
     24 # Normally typemap traits sources should be build directly into mojom targets
     25 # via the typemap file. This target is for typemapped mojo_base types whose
     26 # traits are shared between chromium and blink variants.
     27 component("shared_typemap_traits") {
     28   output_name = "mojo_base_shared_typemap_traits"
     29 
     30   sources = [
     31     "big_buffer_mojom_traits.cc",
     32     "big_buffer_mojom_traits.h",
     33     "file_info_mojom_traits.cc",
     34     "file_info_mojom_traits.h",
     35     "file_path_mojom_traits.cc",
     36     "file_path_mojom_traits.h",
     37     "shared_memory_mojom_traits.cc",
     38     "shared_memory_mojom_traits.h",
     39     "time_mojom_traits.cc",
     40     "time_mojom_traits.h",
     41     "values_mojom_traits.cc",
     42     "values_mojom_traits.h",
     43   ]
     44 
     45   defines = [ "IS_MOJO_BASE_SHARED_TRAITS_IMPL" ]
     46 
     47   public_deps = [
     48     ":base",
     49     "//base:i18n",
     50     "//mojo/public/mojom/base:base_shared",
     51   ]
     52 }
     53 
     54 source_set("tests") {
     55   testonly = true
     56 
     57   sources = [
     58     "big_buffer_unittest.cc",
     59     "big_string_unittest.cc",
     60     "file_path_unittest.cc",
     61     "file_unittest.cc",
     62     "memory_allocator_dump_cross_process_uid_unittest.cc",
     63     "process_id_unittest.cc",
     64     "read_only_buffer_unittest.cc",
     65     "ref_counted_memory_unittest.cc",
     66     "shared_memory_unittest.cc",
     67     "string16_unittest.cc",
     68     "text_direction_unittest.cc",
     69     "thread_priority_unittest.cc",
     70     "time_unittest.cc",
     71     "unguessable_token_unittest.cc",
     72     "values_unittest.cc",
     73   ]
     74 
     75   public_deps = [
     76     ":base",
     77     ":shared_typemap_traits",
     78     "//base",
     79     "//base/test:test_support",
     80     "//mojo/public/cpp/test_support:test_utils",
     81     "//mojo/public/mojom/base",
     82     "//mojo/public/mojom/base:read_only_buffer",
     83     "//testing/gtest",
     84   ]
     85 }
     86