summaryrefslogtreecommitdiffstats
path: root/components/bookmarks.gypi
blob: 00b45b711fcfb8ba8aa94b952577aae3a1b73fdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Copyright 2014 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.

{
  'targets': [
    {
      # GN version: //components/bookmarks/browser
      'target_name': 'bookmarks_browser',
      'type': 'static_library',
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        '../base/base.gyp:base',
        '../base/base.gyp:base_i18n',
        '../net/net.gyp:net',
        '../third_party/icu/icu.gyp:icui18n',
        '../third_party/icu/icu.gyp:icuuc',
        '../ui/base/ui_base.gyp:ui_base',
        '../ui/gfx/gfx.gyp:gfx',
        '../url/url.gyp:url_lib',
        'bookmarks_common',
        'components_strings.gyp:components_strings',
        'favicon_base',
        'keyed_service_core',
        'pref_registry',
        'query_parser',
        'startup_metric_utils',
        'url_formatter/url_formatter.gyp:url_formatter',
      ],
      'sources': [
        'bookmarks/browser/base_bookmark_model_observer.cc',
        'bookmarks/browser/base_bookmark_model_observer.h',
        'bookmarks/browser/bookmark_client.cc',
        'bookmarks/browser/bookmark_client.h',
        'bookmarks/browser/bookmark_codec.cc',
        'bookmarks/browser/bookmark_codec.h',
        'bookmarks/browser/bookmark_expanded_state_tracker.cc',
        'bookmarks/browser/bookmark_expanded_state_tracker.h',
        'bookmarks/browser/bookmark_index.cc',
        'bookmarks/browser/bookmark_index.h',
        'bookmarks/browser/bookmark_match.cc',
        'bookmarks/browser/bookmark_match.h',
        'bookmarks/browser/bookmark_model.cc',
        'bookmarks/browser/bookmark_model.h',
        'bookmarks/browser/bookmark_model_observer.h',
        'bookmarks/browser/bookmark_node.cc',
        'bookmarks/browser/bookmark_node.h',
        'bookmarks/browser/bookmark_node_data.cc',
        'bookmarks/browser/bookmark_node_data.h',
        'bookmarks/browser/bookmark_node_data_ios.cc',
        'bookmarks/browser/bookmark_node_data_mac.cc',
        'bookmarks/browser/bookmark_node_data_views.cc',
        'bookmarks/browser/bookmark_pasteboard_helper_mac.h',
        'bookmarks/browser/bookmark_pasteboard_helper_mac.mm',
        'bookmarks/browser/bookmark_storage.cc',
        'bookmarks/browser/bookmark_storage.h',
        'bookmarks/browser/bookmark_utils.cc',
        'bookmarks/browser/bookmark_utils.h',
        'bookmarks/browser/scoped_group_bookmark_actions.cc',
        'bookmarks/browser/scoped_group_bookmark_actions.h',
        'bookmarks/browser/startup_task_runner_service.cc',
        'bookmarks/browser/startup_task_runner_service.h',
      ],
      'conditions': [
        ['OS == "android"', {
          # In GN, this android-specific stuff is its own target at
          # //components/bookmarks/common/android
          # TODO(cjhopman): This should be its own target in Gyp, too.
          'dependencies': [
            'bookmarks_jni_headers',
          ],
          'sources' : [
            'bookmarks/common/android/bookmark_id.cc',
            'bookmarks/common/android/bookmark_id.h',
            'bookmarks/common/android/bookmark_type_list.h',
            'bookmarks/common/android/component_jni_registrar.cc',
            'bookmarks/common/android/component_jni_registrar.h',
          ],
        }],
        ['toolkit_views==1', {
          'dependencies': [
            '<(DEPTH)/ui/views/views.gyp:views',
          ],
        }],
      ],
    },
    {
      # GN version: //components/bookmarks/common
      'target_name': 'bookmarks_common',
      'type': 'static_library',
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        '../base/base.gyp:base',
      ],
      'sources': [
        'bookmarks/common/bookmark_constants.cc',
        'bookmarks/common/bookmark_constants.h',
        'bookmarks/common/bookmark_pref_names.cc',
        'bookmarks/common/bookmark_pref_names.h',
      ],
    },
    {
      # GN version: //components/bookmarks/managed
      'target_name': 'bookmarks_managed',
      'type': 'static_library',
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        'bookmarks_browser',
        'components_strings.gyp:components_strings',
        'keyed_service_core',
      ],
      'sources': [
        'bookmarks/managed/managed_bookmark_service.cc',
        'bookmarks/managed/managed_bookmark_service.h',
        'bookmarks/managed/managed_bookmark_util.cc',
        'bookmarks/managed/managed_bookmark_util.h',
        'bookmarks/managed/managed_bookmarks_tracker.cc',
        'bookmarks/managed/managed_bookmarks_tracker.h',
      ],
    },
    {
      # GN version: //components/bookmarks/test
      'target_name': 'bookmarks_test_support',
      'type': 'static_library',
      'include_dirs': [
        '..',
      ],
      'dependencies': [
        '../base/base.gyp:base',
        '../testing/gmock.gyp:gmock',
        '../ui/events/platform/events_platform.gyp:events_platform',
        '../url/url.gyp:url_lib',
        'bookmarks_browser',
      ],
      'sources': [
        'bookmarks/test/bookmark_test_helpers.cc',
        'bookmarks/test/bookmark_test_helpers.h',
        'bookmarks/test/mock_bookmark_model_observer.cc',
        'bookmarks/test/mock_bookmark_model_observer.h',
        'bookmarks/test/test_bookmark_client.cc',
        'bookmarks/test/test_bookmark_client.h',
      ],
      'conditions': [
        ['use_x11==1', {
          'dependencies': [
            '../ui/events/platform/x11/x11_events_platform.gyp:x11_events_platform',
          ],
        }],
      ],
    },
  ],
  'conditions' : [
    ['OS=="android"', {
      'targets': [
        {
          # GN: //components/bookmarks/common/android:bookmarks_java
          'target_name': 'bookmarks_java',
          'type': 'none',
          'dependencies': [
            '../base/base.gyp:base_java',
            'bookmark_type_java',
          ],
          'variables': {
            'java_in_dir': 'bookmarks/common/android/java',
          },
          'includes': [ '../build/java.gypi' ],
        },
        {
          # GN: //components/bookmarks/common/android:bookmarks_jni_headers
          'target_name': 'bookmarks_jni_headers',
          'type': 'none',
          'sources': [
            'bookmarks/common/android/java/src/org/chromium/components/bookmarks/BookmarkId.java',
          ],
          'variables': {
            'jni_gen_package': 'components/bookmarks',
          },
          'includes': [ '../build/jni_generator.gypi' ],
        },
        {
          # GN: //components/bookmarks/common/android:bookmarks_type_javagen
          'target_name': 'bookmark_type_java',
          'type': 'none',
          'variables': {
            'source_file': 'bookmarks/common/android/bookmark_type.h',
          },
          'includes': [ '../build/android/java_cpp_enum.gypi' ],
        },
      ],
    }]
  ],
}