Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Add Autofill support
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh authored and bridiver committed Aug 18, 2016
1 parent 8c0af25 commit 1286163
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 11 deletions.
26 changes: 26 additions & 0 deletions chromiumcontent/autofill.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
'targets': [
{
'target_name': 'autofill',
'type': 'none',
'dependencies': [
'<(DEPTH)/components/components.gyp:autofill_core_common',
'<(DEPTH)/components/components.gyp:autofill_core_browser',
'<(DEPTH)/components/components.gyp:autofill_server_proto',
'<(DEPTH)/components/components.gyp:autofill_content_mojo_bindings_mojom',
'<(DEPTH)/components/components.gyp:autofill_content_mojo_bindings',
'<(DEPTH)/components/components.gyp:autofill_content_common',
'<(DEPTH)/components/components.gyp:autofill_content_risk_proto',
'<(DEPTH)/components/components.gyp:autofill_content_browser',
'<(DEPTH)/components/components.gyp:autofill_content_renderer',
'<(DEPTH)/components/components.gyp:data_use_measurement_core',
'<(DEPTH)/components/components.gyp:os_crypt',
'<(DEPTH)/components/components.gyp:signin_core_browser',
'<(DEPTH)/components/components.gyp:signin_core_common',
'<(DEPTH)/third_party/libaddressinput/libaddressinput.gyp:libaddressinput_util',
'<(DEPTH)/third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
'<(DEPTH)/third_party/libphonenumber/libphonenumber.gyp:libphonenumber_without_metadata',
]
}
]
}
1 change: 1 addition & 0 deletions chromiumcontent/chromiumcontent.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'chromiumcontent',
'<(DEPTH)/chrome/chrome.gyp:chromedriver',
'extensions.gyp:extensions',
'autofill.gyp:autofill',
],
'conditions': [
['OS=="linux"', {
Expand Down
16 changes: 16 additions & 0 deletions chromiumcontent/extensions.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@
'<(DEPTH)/chrome/common/extensions/api/api.gyp:chrome_api',
'<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
'<(DEPTH)/services/shell/shell_public.gyp:shell_public',
'<(DEPTH)/components/components.gyp:autofill_core_common',
'<(DEPTH)/components/components.gyp:autofill_core_browser',
'<(DEPTH)/components/components.gyp:autofill_server_proto',
'<(DEPTH)/components/components.gyp:autofill_content_mojo_bindings_mojom',
'<(DEPTH)/components/components.gyp:autofill_content_mojo_bindings',
'<(DEPTH)/components/components.gyp:autofill_content_common',
'<(DEPTH)/components/components.gyp:autofill_content_risk_proto',
'<(DEPTH)/components/components.gyp:autofill_content_browser',
'<(DEPTH)/components/components.gyp:autofill_content_renderer',
'<(DEPTH)/components/components.gyp:browsing_data',
'<(DEPTH)/components/components.gyp:content_settings_core_common',
'<(DEPTH)/components/components.gyp:crx_file',
'<(DEPTH)/components/components.gyp:data_use_measurement_core',
'<(DEPTH)/components/components.gyp:guest_view_browser',
'<(DEPTH)/components/components.gyp:guest_view_common',
'<(DEPTH)/components/components.gyp:guest_view_renderer',
'<(DEPTH)/components/components.gyp:json_schema',
'<(DEPTH)/components/components.gyp:keyed_service_content',
'<(DEPTH)/components/components.gyp:keyed_service_core',
'<(DEPTH)/components/components.gyp:os_crypt',
'<(DEPTH)/components/components.gyp:policy',
'<(DEPTH)/components/components.gyp:policy_component_browser',
'<(DEPTH)/components/components.gyp:policy_component_common',
'<(DEPTH)/components/components.gyp:pref_registry',
'<(DEPTH)/components/components.gyp:signin_core_browser',
'<(DEPTH)/components/components.gyp:signin_core_common',
'<(DEPTH)/components/components.gyp:syncable_prefs',
'<(DEPTH)/components/components.gyp:ui_zoom',
'<(DEPTH)/components/components.gyp:url_matcher',
Expand All @@ -37,6 +50,9 @@
'<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
'<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
'<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl',
'<(DEPTH)/third_party/libaddressinput/libaddressinput.gyp:libaddressinput_util',
'<(DEPTH)/third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
'<(DEPTH)/third_party/libphonenumber/libphonenumber.gyp:libphonenumber_without_metadata',
],
'conditions': [
['OS=="win" or OS=="mac"', {
Expand Down
22 changes: 11 additions & 11 deletions script/create-dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import shutil
import subprocess
import sys
import zipfile
import lib.extensions
from lib.extensions import copy_extension_locales
import lib.brave
from lib.brave import copy_brave_locales

from lib.config import get_configuration, get_output_dir

Expand Down Expand Up @@ -56,7 +56,7 @@ BINARIES = {
os.path.join('gen', 'ui', 'resources', 'ui_resources_300_percent.pak'),
os.path.join('gen', 'ui', 'views', 'resources', 'views_resources_200_percent.pak'),
os.path.join('gen', 'ui', 'views', 'resources', 'views_resources_300_percent.pak'),
] + lib.extensions.BINARIES['all'],
] + lib.brave.BINARIES['all'],
'darwin': [
'chromedriver',
'mksnapshot',
Expand All @@ -73,7 +73,7 @@ BINARIES = {
'libsystem_wrappers.a',
'libcdm_renderer.a',
'libsecurity_state.a',
] + lib.extensions.BINARIES['darwin'],
] + lib.brave.BINARIES['darwin'],
'linux': [
'chromedriver',
'mksnapshot',
Expand All @@ -92,7 +92,7 @@ BINARIES = {
'libcdm_renderer.a',
'libsecurity_state.a',
os.path.join('lib', 'libffmpeg.so'),
] + lib.extensions.BINARIES['linux'],
] + lib.brave.BINARIES['linux'],
'win32': [
'chromedriver.exe',
'd3dcompiler_47.dll',
Expand Down Expand Up @@ -178,7 +178,7 @@ BINARIES = {
os.path.join('obj', 'third_party', 'webrtc', 'system_wrappers', 'system_wrappers.lib'),
os.path.join('obj', 'third_party', 'webrtc', 'webrtc_common.cc.pdb'),
os.path.join('obj', 'third_party', 'webrtc', 'webrtc_common.lib'),
] + lib.extensions.BINARIES['win32'],
] + lib.brave.BINARIES['win32'],
}

ARCH_BLACKLIST = {
Expand Down Expand Up @@ -264,7 +264,7 @@ INCLUDE_DIRS = [
'third_party/speech-dispatcher',
],
'win32': [],
}[TARGET_PLATFORM] + lib.extensions.INCLUDE_DIRS
}[TARGET_PLATFORM] + lib.brave.INCLUDE_DIRS
GENERATED_INCLUDE_DIRS = [
'content',
'mojo',
Expand All @@ -273,17 +273,17 @@ GENERATED_INCLUDE_DIRS = [
'ui',
'services',
'skia',
] + lib.extensions.GENERATED_INCLUDE_DIRS
] + lib.brave.GENERATED_INCLUDE_DIRS
OTHER_HEADERS = [
'content/common/content_export.h',
'ui/events/keycodes/dom/dom_key_data.inc',
'ui/events/keycodes/dom/keycode_converter_data.inc',
] + lib.extensions.OTHER_HEADERS
] + lib.brave.OTHER_HEADERS
OTHER_SOURCES = [
]
OTHER_DIRS = [
os.path.join('ui', 'resources', 'cursors'),
] + lib.extensions.OTHER_DIRS
] + lib.brave.OTHER_DIRS


def main():
Expand All @@ -304,7 +304,7 @@ def main():
copy_binaries(target_arch, component, output_dir)
copy_generated_sources(target_arch, component, output_dir)
copy_locales(target_arch, component, output_dir)
copy_extension_locales(target_arch, component, output_dir)
copy_brave_locales(target_arch, component, output_dir)
copy_ffmpeg(target_arch)
copy_sources()
generate_licenses()
Expand Down
72 changes: 72 additions & 0 deletions script/lib/autofill.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env python

import os

BINARIES = {
'darwin': [
'libaddressinput_util.a',
'libautofill_content_browser.a',
'libautofill_content_common.a',
'libautofill_content_mojo_bindings.a',
'libautofill_content_renderer.a',
'libautofill_core_browser.a',
'libautofill_core_common.a',
'libautofill_server_proto.a',
'libos_crypt.a',
'libdata_use_measurement_core.a',
'libgoogle_apis.a',
'libphonenumber.a',
'libphonenumber_without_metadata.a',
'libsignin_core_browser.a',
'libsignin_core_common.a',
],
'linux': [
'libaddressinput_util.a',
'libautofill_content_browser.a',
'libautofill_content_common.a',
'libautofill_content_mojo_bindings.a',
'libautofill_content_renderer.a',
'libautofill_core_browser.a',
'libautofill_core_common.a',
'libautofill_server_proto.a',
'libos_crypt.a',
'libdata_use_measurement_core.a',
'libgoogle_apis.a',
'libphonenumber.a',
'libphonenumber_without_metadata.a',
'libsignin_core_browser.a',
'libsignin_core_common.a',
],
'win32': [
os.path.join('obj', 'third_party', 'libaddressinput', 'libaddressinput_util.lib'),
os.path.join('obj', 'components', 'autofill_content_browser.lib'),
os.path.join('obj', 'components', 'autofill_content_common.lib'),
os.path.join('obj', 'components', 'autofill_content_mojo_bindings.lib'),
os.path.join('obj', 'components', 'autofill_content_renderer.lib'),
os.path.join('obj', 'components', 'autofill_core_browser.lib'),
os.path.join('obj', 'components', 'autofill_core_common.lib'),
os.path.join('obj', 'components', 'autofill_server_proto.lib'),
os.path.join('obj', 'components', 'os_crypt.lib'),
os.path.join('obj', 'components', 'data_use_measurement_core.lib'),
os.path.join('obj', 'google_apis', 'google_apis.lib'),
os.path.join('obj', 'third_party', 'libphonenumber', 'libphonenumber.lib'),
os.path.join('obj', 'third_party', 'libphonenumber', 'libphonenumber_without_metadata.lib'),
os.path.join('obj', 'components', 'signin_core_browser.lib'),
os.path.join('obj', 'components', 'signin_core_common.lib'),
],
}

INCLUDE_DIRS = [
'google_apis/gaia',
'sql',
'third_party/protobuf',
'components/autofill',
'components/webdata',
]
GENERATED_INCLUDE_DIRS = [
'components/autofill',
'protoc_out/components/autofill',
]
OTHER_HEADERS = [
'chrome/browser/sync/glue/sync_start_util.h',
]
18 changes: 18 additions & 0 deletions script/lib/brave.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python

import lib.extensions
from lib.extensions import copy_extension_locales
import lib.autofill

BINARIES = lib.extensions.BINARIES
BINARIES['darwin'] = BINARIES['darwin'] + lib.autofill.BINARIES['darwin']
BINARIES['linux'] = BINARIES['linux'] + lib.autofill.BINARIES['linux']
BINARIES['win32'] = BINARIES['win32'] + lib.autofill.BINARIES['win32']

INCLUDE_DIRS = lib.extensions.INCLUDE_DIRS + lib.autofill.INCLUDE_DIRS
GENERATED_INCLUDE_DIRS = lib.extensions.GENERATED_INCLUDE_DIRS + lib.autofill.GENERATED_INCLUDE_DIRS
OTHER_HEADERS = lib.extensions.OTHER_HEADERS + lib.autofill.OTHER_HEADERS
OTHER_DIRS = lib.extensions.OTHER_DIRS

def copy_brave_locales(target_arch, component, output_dir):
copy_extension_locales(target_arch, component, output_dir)
41 changes: 41 additions & 0 deletions script/lib/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,23 @@
os.path.join('gen', 'chrome', 'extensions_api_resources.pak'),
],
'darwin': [
'libaddressinput_util.a',
'libapi_gen_util.a',
'libautofill_content_browser.a',
'libautofill_content_common.a',
'libautofill_content_mojo_bindings.a',
'libautofill_content_renderer.a',
'libautofill_core_browser.a',
'libautofill_core_common.a',
'libautofill_server_proto.a',
'libos_crypt.a',
'libbrowsing_data.a',
'libchrome_api.a',
'libchrome_zlib.a',
'libcld2_static.a',
'libcontent_settings_core_common.a',
'libcrx_file.a',
'libdata_use_measurement_core.a',
'libdevice_usb.a',
'libextensions_api.a',
'libextensions_api_registration.a',
Expand All @@ -32,16 +42,21 @@
'libextensions_common_constants.a',
'libextensions_renderer.a',
'libextensions_utility.a',
'libgoogle_apis.a',
'libguest_view_browser.a',
'libguest_view_common.a',
'libguest_view_renderer.a',
'libleveldatabase.a',
'libmojo_cpp_system.a',
'libmojo_cpp_bindings.a',
'libmojo_js_bindings.a',
'libphonenumber.a',
'libphonenumber_without_metadata.a',
'libpref_registry.a',
'libre2.a',
'libsnappy.a',
'libsignin_core_browser.a',
'libsignin_core_common.a',
'libsyncable_prefs.a',
'libui_zoom.a',
'libvariations.a',
Expand All @@ -52,13 +67,23 @@
'libzlib_x86_simd.a',
],
'linux': [
'libaddressinput_util.a',
'libapi_gen_util.a',
'libautofill_content_browser.a',
'libautofill_content_common.a',
'libautofill_content_mojo_bindings.a',
'libautofill_content_renderer.a',
'libautofill_core_browser.a',
'libautofill_core_common.a',
'libautofill_server_proto.a',
'libos_crypt.a',
'libbrowsing_data.a',
'libchrome_api.a',
'libchrome_zlib.a',
'libcld2_static.a',
'libcontent_settings_core_common.a',
'libcrx_file.a',
'libdata_use_measurement_core.a',
'libdevice_usb.a',
'libextensions_api.a',
'libextensions_api_registration.a',
Expand All @@ -67,19 +92,27 @@
'libextensions_common_constants.a',
'libextensions_renderer.a',
'libextensions_utility.a',
'libgoogle_apis.a',
'libgoogle_core_browser.a',
'libguest_view_browser.a',
'libguest_view_common.a',
'libguest_view_renderer.a',
'libleveldatabase.a',
'libmojo_cpp_system.a',
'libmojo_cpp_bindings.a',
'libmojo_js_bindings.a',
'libphonenumber.a',
'libphonenumber_without_metadata.a',
'libpref_registry.a',
'libre2.a',
'libsearch_engines.a',
'libsnappy.a',
'libsignin_core_browser.a',
'libsignin_core_common.a',
'libsyncable_prefs.a',
'libui_zoom.a',
'libvariations.a',
'libvariations_net.a',
'libweb_cache_browser.a',
'libweb_cache_mojo_bindings.a',
'libweb_modal.a',
Expand Down Expand Up @@ -129,25 +162,33 @@
'extensions/renderer',
'extensions/strings',
'extensions/utility',
'google_apis/gaia',
'sql',
'sync/api',
'sync/base',
'sync/internal_api',
'third_party/protobuf',
'components/autofill',
'components/content_settings',
'components/user_prefs',
'components/pref_registry',
'components/syncable_prefs',
'components/keyed_service',
'components/web_modal',
'components/webdata',
'components/crx_file',
'components/ui'
]
GENERATED_INCLUDE_DIRS = [
'chrome',
'components/autofill',
'extensions',
'services',
'protoc_out/components/autofill',
]
OTHER_HEADERS = [
'chrome/common/chrome_isolated_world_ids.h',
'chrome/browser/sync/glue/sync_start_util.h',
]
OTHER_DIRS = [
'build',
Expand Down

0 comments on commit 1286163

Please sign in to comment.