mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
Import chromium-74.0.3729.108
This commit is contained in:
commit
eacafbf178
36
src/.clang-format
Normal file
36
src/.clang-format
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Defines the Chromium style for automatic reformatting.
|
||||||
|
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||||
|
BasedOnStyle: Chromium
|
||||||
|
# This defaults to 'Auto'. Explicitly set it for a while, so that
|
||||||
|
# 'vector<vector<int> >' in existing files gets formatted to
|
||||||
|
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
|
||||||
|
# 'int>>' if the file already contains at least one such instance.)
|
||||||
|
Standard: Cpp11
|
||||||
|
|
||||||
|
# Make sure code like:
|
||||||
|
# IPC_BEGIN_MESSAGE_MAP()
|
||||||
|
# IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate)
|
||||||
|
# IPC_END_MESSAGE_MAP()
|
||||||
|
# gets correctly indented.
|
||||||
|
MacroBlockBegin: "^\
|
||||||
|
BEGIN_MSG_MAP|\
|
||||||
|
BEGIN_MSG_MAP_EX|\
|
||||||
|
BEGIN_SAFE_MSG_MAP_EX|\
|
||||||
|
CR_BEGIN_MSG_MAP_EX|\
|
||||||
|
IPC_BEGIN_MESSAGE_MAP|\
|
||||||
|
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM|\
|
||||||
|
IPC_PROTOBUF_MESSAGE_TRAITS_BEGIN|\
|
||||||
|
IPC_STRUCT_BEGIN|\
|
||||||
|
IPC_STRUCT_BEGIN_WITH_PARENT|\
|
||||||
|
IPC_STRUCT_TRAITS_BEGIN|\
|
||||||
|
POLPARAMS_BEGIN|\
|
||||||
|
PPAPI_BEGIN_MESSAGE_MAP$"
|
||||||
|
MacroBlockEnd: "^\
|
||||||
|
CR_END_MSG_MAP|\
|
||||||
|
END_MSG_MAP|\
|
||||||
|
IPC_END_MESSAGE_MAP|\
|
||||||
|
IPC_PROTOBUF_MESSAGE_TRAITS_END|\
|
||||||
|
IPC_STRUCT_END|\
|
||||||
|
IPC_STRUCT_TRAITS_END|\
|
||||||
|
POLPARAMS_END|\
|
||||||
|
PPAPI_END_MESSAGE_MAP$"
|
48
src/.gitattributes
vendored
Normal file
48
src/.gitattributes
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Stop Windows python license check presubmit errors by forcing LF checkout.
|
||||||
|
*.py text eol=lf
|
||||||
|
|
||||||
|
# Force LF checkout of the pins files to avoid transport_security_state_generator errors.
|
||||||
|
/net/http/*.pins text eol=lf
|
||||||
|
|
||||||
|
# Force LF checkout for all source files
|
||||||
|
*.c text eol=lf
|
||||||
|
*.cc text eol=lf
|
||||||
|
*.cpp text eol=lf
|
||||||
|
*.grd text eol=lf
|
||||||
|
*.grdp text eol=lf
|
||||||
|
*.gn text eol=lf
|
||||||
|
*.gni text eol=lf
|
||||||
|
*.h text eol=lf
|
||||||
|
*.html text eol=lf
|
||||||
|
*.in text eol=lf
|
||||||
|
*.inc text eol=lf
|
||||||
|
*.java text eol=lf
|
||||||
|
*.js text eol=lf
|
||||||
|
*.json text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.mm text eol=lf
|
||||||
|
*.sh text eol=lf
|
||||||
|
*.sql text eol=lf
|
||||||
|
*.txt text eol=lf
|
||||||
|
*.xml text eol=lf
|
||||||
|
*.xslt text eol=lf
|
||||||
|
.clang-format text eol=lf
|
||||||
|
.eslintrc.js text eol=lf
|
||||||
|
.git-blame-ignore-revs text eol=lf
|
||||||
|
.gitattributes text eol=lf
|
||||||
|
.gitignore text eol=lf
|
||||||
|
.vpython text eol=lf
|
||||||
|
codereview.settings text eol=lf
|
||||||
|
DEPS text eol=lf
|
||||||
|
ENG_REVIEW_OWNERS text eol=lf
|
||||||
|
LICENSE text eol=lf
|
||||||
|
LICENSE.* text eol=lf
|
||||||
|
MAJOR_BRANCH_DATE text eol=lf
|
||||||
|
OWNERS text eol=lf
|
||||||
|
README text eol=lf
|
||||||
|
README.* text eol=lf
|
||||||
|
WATCHLISTS text eol=lf
|
||||||
|
VERSION text eol=lf
|
||||||
|
|
||||||
|
# Skip Tricium by default on files in third_party.
|
||||||
|
third_party/** -tricium
|
685
src/.gn
Normal file
685
src/.gn
Normal file
@ -0,0 +1,685 @@
|
|||||||
|
# This file is used by the GN meta build system to find the root of the source
|
||||||
|
# tree and to set startup options. For documentation on the values set in this
|
||||||
|
# file, run "gn help dotfile" at the command line.
|
||||||
|
|
||||||
|
import("//build/dotfile_settings.gni")
|
||||||
|
import("//third_party/angle/dotfile_settings.gni")
|
||||||
|
|
||||||
|
# The location of the build configuration file.
|
||||||
|
buildconfig = "//build/config/BUILDCONFIG.gn"
|
||||||
|
|
||||||
|
# The secondary source root is a parallel directory tree where
|
||||||
|
# GN build files are placed when they can not be placed directly
|
||||||
|
# in the source tree, e.g. for third party source trees.
|
||||||
|
secondary_source = "//build/secondary/"
|
||||||
|
|
||||||
|
# These arguments override the default values for items in a declare_args
|
||||||
|
# block. "gn args" in turn can override these.
|
||||||
|
#
|
||||||
|
# In general the value for a build arg in the declare_args block should be the
|
||||||
|
# default. In some cases, a DEPS-ed in project will want different defaults for
|
||||||
|
# being built as part of Chrome vs. being built standalone. In this case, the
|
||||||
|
# Chrome defaults should go here. There should be no overrides here for
|
||||||
|
# values declared in the main Chrome repository.
|
||||||
|
#
|
||||||
|
# Important note for defining defaults: This file is executed before the
|
||||||
|
# BUILDCONFIG.gn file. That file sets up the global variables like "is_ios".
|
||||||
|
# This means that the default_args can not depend on the platform,
|
||||||
|
# architecture, or other build parameters. If you really need that, the other
|
||||||
|
# repo should define a flag that toggles on a behavior that implements the
|
||||||
|
# additional logic required by Chrome to set the variables.
|
||||||
|
default_args = {
|
||||||
|
# TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints
|
||||||
|
# a warning that "Build argument has no effect". When adding a v8 variable, it
|
||||||
|
# also needs to be defined to src/ios/BUILD.gn (respectively removed from both
|
||||||
|
# location when it is removed).
|
||||||
|
|
||||||
|
v8_extra_library_files = [
|
||||||
|
# Dependencies used by the extra libraries. Putting them here causes them
|
||||||
|
# to be executed first during snapshot creation.
|
||||||
|
"//third_party/blink/renderer/core/streams/CommonOperations.js",
|
||||||
|
"//third_party/blink/renderer/core/streams/CommonStrings.js",
|
||||||
|
"//third_party/blink/renderer/core/streams/SimpleQueue.js",
|
||||||
|
|
||||||
|
# Extra libraries.
|
||||||
|
"//third_party/blink/renderer/core/streams/ByteLengthQueuingStrategy.js",
|
||||||
|
"//third_party/blink/renderer/core/streams/CountQueuingStrategy.js",
|
||||||
|
"//third_party/blink/renderer/core/streams/ReadableStream.js",
|
||||||
|
"//third_party/blink/renderer/core/streams/WritableStream.js",
|
||||||
|
"//third_party/blink/renderer/core/streams/TransformStream.js",
|
||||||
|
]
|
||||||
|
v8_experimental_extra_library_files = []
|
||||||
|
v8_enable_gdbjit = false
|
||||||
|
v8_imminent_deprecation_warnings = false
|
||||||
|
|
||||||
|
# TODO(jochen): Remove this. http://crbug.com/v8/5830,
|
||||||
|
# http://crbug.com/728583.
|
||||||
|
v8_check_microtasks_scopes_consistency = false
|
||||||
|
|
||||||
|
# Don't include webrtc's builtin task queue implementation.
|
||||||
|
rtc_link_task_queue_impl = false
|
||||||
|
|
||||||
|
# Don't include the iLBC audio codec.
|
||||||
|
# TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
|
||||||
|
# deps on codecs, we can remove this.
|
||||||
|
rtc_include_ilbc = false
|
||||||
|
|
||||||
|
# Changes some setup for the Crashpad build to set them to build against
|
||||||
|
# Chromium's zlib, base, etc.
|
||||||
|
crashpad_dependencies = "chromium"
|
||||||
|
}
|
||||||
|
|
||||||
|
# These are the targets to check headers for by default. The files in targets
|
||||||
|
# matching these patterns (see "gn help label_pattern" for format) will have
|
||||||
|
# their includes checked for proper dependencies when you run either
|
||||||
|
# "gn check" or "gn gen --check".
|
||||||
|
check_targets = [
|
||||||
|
"//apps/*",
|
||||||
|
"//ash/*",
|
||||||
|
"//base/*",
|
||||||
|
"//blink/*",
|
||||||
|
"//build/*",
|
||||||
|
"//buildtools/*",
|
||||||
|
"//cc/*",
|
||||||
|
|
||||||
|
#"//chrome/android/*", # 13 errors
|
||||||
|
"//chrome/app/*",
|
||||||
|
"//chrome/app_shim/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/*", # ~1300 errors
|
||||||
|
#"//chrome/browser:*", # ~600 errors
|
||||||
|
"//chrome/browser/accessibility/*",
|
||||||
|
"//chrome/browser/android/*",
|
||||||
|
"//chrome/browser/app_mode/*",
|
||||||
|
"//chrome/browser/apps/*",
|
||||||
|
"//chrome/browser/assist_ranker/*",
|
||||||
|
"//chrome/browser/autocomplete/*",
|
||||||
|
"//chrome/browser/autofill/*",
|
||||||
|
"//chrome/browser/background/*",
|
||||||
|
"//chrome/browser/background_fetch/*",
|
||||||
|
"//chrome/browser/background_sync/*",
|
||||||
|
"//chrome/browser/banners/*",
|
||||||
|
"//chrome/browser/bitmap_fetcher/*",
|
||||||
|
"//chrome/browser/bookmarks/*",
|
||||||
|
"//chrome/browser/browsing_data/*",
|
||||||
|
"//chrome/browser/budget_service/*",
|
||||||
|
"//chrome/browser/captive_portal/*",
|
||||||
|
"//chrome/browser/chooser_controller/*",
|
||||||
|
"//chrome/browser/chromeos/*",
|
||||||
|
"//chrome/browser/client_hints/*",
|
||||||
|
"//chrome/browser/clipboard/*",
|
||||||
|
"//chrome/browser/component_updater/*",
|
||||||
|
"//chrome/browser/conflicts/*",
|
||||||
|
"//chrome/browser/consent_auditor/*",
|
||||||
|
"//chrome/browser/content_settings/*",
|
||||||
|
"//chrome/browser/crash_upload_list/*",
|
||||||
|
"//chrome/browser/custom_handlers/*",
|
||||||
|
"//chrome/browser/data_saver/*",
|
||||||
|
"//chrome/browser/data_use_measurement/*",
|
||||||
|
"//chrome/browser/dbus/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/devtools/*", # 93 errors
|
||||||
|
"//chrome/browser/diagnostics/*",
|
||||||
|
"//chrome/browser/domain_reliability/*",
|
||||||
|
"//chrome/browser/dom_distiller/*",
|
||||||
|
"//chrome/browser/downgrade/*",
|
||||||
|
"//chrome/browser/download/*",
|
||||||
|
"//chrome/browser/drive/*",
|
||||||
|
"//chrome/browser/engagement/*",
|
||||||
|
"//chrome/browser/extensions/*",
|
||||||
|
"//chrome/browser/external_protocol/*",
|
||||||
|
"//chrome/browser/favicon/*",
|
||||||
|
"//chrome/browser/feature_engagement/*",
|
||||||
|
"//chrome/browser/feedback/*",
|
||||||
|
"//chrome/browser/first_run/*",
|
||||||
|
"//chrome/browser/gcm/*",
|
||||||
|
"//chrome/browser/generic_sensor/*",
|
||||||
|
"//chrome/browser/geolocation/*",
|
||||||
|
"//chrome/browser/google/*",
|
||||||
|
"//chrome/browser/gpu/*",
|
||||||
|
"//chrome/browser/guest_view/*",
|
||||||
|
"//chrome/browser/hang_monitor/*",
|
||||||
|
"//chrome/browser/history/*",
|
||||||
|
"//chrome/browser/importer/*",
|
||||||
|
"//chrome/browser/infobars/*",
|
||||||
|
"//chrome/browser/installable/*",
|
||||||
|
"//chrome/browser/install_verification/*",
|
||||||
|
"//chrome/browser/internal/*",
|
||||||
|
"//chrome/browser/interstitials/*",
|
||||||
|
"//chrome/browser/invalidation/*",
|
||||||
|
"//chrome/browser/language/*",
|
||||||
|
"//chrome/browser/lifetime/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/loader/*", # 2 errors
|
||||||
|
"//chrome/browser/local_discovery/*",
|
||||||
|
"//chrome/browser/mac/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/media/*", # 74 errors
|
||||||
|
"//chrome/browser/media_galleries/*",
|
||||||
|
"//chrome/browser/memory/*",
|
||||||
|
"//chrome/browser/metrics/*",
|
||||||
|
"//chrome/browser/nacl_host/*",
|
||||||
|
"//chrome/browser/navigation_predictor/*",
|
||||||
|
"//chrome/browser/net/*",
|
||||||
|
"//chrome/browser/notifications/*",
|
||||||
|
"//chrome/browser/ntp_snippets/*",
|
||||||
|
"//chrome/browser/ntp_tiles/*",
|
||||||
|
"//chrome/browser/obsolete_system/*",
|
||||||
|
"//chrome/browser/offline_items_collection/*",
|
||||||
|
"//chrome/browser/offline_pages/*",
|
||||||
|
"//chrome/browser/page_load_metrics/*",
|
||||||
|
"//chrome/browser/password_manager/*",
|
||||||
|
"//chrome/browser/payments/*",
|
||||||
|
"//chrome/browser/pdf/*",
|
||||||
|
"//chrome/browser/performance_monitor/*",
|
||||||
|
"//chrome/browser/permissions/*",
|
||||||
|
"//chrome/browser/picture_in_picture/*",
|
||||||
|
"//chrome/browser/plugins/*",
|
||||||
|
|
||||||
|
# "//chrome/browser/policy/*", # 1 error on Windows
|
||||||
|
"//chrome/browser/predictors/*",
|
||||||
|
"//chrome/browser/prefetch/*",
|
||||||
|
"//chrome/browser/prefs/*",
|
||||||
|
"//chrome/browser/prerender/*",
|
||||||
|
"//chrome/browser/previews/*",
|
||||||
|
"//chrome/browser/printing/*",
|
||||||
|
"//chrome/browser/profile_resetter/*",
|
||||||
|
"//chrome/browser/profiles/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/profiling_host/*", # 16 errors
|
||||||
|
"//chrome/browser/push_messaging/*",
|
||||||
|
"//chrome/browser/recovery/*",
|
||||||
|
"//chrome/browser/renderer_context_menu/*",
|
||||||
|
"//chrome/browser/renderer_host/*",
|
||||||
|
"//chrome/browser/resource_coordinator/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/resources/*", # 18 errors on ChromeOS
|
||||||
|
"//chrome/browser/rlz/*",
|
||||||
|
|
||||||
|
#"//chrome/browser/safe_browsing/*", # 239 errors
|
||||||
|
"//chrome/browser/search/*",
|
||||||
|
"//chrome/browser/search_engines/*",
|
||||||
|
"//chrome/browser/search_provider_logos/*",
|
||||||
|
"//chrome/browser/service_process/*",
|
||||||
|
"//chrome/browser/sessions/*",
|
||||||
|
"//chrome/browser/signin/*",
|
||||||
|
"//chrome/browser/speech/*",
|
||||||
|
"//chrome/browser/spellchecker/*",
|
||||||
|
"//chrome/browser/ssl/*",
|
||||||
|
"//chrome/browser/status_icons/*",
|
||||||
|
"//chrome/browser/storage/*",
|
||||||
|
"//chrome/browser/subresource_filter/*",
|
||||||
|
"//chrome/browser/supervised_user/*",
|
||||||
|
"//chrome/browser/sync/*",
|
||||||
|
"//chrome/browser/sync_file_system/*",
|
||||||
|
"//chrome/browser/tab_contents/*",
|
||||||
|
"//chrome/browser/task_manager/*",
|
||||||
|
"//chrome/browser/themes/*",
|
||||||
|
"//chrome/browser/thumbnails/*",
|
||||||
|
"//chrome/browser/tracing/*",
|
||||||
|
"//chrome/browser/translate/*",
|
||||||
|
"//chrome/browser/ui/*",
|
||||||
|
"//chrome/browser/undo/*",
|
||||||
|
"//chrome/browser/unified_consent/*",
|
||||||
|
"//chrome/browser/update_client/*",
|
||||||
|
"//chrome/browser/upgrade_detector/*",
|
||||||
|
"//chrome/browser/usb/*",
|
||||||
|
"//chrome/browser/vr/*",
|
||||||
|
"//chrome/browser/web_applications/*",
|
||||||
|
"//chrome/browser/webauthn/*",
|
||||||
|
"//chrome/browser/webshare/*",
|
||||||
|
"//chrome/browser/win/*",
|
||||||
|
|
||||||
|
"//chrome/build/*",
|
||||||
|
|
||||||
|
#"//chrome/child/*", # 1 error on Windows
|
||||||
|
"//chrome/chrome_cleaner/*",
|
||||||
|
|
||||||
|
#"//chrome/chrome_watcher/*", # 3 errors on Windows
|
||||||
|
"//chrome/common/*",
|
||||||
|
|
||||||
|
#"//chrome/elevation_service/*", # 1 error on Windows
|
||||||
|
#"//chrome/gpu/*", # 7 errors
|
||||||
|
"//chrome/installer/*",
|
||||||
|
|
||||||
|
#"//chrome/install_static/*", # 8 errors on Windows
|
||||||
|
"//chrome/nacl/*",
|
||||||
|
|
||||||
|
#"//chrome/notification_helper/*", # 4 errors on Windows
|
||||||
|
#"//chrome/renderer/*", # ~30 errors
|
||||||
|
#"//chrome/service/*", # 2 errors
|
||||||
|
#"//chrome/services/*", # ~30 errors
|
||||||
|
#"//chrome/test/*", # ~3000 errors
|
||||||
|
"//chrome/third_party/*",
|
||||||
|
"//chrome/tools/*",
|
||||||
|
"//chrome/utility/*",
|
||||||
|
|
||||||
|
"//chromecast/*",
|
||||||
|
"//chromeos/*",
|
||||||
|
"//chrome_elf/*",
|
||||||
|
"//cloud_print/*",
|
||||||
|
"//components/*",
|
||||||
|
"//content/*",
|
||||||
|
"//courgette/*",
|
||||||
|
"//crypto/*",
|
||||||
|
"//data/*",
|
||||||
|
"//dbus/*",
|
||||||
|
"//device/*",
|
||||||
|
|
||||||
|
#"//extensions/*", # Lots of errors.
|
||||||
|
"//extensions:extensions_resources",
|
||||||
|
"//extensions:extensions_browsertests",
|
||||||
|
"//extensions:extensions_unittests",
|
||||||
|
"//extensions/browser",
|
||||||
|
"//extensions/browser:browser_tests",
|
||||||
|
"//extensions/browser:unit_tests",
|
||||||
|
"//extensions/browser/install:*",
|
||||||
|
"//extensions/common/*",
|
||||||
|
"//extensions/components/javascript_dialog_extensions_client",
|
||||||
|
"//extensions/components/native_app_window",
|
||||||
|
"//extensions/renderer:unit_tests",
|
||||||
|
"//extensions/shell/*",
|
||||||
|
"//extensions/strings/*",
|
||||||
|
"//fuchsia/*",
|
||||||
|
"//gin/*",
|
||||||
|
"//google_apis/*",
|
||||||
|
"//google_update/*",
|
||||||
|
"//gpu/*",
|
||||||
|
|
||||||
|
"//ios/*",
|
||||||
|
"//ios_internal/*",
|
||||||
|
"//ipc/*",
|
||||||
|
|
||||||
|
#"//jingle/*",
|
||||||
|
|
||||||
|
"//media/*",
|
||||||
|
"//mojo/*",
|
||||||
|
|
||||||
|
#"//native_client/*",
|
||||||
|
"//net/*",
|
||||||
|
|
||||||
|
#"//pdf/*", # Medium-hard.
|
||||||
|
#"//ppapi/*", # Lots of errors.
|
||||||
|
"//ppapi/examples/*",
|
||||||
|
"//ppapi/tests/*",
|
||||||
|
"//printing/*",
|
||||||
|
|
||||||
|
#"//remoting/*", # Medium-hard.
|
||||||
|
"//rlz/*",
|
||||||
|
|
||||||
|
#"//sandbox/*", # Medium-hard.
|
||||||
|
"//services/*",
|
||||||
|
"//skia/*",
|
||||||
|
"//sql/*",
|
||||||
|
"//storage/*",
|
||||||
|
"//testing/*",
|
||||||
|
|
||||||
|
#"//third_party/*", # May not ever want this.
|
||||||
|
"//third_party:freetype_harfbuzz",
|
||||||
|
"//third_party/Python-Markdown/*",
|
||||||
|
|
||||||
|
# "//third_party/SPIRV-Tools/*", # 30ish errors
|
||||||
|
"//third_party/abseil-cpp/*",
|
||||||
|
"//third_party/accessibility-audit/*",
|
||||||
|
"//third_party/accessibility_test_framework/*",
|
||||||
|
"//third_party/adobe/*",
|
||||||
|
"//third_party/afl/*",
|
||||||
|
"//third_party/android_build_tools/*",
|
||||||
|
"//third_party/android_crazy_linker/*",
|
||||||
|
"//third_party/android_data_chart/*",
|
||||||
|
"//third_party/android_deps/*",
|
||||||
|
"//third_party/android_media/*",
|
||||||
|
"//third_party/android_ndk/*",
|
||||||
|
"//third_party/android_opengl/*",
|
||||||
|
"//third_party/android_platform/*",
|
||||||
|
"//third_party/android_protobuf/*",
|
||||||
|
"//third_party/android_sdk/*",
|
||||||
|
"//third_party/android_support_test_runner/*",
|
||||||
|
"//third_party/android_swipe_refresh/*",
|
||||||
|
"//third_party/android_system_sdk/*",
|
||||||
|
"//third_party/android_testrunner/*",
|
||||||
|
"//third_party/android_tools/*",
|
||||||
|
|
||||||
|
# "//third_party/angle/*", # 30ish errors
|
||||||
|
"//third_party/apache-portable-runtime/*",
|
||||||
|
"//third_party/apache_velocity/*",
|
||||||
|
"//third_party/apache-win32/*",
|
||||||
|
"//third_party/apk-patch-size-estimator/*",
|
||||||
|
"//third_party/apple_apsl/*",
|
||||||
|
"//third_party/appurify-python/*",
|
||||||
|
"//third_party/arcore-android-sdk/*",
|
||||||
|
"//third_party/ashmem/*",
|
||||||
|
"//third_party/auto/*",
|
||||||
|
"//third_party/axe-core/*",
|
||||||
|
"//third_party/bazel/*",
|
||||||
|
"//third_party/binutils/*",
|
||||||
|
"//third_party/blanketjs/*",
|
||||||
|
|
||||||
|
# "//third_party/blink/*", # Errors: https://crbug.com/800764
|
||||||
|
"//third_party/blink/public/*",
|
||||||
|
|
||||||
|
#"//third_party/breakpad/*", # Small errors.
|
||||||
|
"//third_party/boringssl/*",
|
||||||
|
"//third_party/bouncycastle/*",
|
||||||
|
"//third_party/brotli/*",
|
||||||
|
"//third_party/bspatch/*",
|
||||||
|
"//third_party/byte_buddy/*",
|
||||||
|
"//third_party/cacheinvalidation/*",
|
||||||
|
"//third_party/catapult/*",
|
||||||
|
"//third_party/cct_dynamic_module/*",
|
||||||
|
|
||||||
|
# "//third_party/ced/*", # 6 errors
|
||||||
|
"//third_party/chaijs/*",
|
||||||
|
"//third_party/checkstyle/*",
|
||||||
|
"//third_party/chromevox/*",
|
||||||
|
"//third_party/chromite/*",
|
||||||
|
"//third_party/cld_2/*",
|
||||||
|
"//third_party/cld_3/*",
|
||||||
|
"//third_party/closure_compiler/*",
|
||||||
|
"//third_party/colorama/*",
|
||||||
|
|
||||||
|
# "//third_party/crashpad/*", 20ish errors
|
||||||
|
"//third_party/crc32c/*",
|
||||||
|
"//third_party/cros_system_api/*",
|
||||||
|
"//third_party/custom_tabs_client/*",
|
||||||
|
"//third_party/cython/*",
|
||||||
|
"//third_party/d3/*",
|
||||||
|
"//third_party/dawn/*",
|
||||||
|
"//third_party/decklink/*",
|
||||||
|
"//third_party/depot_tools/*",
|
||||||
|
"//third_party/deqp/*",
|
||||||
|
"//third_party/devscripts/*",
|
||||||
|
"//third_party/devtools-node-modules/*",
|
||||||
|
"//third_party/dom_distiller_js/*",
|
||||||
|
"//third_party/elfutils/*",
|
||||||
|
"//third_party/errorprone/*",
|
||||||
|
"//third_party/espresso/*",
|
||||||
|
"//third_party/expat/*",
|
||||||
|
"//third_party/eyesfree/*",
|
||||||
|
"//third_party/feed/*",
|
||||||
|
|
||||||
|
# "//third_party/ffmpeg/*", # android_cronet only https://crbug.com/898793
|
||||||
|
"//third_party/fips181/*",
|
||||||
|
"//third_party/flac/*",
|
||||||
|
"//third_party/flatbuffers/*",
|
||||||
|
"//third_party/flot/*",
|
||||||
|
"//third_party/fontconfig/*",
|
||||||
|
"//third_party/freetype/*",
|
||||||
|
"//third_party/freetype2/*",
|
||||||
|
"//third_party/freetype-android/*",
|
||||||
|
"//third_party/fuchsia-sdk/*",
|
||||||
|
"//third_party/gestures/*",
|
||||||
|
"//third_party/gif_player/*",
|
||||||
|
"//third_party/glfw/*",
|
||||||
|
"//third_party/glslang/*",
|
||||||
|
"//third_party/google_appengine_cloudstorage/*",
|
||||||
|
"//third_party/google_input_tools/*",
|
||||||
|
"//third_party/googletest/*",
|
||||||
|
"//third_party/google_toolbox_for_mac/*",
|
||||||
|
"//third_party/google-truth/*",
|
||||||
|
"//third_party/gradle_wrapper/*",
|
||||||
|
"//third_party/gson/*",
|
||||||
|
"//third_party/guava/*",
|
||||||
|
"//third_party/gvr-android-keyboard/*",
|
||||||
|
"//third_party/gvr-android-sdk/*",
|
||||||
|
"//third_party/hamcrest/*",
|
||||||
|
"//third_party/harfbuzz-ng/*",
|
||||||
|
"//third_party/hunspell/*",
|
||||||
|
"//third_party/hunspell/*",
|
||||||
|
"//third_party/hunspell_dictionaries/*",
|
||||||
|
"//third_party/iaccessible2/*",
|
||||||
|
"//third_party/iccjpeg/*",
|
||||||
|
|
||||||
|
# "//third_party/icu/*", # Many errors
|
||||||
|
"//third_party/icu4j/*",
|
||||||
|
"//third_party/ijar/*",
|
||||||
|
"//third_party/ink/*",
|
||||||
|
"//third_party/inspector_protocol/*",
|
||||||
|
"//third_party/instrumented_libraries/*",
|
||||||
|
"//third_party/intellij/*",
|
||||||
|
"//third_party/isimpledom/*",
|
||||||
|
"//third_party/javax_inject/*",
|
||||||
|
"//third_party/jinja2/*",
|
||||||
|
"//third_party/jsoncpp/*",
|
||||||
|
"//third_party/jsr-305/*",
|
||||||
|
"//third_party/jstemplate/*",
|
||||||
|
"//third_party/junit/*",
|
||||||
|
"//third_party/khronos/*",
|
||||||
|
"//third_party/lcov/*",
|
||||||
|
"//third_party/leakcanary/*",
|
||||||
|
"//third_party/leveldatabase/*",
|
||||||
|
"//third_party/libFuzzer/*",
|
||||||
|
"//third_party/libXNVCtrl/*",
|
||||||
|
"//third_party/libaddressinput/*",
|
||||||
|
|
||||||
|
# "//third_party/libaom/*", # https://crbug.com/899771
|
||||||
|
"//third_party/libc++/*",
|
||||||
|
"//third_party/libc++abi/*",
|
||||||
|
"//third_party/libcxx-pretty-printers/*",
|
||||||
|
"//third_party/libdrm/*",
|
||||||
|
"//third_party/libevdev/*",
|
||||||
|
"//third_party/libexif/*",
|
||||||
|
"//third_party/libjingle/*",
|
||||||
|
|
||||||
|
# "//third_party/libjingle_xmpp/*", # 30ish errors
|
||||||
|
"//third_party/libjpeg/*",
|
||||||
|
|
||||||
|
# "//third_party/libjpeg_turbo/*", # 3 errors
|
||||||
|
# "//third_party/liblouis/*", # Small errors
|
||||||
|
"//third_party/libovr/*",
|
||||||
|
"//third_party/libphonenumber/*",
|
||||||
|
"//third_party/libpng/*",
|
||||||
|
"//third_party/libprotobuf-mutator/*",
|
||||||
|
"//third_party/libsecret/*",
|
||||||
|
"//third_party/libsrtp/*",
|
||||||
|
"//third_party/libsync/*",
|
||||||
|
"//third_party/libudev/*",
|
||||||
|
"//third_party/libusb/*",
|
||||||
|
|
||||||
|
# "//third_party/libvpx/*", # Many errors
|
||||||
|
"//third_party/libvpx_new/*",
|
||||||
|
"//third_party/libwebm/*",
|
||||||
|
|
||||||
|
#"//third_party/libwebp/*", # Errors: https://crbug.com/800762
|
||||||
|
"//third_party/libxml/*",
|
||||||
|
"//third_party/libxslt/*",
|
||||||
|
"//third_party/libyuv/*",
|
||||||
|
"//third_party/llvm/*",
|
||||||
|
"//third_party/llvm-bootstrap/*",
|
||||||
|
"//third_party/llvm-bootstrap-install/*",
|
||||||
|
"//third_party/llvm-build-tools/*",
|
||||||
|
"//third_party/logilab/*",
|
||||||
|
"//third_party/lss/*",
|
||||||
|
"//third_party/lzma_sdk/*",
|
||||||
|
"//third_party/mach_override/*",
|
||||||
|
"//third_party/markdown/*",
|
||||||
|
"//third_party/markupsafe/*",
|
||||||
|
"//third_party/material_design_icons/*",
|
||||||
|
"//third_party/mesa_headers/*",
|
||||||
|
"//third_party/metrics_proto/*",
|
||||||
|
"//third_party/minigbm/*",
|
||||||
|
"//third_party/minizip/*",
|
||||||
|
"//third_party/mocha/*",
|
||||||
|
"//third_party/mockito/*",
|
||||||
|
"//third_party/modp_b64/*",
|
||||||
|
"//third_party/motemplate/*",
|
||||||
|
"//third_party/mozilla/*",
|
||||||
|
"//third_party/mtpd/*",
|
||||||
|
"//third_party/netty4/*",
|
||||||
|
"//third_party/netty-tcnative/*",
|
||||||
|
"//third_party/node/*",
|
||||||
|
"//third_party/nvml/*",
|
||||||
|
"//third_party/objenesis/*",
|
||||||
|
"//third_party/ocmock/*",
|
||||||
|
"//third_party/openh264/*",
|
||||||
|
|
||||||
|
# "//third_party/openmax_dl/*", # 1 error
|
||||||
|
"//third_party/openvr/*",
|
||||||
|
"//third_party/opus/*",
|
||||||
|
"//third_party/ots/*",
|
||||||
|
"//third_party/ow2_asm/*",
|
||||||
|
|
||||||
|
# "//third_party/pdfium/*", # 3 errors
|
||||||
|
"//third_party/perfetto/*",
|
||||||
|
"//third_party/pexpect/*",
|
||||||
|
"//third_party/ply/*",
|
||||||
|
"//third_party/polymer/*",
|
||||||
|
"//third_party/proguard/*",
|
||||||
|
"//third_party/protobuf/*",
|
||||||
|
"//third_party/pycoverage/*",
|
||||||
|
"//third_party/pyelftools/*",
|
||||||
|
"//third_party/pyftpdlib/*",
|
||||||
|
"//third_party/pyjson5/*",
|
||||||
|
"//third_party/pylint/*",
|
||||||
|
"//third_party/pymock/*",
|
||||||
|
"//third_party/pystache/*",
|
||||||
|
"//third_party/py_trace_event/*",
|
||||||
|
"//third_party/pywebsocket/*",
|
||||||
|
"//third_party/qcms/*",
|
||||||
|
"//third_party/quic_trace/*",
|
||||||
|
"//third_party/qunit/*",
|
||||||
|
"//third_party/r8/*",
|
||||||
|
"//third_party/re2/*",
|
||||||
|
"//third_party/requests/*",
|
||||||
|
"//third_party/retrolambda/*",
|
||||||
|
"//third_party/rnnoise/*",
|
||||||
|
"//third_party/robolectric/*",
|
||||||
|
"//third_party/s2cellid/*",
|
||||||
|
"//third_party/safe_browsing/*",
|
||||||
|
"//third_party/scan-build/*",
|
||||||
|
|
||||||
|
# "//third_party/sfntly/*", # 20ish errors
|
||||||
|
"//third_party/shaderc/*",
|
||||||
|
"//third_party/simplejson/*",
|
||||||
|
"//third_party/sinonjs/*",
|
||||||
|
"//third_party/skia/*",
|
||||||
|
"//third_party/smhasher/*",
|
||||||
|
"//third_party/snappy/*",
|
||||||
|
"//third_party/speech-dispatcher/*",
|
||||||
|
"//third_party/spirv-cross/*",
|
||||||
|
"//third_party/spirv-headers/*",
|
||||||
|
"//third_party/sqlite/*",
|
||||||
|
"//third_party/sqlite4java/*",
|
||||||
|
"//third_party/stp/*",
|
||||||
|
"//third_party/sudden_motion_sensor/*",
|
||||||
|
|
||||||
|
# "//third_party/swiftshader/*", # 1 error
|
||||||
|
"//third_party/swig/*",
|
||||||
|
"//third_party/tcmalloc/*",
|
||||||
|
"//third_party/test_fonts/*",
|
||||||
|
"//third_party/tlslite/*",
|
||||||
|
"//third_party/ub-uiautomator/*",
|
||||||
|
"//third_party/unrar/*",
|
||||||
|
"//third_party/usb_ids/*",
|
||||||
|
"//third_party/usrsctp/*",
|
||||||
|
"//third_party/v4l-utils/*",
|
||||||
|
"//third_party/valgrind/*",
|
||||||
|
"//third_party/visualmetrics/*",
|
||||||
|
"//third_party/vulkan/*",
|
||||||
|
"//third_party/vulkan-validation-layers/*",
|
||||||
|
|
||||||
|
# "//third_party/wayland/*", # Small errors
|
||||||
|
"//third_party/wayland-protocols/*",
|
||||||
|
"//third_party/wds/*",
|
||||||
|
"//third_party/web-animations-js/*",
|
||||||
|
"//third_party/webdriver/*",
|
||||||
|
"//third_party/webgl/*",
|
||||||
|
"//third_party/webpagereplay/*",
|
||||||
|
"//third_party/webrtc/*",
|
||||||
|
"//third_party/webrtc_overrides/*",
|
||||||
|
"//third_party/widevine/*",
|
||||||
|
"//third_party/win_build_output/*",
|
||||||
|
"//third_party/woff2/*",
|
||||||
|
"//third_party/wtl/*",
|
||||||
|
"//third_party/xdg-utils/*",
|
||||||
|
"//third_party/xstream/*",
|
||||||
|
"//third_party/yasm/*",
|
||||||
|
"//third_party/zlib/*",
|
||||||
|
"//third_party/woff2/*",
|
||||||
|
|
||||||
|
"//tools/*",
|
||||||
|
"//ui/*",
|
||||||
|
"//url/*",
|
||||||
|
|
||||||
|
#"//v8/*", # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
|
||||||
|
]
|
||||||
|
|
||||||
|
# These are the list of GN files that run exec_script. This whitelist exists
|
||||||
|
# to force additional review for new uses of exec_script, which is strongly
|
||||||
|
# discouraged.
|
||||||
|
#
|
||||||
|
# PLEASE READ
|
||||||
|
#
|
||||||
|
# You should almost never need to add new exec_script calls. exec_script is
|
||||||
|
# slow, especially on Windows, and can cause confusing effects. Although
|
||||||
|
# individually each call isn't slow or necessarily very confusing, at the scale
|
||||||
|
# of our repo things get out of hand quickly. By strongly pushing back on all
|
||||||
|
# additions, we keep the build fast and clean. If you think you need to add a
|
||||||
|
# new call, please consider:
|
||||||
|
#
|
||||||
|
# - Do not use a script to check for the existence of a file or directory to
|
||||||
|
# enable a different mode. Instead, use GN build args to enable or disable
|
||||||
|
# functionality and set options. An example is checking for a file in the
|
||||||
|
# src-internal repo to see if the corresponding src-internal feature should
|
||||||
|
# be enabled. There are several things that can go wrong with this:
|
||||||
|
#
|
||||||
|
# - It's mysterious what causes some things to happen. Although in many cases
|
||||||
|
# such behavior can be conveniently automatic, GN optimizes for explicit
|
||||||
|
# and obvious behavior so people can more easily diagnose problems.
|
||||||
|
#
|
||||||
|
# - The user can't enable a mode for one build and not another. With GN build
|
||||||
|
# args, the user can choose the exact configuration of multiple builds
|
||||||
|
# using one checkout. But implicitly basing flags on the state of the
|
||||||
|
# checkout, this functionality is broken.
|
||||||
|
#
|
||||||
|
# - It's easy to get stale files. If for example the user edits the gclient
|
||||||
|
# to stop checking out src-internal (or any other optional thing), it's
|
||||||
|
# easy to end up with stale files still mysteriously triggering build
|
||||||
|
# conditions that are no longer appropriate (yes, this happens in real
|
||||||
|
# life).
|
||||||
|
#
|
||||||
|
# - Do not use a script to iterate files in a directory (glob):
|
||||||
|
#
|
||||||
|
# - This has the same "stale file" problem as the above discussion. Various
|
||||||
|
# operations can leave untracked files in the source tree which can cause
|
||||||
|
# surprising effects.
|
||||||
|
#
|
||||||
|
# - It becomes impossible to use "git grep" to find where a certain file is
|
||||||
|
# referenced. This operation is very common and people really do get
|
||||||
|
# confused when things aren't listed.
|
||||||
|
#
|
||||||
|
# - It's easy to screw up. One common case is a build-time script that packs
|
||||||
|
# up a directory. The author notices that the script isn't re-run when the
|
||||||
|
# directory is updated, so adds a glob so all the files are listed as
|
||||||
|
# inputs. This seems to work great... until a file is deleted. When a
|
||||||
|
# file is deleted, all the inputs the glob lists will still be up to date
|
||||||
|
# and no command-lines will have been changed. The action will not be
|
||||||
|
# re-run and the build will be broken. It is possible to get this correct
|
||||||
|
# using glob, and it's possible to mess it up without glob, but globs make
|
||||||
|
# this situation much easier to create. if the build always lists the
|
||||||
|
# files and passes them to a script, it will always be correct.
|
||||||
|
|
||||||
|
exec_script_whitelist =
|
||||||
|
build_dotfile_settings.exec_script_whitelist +
|
||||||
|
angle_dotfile_settings.exec_script_whitelist +
|
||||||
|
[
|
||||||
|
# Whitelist entries for //build should go into
|
||||||
|
# //build/dotfile_settings.gni instead, so that they can be shared
|
||||||
|
# with other repos. The entries in this list should be only for files
|
||||||
|
# in the Chromium repo outside of //build.
|
||||||
|
"//build_overrides/build.gni",
|
||||||
|
|
||||||
|
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
||||||
|
# https://crbug.com/474506.
|
||||||
|
"//clank/java/BUILD.gn",
|
||||||
|
"//clank/native/BUILD.gn",
|
||||||
|
|
||||||
|
"//google_apis/BUILD.gn",
|
||||||
|
"//printing/BUILD.gn",
|
||||||
|
|
||||||
|
"//remoting/host/installer/linux/BUILD.gn",
|
||||||
|
"//remoting/remoting_version.gni",
|
||||||
|
"//remoting/host/installer/win/generate_clsids.gni",
|
||||||
|
|
||||||
|
"//tools/grit/grit_rule.gni",
|
||||||
|
]
|
1057
src/AUTHORS
Normal file
1057
src/AUTHORS
Normal file
File diff suppressed because it is too large
Load Diff
1282
src/BUILD.gn
Normal file
1282
src/BUILD.gn
Normal file
File diff suppressed because it is too large
Load Diff
27
src/LICENSE
Normal file
27
src/LICENSE
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
// * Neither the name of Google Inc. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived from
|
||||||
|
// this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1132
src/android_webview/BUILD.gn
Normal file
1132
src/android_webview/BUILD.gn
Normal file
File diff suppressed because it is too large
Load Diff
15
src/android_webview/apk/BUILD.gn
Normal file
15
src/android_webview/apk/BUILD.gn
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright 2017 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
# Since Monochrome has its own content provider, these two files are put
|
||||||
|
# in two different targets.
|
||||||
|
android_library("webview_license_provider_java") {
|
||||||
|
java_files = [ "//android_webview/apk/java/src/com/android/webview/chromium/LicenseContentProvider.java" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library("webview_license_activity_java") {
|
||||||
|
java_files = [ "//android_webview/apk/java/src/com/android/webview/chromium/LicenseActivity.java" ]
|
||||||
|
}
|
66
src/android_webview/browser/gfx/BUILD.gn
Normal file
66
src/android_webview/browser/gfx/BUILD.gn
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# Copyright 2019 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.
|
||||||
|
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
source_set("gfx") {
|
||||||
|
sources = [
|
||||||
|
"aw_draw_fn_impl.cc",
|
||||||
|
"aw_draw_fn_impl.h",
|
||||||
|
"aw_gl_functor.cc",
|
||||||
|
"aw_gl_functor.h",
|
||||||
|
"aw_gl_surface.cc",
|
||||||
|
"aw_gl_surface.h",
|
||||||
|
"aw_picture.cc",
|
||||||
|
"aw_picture.h",
|
||||||
|
"aw_render_thread_context_provider.cc",
|
||||||
|
"aw_render_thread_context_provider.h",
|
||||||
|
"browser_view_renderer.cc",
|
||||||
|
"browser_view_renderer.h",
|
||||||
|
"browser_view_renderer_client.h",
|
||||||
|
"child_frame.cc",
|
||||||
|
"child_frame.h",
|
||||||
|
"compositor_frame_consumer.h",
|
||||||
|
"compositor_frame_producer.h",
|
||||||
|
"compositor_id.cc",
|
||||||
|
"compositor_id.h",
|
||||||
|
"deferred_gpu_command_service.cc",
|
||||||
|
"deferred_gpu_command_service.h",
|
||||||
|
"hardware_renderer.cc",
|
||||||
|
"hardware_renderer.h",
|
||||||
|
"java_browser_view_renderer_helper.cc",
|
||||||
|
"java_browser_view_renderer_helper.h",
|
||||||
|
"parent_compositor_draw_constraints.cc",
|
||||||
|
"parent_compositor_draw_constraints.h",
|
||||||
|
"parent_output_surface.cc",
|
||||||
|
"parent_output_surface.h",
|
||||||
|
"render_thread_manager.cc",
|
||||||
|
"render_thread_manager.h",
|
||||||
|
"scoped_app_gl_state_restore.cc",
|
||||||
|
"scoped_app_gl_state_restore.h",
|
||||||
|
"surfaces_instance.cc",
|
||||||
|
"surfaces_instance.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//android_webview:native_jni",
|
||||||
|
"//base",
|
||||||
|
"//content/public/browser",
|
||||||
|
"//gpu/command_buffer/client:gles2_implementation",
|
||||||
|
"//gpu/command_buffer/service",
|
||||||
|
"//gpu/ipc:gl_in_process_context",
|
||||||
|
"//gpu/ipc/common:common",
|
||||||
|
"//gpu/skia_bindings",
|
||||||
|
"//gpu/vulkan:vulkan",
|
||||||
|
"//gpu/vulkan/init",
|
||||||
|
"//services/viz/public/interfaces",
|
||||||
|
"//skia",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/gl",
|
||||||
|
"//ui/gl/init",
|
||||||
|
]
|
||||||
|
|
||||||
|
libs = [ "jnigraphics" ]
|
||||||
|
}
|
72
src/android_webview/glue/BUILD.gn
Normal file
72
src/android_webview/glue/BUILD.gn
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//android_webview/system_webview_apk_tmpl.gni")
|
||||||
|
import("//android_webview/variables.gni")
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
import("generate_resource_rewriter.gni")
|
||||||
|
import("glue.gni")
|
||||||
|
|
||||||
|
generate_resource_rewriter("glue_resource_rewriter") {
|
||||||
|
# Change deps? please modify glue_library_deps variable.
|
||||||
|
deps = glue_library_deps
|
||||||
|
package_name = "com.android.webview.chromium"
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library("glue") {
|
||||||
|
# Change deps? please modify glue_library_deps variable.
|
||||||
|
deps = glue_library_deps
|
||||||
|
srcjar_deps = [ ":glue_resource_rewriter" ]
|
||||||
|
|
||||||
|
alternative_android_sdk_dep =
|
||||||
|
"//third_party/android_system_sdk:public_framework_system_java"
|
||||||
|
|
||||||
|
java_files = [
|
||||||
|
"java/src/com/android/webview/chromium/CallbackConverter.java",
|
||||||
|
"java/src/com/android/webview/chromium/ContentSettingsAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/CookieManagerAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/DrawFunctor.java",
|
||||||
|
"java/src/com/android/webview/chromium/DrawGLFunctor.java",
|
||||||
|
"java/src/com/android/webview/chromium/GeolocationPermissionsAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/GlueApiHelperForM.java",
|
||||||
|
"java/src/com/android/webview/chromium/GlueApiHelperForN.java",
|
||||||
|
"java/src/com/android/webview/chromium/GlueApiHelperForO.java",
|
||||||
|
"java/src/com/android/webview/chromium/GlueApiHelperForOMR1.java",
|
||||||
|
"java/src/com/android/webview/chromium/GlueApiHelperForP.java",
|
||||||
|
"java/src/com/android/webview/chromium/GraphicsUtils.java",
|
||||||
|
"java/src/com/android/webview/chromium/MonochromeLibraryPreloader.java",
|
||||||
|
"java/src/com/android/webview/chromium/SafeBrowsingResponseAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/ServiceWorkerClientAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/ServiceWorkerControllerAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/ServiceWorkerSettingsAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/SharedStatics.java",
|
||||||
|
"java/src/com/android/webview/chromium/SharedTracingControllerAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/SplitApkWorkaround.java",
|
||||||
|
"java/src/com/android/webview/chromium/TracingControllerAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebBackForwardListChromium.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebHistoryItemChromium.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebIconDatabaseAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebMessagePortAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebResourceErrorAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebResourceRequestAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebStorageAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebkitToSharedGlueConverter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewApplication.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewChromiumAwInit.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewChromium.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewChromiumFactoryProviderForO.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewChromiumFactoryProviderForOMR1.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewChromiumFactoryProviderForP.java",
|
||||||
|
"java/src/com/android/webview/chromium/SharedWebViewChromium.java",
|
||||||
|
"java/src/com/android/webview/chromium/SharedWebViewContentsClientAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/SharedWebViewRendererClientAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewDatabaseAdapter.java",
|
||||||
|
"java/src/com/android/webview/chromium/WebViewDelegateFactory.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
android_manifest_for_lint = system_webview_android_manifest
|
||||||
|
}
|
55
src/android_webview/glue/generate_resource_rewriter.gni
Normal file
55
src/android_webview/glue/generate_resource_rewriter.gni
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
# Generate ResourceRewriter.java from Android Libraries according the dep
|
||||||
|
# graph.
|
||||||
|
# Argument:
|
||||||
|
# deps
|
||||||
|
# The same deps of target that uses the generated ResourceRewriter.
|
||||||
|
# package_name
|
||||||
|
# The package name of ResourceRewriter.java.
|
||||||
|
#
|
||||||
|
# This target generates a single srcjar containing generated
|
||||||
|
# ResourceRewrite.java which will list the R classes generated by all the
|
||||||
|
# Android libraries reachabled from the target specified in deps. Add this
|
||||||
|
# target to srcjar_deps of android_library will call ResourceRewriter.
|
||||||
|
#
|
||||||
|
template("generate_resource_rewriter") {
|
||||||
|
set_sources_assignment_filter([])
|
||||||
|
assert(defined(invoker.package_name))
|
||||||
|
|
||||||
|
_final_target_name = target_name
|
||||||
|
_build_config = "$target_gen_dir/${target_name}.build_config"
|
||||||
|
_build_config_target_name = "$target_name$build_config_target_suffix"
|
||||||
|
_srcjar = "$target_gen_dir/${target_name}.srcjar"
|
||||||
|
write_build_config(_build_config_target_name) {
|
||||||
|
possible_config_deps = invoker.deps
|
||||||
|
type = "resource_rewriter"
|
||||||
|
build_config = _build_config
|
||||||
|
}
|
||||||
|
|
||||||
|
action(_final_target_name) {
|
||||||
|
forward_variables_from(invoker, [ "visibility" ])
|
||||||
|
inputs = [
|
||||||
|
_build_config,
|
||||||
|
]
|
||||||
|
deps = invoker.deps + [ ":${_build_config_target_name}" ]
|
||||||
|
script = "//build/android/gyp/generate_resource_rewriter.py"
|
||||||
|
|
||||||
|
_rebased_build_config = rebase_path(_build_config, root_build_dir)
|
||||||
|
args = [
|
||||||
|
"--package-name",
|
||||||
|
invoker.package_name,
|
||||||
|
"--dep-packages",
|
||||||
|
"@FileArg($_rebased_build_config:resources:extra_package_names)",
|
||||||
|
"--srcjar",
|
||||||
|
rebase_path(_srcjar, root_build_dir),
|
||||||
|
]
|
||||||
|
outputs = [
|
||||||
|
_srcjar,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
21
src/android_webview/glue/glue.gni
Normal file
21
src/android_webview/glue/glue.gni
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
# This variable shared between 'glue' and 'glue_resource_rewriter' because
|
||||||
|
# ResourceRewrite.java need to be generated according 'glue' deps.
|
||||||
|
glue_library_deps = [
|
||||||
|
"//android_webview:android_webview_java",
|
||||||
|
"//android_webview:android_webview_commandline_java",
|
||||||
|
"//android_webview:android_webview_platform_services_java",
|
||||||
|
"//android_webview:system_webview_manifest",
|
||||||
|
"//android_webview/support_library/boundary_interfaces:boundary_interface_java",
|
||||||
|
"//android_webview/support_library/callback:callback_java",
|
||||||
|
"//base:base_java",
|
||||||
|
"//components/autofill/android:autofill_java",
|
||||||
|
"//components/autofill/android:provider_java",
|
||||||
|
"//components/embedder_support/android:application_java",
|
||||||
|
"//content/public/android:content_java",
|
||||||
|
"//net/android:net_java",
|
||||||
|
"//ui/android:ui_java",
|
||||||
|
]
|
10
src/android_webview/proto/BUILD.gn
Normal file
10
src/android_webview/proto/BUILD.gn
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
proto_java_library("aw_variations_seed_proto_java") {
|
||||||
|
proto_path = "."
|
||||||
|
sources = [ "aw_variations_seed.proto" ]
|
||||||
|
}
|
37
src/android_webview/support_library/BUILD.gn
Normal file
37
src/android_webview/support_library/BUILD.gn
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
android_library("support_lib_glue_java") {
|
||||||
|
java_files = [
|
||||||
|
"java/src/org/chromium/support_lib_glue/IsomorphicAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibProxyControllerAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibReflectionUtil.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibServiceWorkerClientAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibServiceWorkerControllerAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibServiceWorkerSettingsAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibTracingControllerAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebMessageCallbackAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebMessagePortAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebResourceRequest.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebSettingsAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebViewRendererAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebViewRendererClientAdapter.java",
|
||||||
|
"java/src/org/chromium/support_lib_glue/SupportLibWebkitToCompatConverterAdapter.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//android_webview:android_webview_commandline_java",
|
||||||
|
"//android_webview:android_webview_java",
|
||||||
|
"//android_webview/glue:glue",
|
||||||
|
"//android_webview/support_library/boundary_interfaces:boundary_interface_java",
|
||||||
|
"//android_webview/support_library/callback:callback_java",
|
||||||
|
"//base:base_java",
|
||||||
|
"//content/public/android:content_java",
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
# Copyright 2017 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.
|
||||||
|
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
android_library("boundary_interface_java") {
|
||||||
|
java_files = [
|
||||||
|
"src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java",
|
||||||
|
"src/org/chromium/support_lib_boundary/util/Features.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
proguard_configs = [ "proguard.flags" ]
|
||||||
|
|
||||||
|
# We can't use ANY deps here, the support library should be able to build
|
||||||
|
# these interfaces without any other chromium dependencies.
|
||||||
|
deps = []
|
||||||
|
|
||||||
|
# This is to verify the boundary interfaces compile and lint correctly against
|
||||||
|
# the minSdkVersion of the webkit support library module.
|
||||||
|
android_manifest_for_lint = "AndroidManifest.xml"
|
||||||
|
}
|
21
src/android_webview/support_library/callback/BUILD.gn
Normal file
21
src/android_webview/support_library/callback/BUILD.gn
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
android_library("callback_java") {
|
||||||
|
java_files = [
|
||||||
|
"java/src/org/chromium/support_lib_callback_glue/SupportLibSafeBrowsingResponse.java",
|
||||||
|
"java/src/org/chromium/support_lib_callback_glue/SupportLibWebResourceError.java",
|
||||||
|
"java/src/org/chromium/support_lib_callback_glue/SupportLibWebViewContentsClientAdapter.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//android_webview:android_webview_commandline_java",
|
||||||
|
"//android_webview:android_webview_java",
|
||||||
|
"//android_webview/support_library/boundary_interfaces:boundary_interface_java",
|
||||||
|
"//base:base_java",
|
||||||
|
]
|
||||||
|
}
|
136
src/android_webview/system_webview_apk_tmpl.gni
Normal file
136
src/android_webview/system_webview_apk_tmpl.gni
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//base/android/proguard/proguard.gni")
|
||||||
|
import("//build/config/android/chrome_version.gni")
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
import("//build/config/locales.gni")
|
||||||
|
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
|
||||||
|
|
||||||
|
template("system_webview_apk_tmpl") {
|
||||||
|
android_apk(target_name) {
|
||||||
|
forward_variables_from(invoker, "*")
|
||||||
|
|
||||||
|
deps += [
|
||||||
|
"//android_webview:license_assets",
|
||||||
|
"//android_webview:locale_pak_assets",
|
||||||
|
"//android_webview:pak_file_assets",
|
||||||
|
"//android_webview/apk:webview_license_activity_java",
|
||||||
|
"//android_webview/apk:webview_license_provider_java",
|
||||||
|
"//android_webview/glue",
|
||||||
|
"//android_webview/support_library:support_lib_glue_java",
|
||||||
|
"//base:base_java",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (!defined(alternative_android_sdk_dep)) {
|
||||||
|
alternative_android_sdk_dep = webview_framework_dep
|
||||||
|
}
|
||||||
|
|
||||||
|
shared_resources = true
|
||||||
|
|
||||||
|
_use_trichrome_library =
|
||||||
|
defined(use_trichrome_library) && use_trichrome_library
|
||||||
|
|
||||||
|
if (!_use_trichrome_library || !trichrome_shared_assets) {
|
||||||
|
deps += [ "//android_webview:monochrome_webview_assets" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_use_trichrome_library) {
|
||||||
|
shared_libraries = [ "//android_webview:libwebviewchromium" ]
|
||||||
|
deps += [
|
||||||
|
"//third_party/crashpad/crashpad/handler:crashpad_handler_trampoline",
|
||||||
|
]
|
||||||
|
loadable_modules = [ "$root_out_dir/libcrashpad_handler_trampoline.so" ]
|
||||||
|
|
||||||
|
if (build_apk_secondary_abi && android_64bit_target_cpu) {
|
||||||
|
secondary_abi_shared_libraries = [ "//android_webview:libwebviewchromium($android_secondary_abi_toolchain)" ]
|
||||||
|
_trampoline = "//third_party/crashpad/crashpad/handler:crashpad_handler_trampoline($android_secondary_abi_toolchain)"
|
||||||
|
deps += [ _trampoline ]
|
||||||
|
_secondary_out_dir = get_label_info(_trampoline, "root_out_dir")
|
||||||
|
secondary_abi_loadable_modules =
|
||||||
|
[ "$_secondary_out_dir/libcrashpad_handler_trampoline.so" ]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uncompress_shared_libraries = true
|
||||||
|
|
||||||
|
# Include placeholder libraries to ensure we are treated as the desired
|
||||||
|
# architecture.
|
||||||
|
if (android_64bit_target_cpu) {
|
||||||
|
shared_libraries = [ "//android_webview:monochrome" ]
|
||||||
|
deps += [
|
||||||
|
"//third_party/crashpad/crashpad/handler:crashpad_handler_trampoline",
|
||||||
|
]
|
||||||
|
loadable_modules = [ "$root_out_dir/libcrashpad_handler_trampoline.so" ]
|
||||||
|
|
||||||
|
if (build_apk_secondary_abi) {
|
||||||
|
secondary_native_lib_placeholders = [ "libdummy.so" ]
|
||||||
|
if (use_v8_context_snapshot) {
|
||||||
|
deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ]
|
||||||
|
} else {
|
||||||
|
deps += [ "//v8:v8_external_startup_data_assets" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
native_lib_placeholders = [ "libdummy.so" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_use_trichrome_library || android_64bit_target_cpu) {
|
||||||
|
# 32-bit TrichromeWebView doesn't have a native library, so only do this
|
||||||
|
# for other configs.
|
||||||
|
native_lib_version_rule = "//build/util:chrome_version_json"
|
||||||
|
_native_lib_file =
|
||||||
|
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
|
||||||
|
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
|
||||||
|
}
|
||||||
|
|
||||||
|
aapt_locale_whitelist = locales
|
||||||
|
|
||||||
|
resource_blacklist_regex = "[/-]xxxhdpi[/-]"
|
||||||
|
|
||||||
|
# Exception rationale in https://crbug.com/691733.
|
||||||
|
resource_blacklist_exceptions = [
|
||||||
|
"*shadow*", # Combination of gradient & transparency cause pixelation.
|
||||||
|
"*.9.*", # Most nine-patches contain shadows.
|
||||||
|
]
|
||||||
|
|
||||||
|
# Used as an additional apk in test scripts.
|
||||||
|
never_incremental = true
|
||||||
|
|
||||||
|
if (is_java_debug) {
|
||||||
|
enable_multidex = true
|
||||||
|
} else {
|
||||||
|
proguard_enabled = true
|
||||||
|
if (!defined(proguard_configs)) {
|
||||||
|
proguard_configs = []
|
||||||
|
}
|
||||||
|
proguard_configs += [
|
||||||
|
"//android_webview/apk/java/proguard.flags",
|
||||||
|
"//base/android/proguard/chromium_apk.flags",
|
||||||
|
"//base/android/proguard/chromium_code.flags",
|
||||||
|
]
|
||||||
|
if (enable_proguard_obfuscation) {
|
||||||
|
proguard_configs +=
|
||||||
|
[ "//base/android/proguard/enable_obfuscation.flags" ]
|
||||||
|
} else {
|
||||||
|
proguard_configs +=
|
||||||
|
[ "//base/android/proguard/disable_all_obfuscation.flags" ]
|
||||||
|
}
|
||||||
|
png_to_webp = true
|
||||||
|
}
|
||||||
|
command_line_flags_file = "webview-command-line"
|
||||||
|
|
||||||
|
if (!defined(version_code)) {
|
||||||
|
if (_use_trichrome_library) {
|
||||||
|
version_code = trichrome_version_code
|
||||||
|
} else {
|
||||||
|
version_code = webview_version_code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!defined(version_name)) {
|
||||||
|
version_name = chrome_version_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
386
src/android_webview/test/BUILD.gn
Normal file
386
src/android_webview/test/BUILD.gn
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
import("//device/vr/buildflags/buildflags.gni")
|
||||||
|
import("//testing/test.gni")
|
||||||
|
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
|
||||||
|
|
||||||
|
# Mark all targets as test only.
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
group("test") {
|
||||||
|
deps = [
|
||||||
|
":android_webview_unittests",
|
||||||
|
":webview_instrumentation_test_apk",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (public_android_sdk) {
|
||||||
|
group("webview_cts_tests") {
|
||||||
|
_py_files =
|
||||||
|
read_file("//android_webview/tools/run_cts.pydeps", "list lines")
|
||||||
|
deps = [
|
||||||
|
"//android_webview:system_webview_apk",
|
||||||
|
]
|
||||||
|
|
||||||
|
data_deps = [
|
||||||
|
"//build/android:logdog_wrapper_py",
|
||||||
|
"//build/android:test_runner_py",
|
||||||
|
"//testing/buildbot/filters:webview_cts_tests_filters",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Filter out comments.
|
||||||
|
set_sources_assignment_filter([ "#*" ])
|
||||||
|
sources = _py_files
|
||||||
|
|
||||||
|
data = sources
|
||||||
|
data += [ "//android_webview/tools/cts_config/" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android_apk("webview_instrumentation_apk") {
|
||||||
|
deps = [
|
||||||
|
":android_webview_apk_assets",
|
||||||
|
":android_webview_apk_resources",
|
||||||
|
"//android_webview:android_webview_java",
|
||||||
|
"//android_webview:locale_pak_assets",
|
||||||
|
"//android_webview:platform_service_bridge_upstream_implementation_java",
|
||||||
|
"//base:base_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//components/heap_profiling:heap_profiling_java_test_support",
|
||||||
|
"//components/policy/android:policy_java_test_support",
|
||||||
|
"//content/public/android:content_java",
|
||||||
|
"//third_party/android_support_test_runner:runner_java",
|
||||||
|
"//third_party/junit",
|
||||||
|
"//ui/android:ui_java",
|
||||||
|
]
|
||||||
|
|
||||||
|
apk_name = "WebViewInstrumentation"
|
||||||
|
android_manifest = "shell/AndroidManifest.xml"
|
||||||
|
java_files = [
|
||||||
|
"shell/src/org/chromium/android_webview/shell/AwShellActivity.java",
|
||||||
|
"shell/src/org/chromium/android_webview/shell/AwShellApplication.java",
|
||||||
|
"shell/src/org/chromium/android_webview/shell/AwShellResourceProvider.java",
|
||||||
|
"shell/src/org/chromium/android_webview/shell/AwShellSwitches.java",
|
||||||
|
"shell/src/org/chromium/android_webview/shell/DrawFn.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/AwTestContainerView.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/AwJUnit4ClassRunner.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/NullContentsClient.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/SecondBrowserProcess.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/OnlyRunIn.java",
|
||||||
|
"shell/src/org/chromium/android_webview/test/TestContentProvider.java",
|
||||||
|
]
|
||||||
|
|
||||||
|
shared_libraries = [ ":libstandalonelibwebviewchromium" ]
|
||||||
|
|
||||||
|
native_lib_version_rule = "//build/util:chrome_version_json"
|
||||||
|
_native_lib_file =
|
||||||
|
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_build_dir)
|
||||||
|
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
|
||||||
|
|
||||||
|
enable_multidex = true
|
||||||
|
|
||||||
|
command_line_flags_file = "android-webview-command-line"
|
||||||
|
}
|
||||||
|
|
||||||
|
android_resources("android_webview_apk_resources") {
|
||||||
|
resource_dirs = [ "shell/res" ]
|
||||||
|
custom_package = "org.chromium.android_webview.shell"
|
||||||
|
}
|
||||||
|
|
||||||
|
android_assets("android_webview_apk_assets") {
|
||||||
|
deps = [
|
||||||
|
"//android_webview:pak_file_assets",
|
||||||
|
"//third_party/icu:icu_assets",
|
||||||
|
]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"shell/assets/asset_file.html",
|
||||||
|
"shell/assets/asset_icon.png",
|
||||||
|
"shell/assets/autofill.html",
|
||||||
|
"shell/assets/cookie_test.html",
|
||||||
|
"shell/assets/full_screen_video.js",
|
||||||
|
"shell/assets/full_screen_video_inside_div_test.html",
|
||||||
|
"shell/assets/full_screen_video_test.html",
|
||||||
|
"shell/assets/full_screen_video_test_not_preloaded.html",
|
||||||
|
"shell/assets/key-system-test.html",
|
||||||
|
"shell/assets/platform-media-codec-test.html",
|
||||||
|
"shell/assets/star.svg",
|
||||||
|
"shell/assets/star.svgz",
|
||||||
|
"shell/assets/video.3gp",
|
||||||
|
"shell/assets/video.webm",
|
||||||
|
"shell/assets/visual_state_during_fullscreen_test.html",
|
||||||
|
"shell/assets/visual_state_on_page_commit_visible_test.html",
|
||||||
|
"shell/assets/visual_state_waits_for_js_detached_test.html",
|
||||||
|
"shell/assets/visual_state_waits_for_js_test.html",
|
||||||
|
"shell/assets/webvr_not_functional_test.html",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (use_v8_context_snapshot) {
|
||||||
|
deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ]
|
||||||
|
} else {
|
||||||
|
deps += [ "//v8:v8_external_startup_data_assets" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shared_library("libstandalonelibwebviewchromium") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"../lib/webview_entry_point.cc",
|
||||||
|
"shell/src/draw_gl/draw_fn.cc",
|
||||||
|
]
|
||||||
|
ldflags = [ "-Wl,-shared,-Bsymbolic" ]
|
||||||
|
deps = [
|
||||||
|
"//android_webview:common",
|
||||||
|
"//base",
|
||||||
|
"//components/heap_profiling:test_support",
|
||||||
|
"//components/minidump_uploader",
|
||||||
|
"//content/public/test/android:content_native_test_support",
|
||||||
|
]
|
||||||
|
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
|
||||||
|
configs += [ "//build/config/android:hide_all_but_jni" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumentation_test_apk("webview_instrumentation_test_apk") {
|
||||||
|
apk_name = "WebViewInstrumentationTest"
|
||||||
|
apk_under_test = ":webview_instrumentation_apk"
|
||||||
|
android_manifest = "../javatests/AndroidManifest.xml"
|
||||||
|
deps = [
|
||||||
|
"//android_webview:android_webview_java",
|
||||||
|
"//android_webview:android_webview_platform_services_java",
|
||||||
|
"//android_webview:android_webview_services_java",
|
||||||
|
"//android_webview:aw_variations_seed_server_aidl",
|
||||||
|
"//android_webview/test/embedded_test_server:aw_net_java_test_support",
|
||||||
|
"//base:base_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//components/autofill/android:provider_java",
|
||||||
|
"//components/embedder_support/android:web_contents_delegate_java",
|
||||||
|
"//components/minidump_uploader:minidump_uploader_java",
|
||||||
|
"//components/minidump_uploader:minidump_uploader_javatests",
|
||||||
|
"//components/policy/android:policy_java",
|
||||||
|
"//components/policy/android:policy_java_test_support",
|
||||||
|
"//components/safe_browsing/android:safe_browsing_java",
|
||||||
|
"//content/public/android:content_java",
|
||||||
|
"//content/public/test/android:content_java_test_support",
|
||||||
|
"//mojo/public/java:bindings_java",
|
||||||
|
"//net/android:net_java",
|
||||||
|
"//net/android:net_java_test_support",
|
||||||
|
"//net/android:net_javatests",
|
||||||
|
"//services/device/public/java:geolocation_java",
|
||||||
|
"//services/device/public/java:geolocation_java_test_support",
|
||||||
|
"//third_party/android_support_test_runner:rules_java",
|
||||||
|
"//third_party/android_support_test_runner:runner_java",
|
||||||
|
"//third_party/junit",
|
||||||
|
"//ui/android:ui_java",
|
||||||
|
]
|
||||||
|
java_files = [
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AndroidProtocolHandlerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ArchiveTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwAutocompleteTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwAutofillTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsAnchorViewTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientAutoLoginTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientFaviconTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientGetDefaultVideoPosterTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnFormResubmissionTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnRendererUnresponsiveTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnRenderProcessGoneTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnScaleChangedTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsContainerViewTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsGarbageCollectionTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsLifecycleNotifierTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsStaticsTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwContentsTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwDebugTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwFormDatabaseTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwImeTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwJavaBridgeTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwLayoutSizerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwLegacyQuirksTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwNetworkConfigurationTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwPermissionManagerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwProxyControllerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwScrollOffsetManagerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwServiceWorkerClientTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwSettingsTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwStrictModeTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwVariationsSeedFetcherTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwWebContentsObserverTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwZoomTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/CleanupReferenceTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClientAddMessageToConsoleTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClientOnPageStartedTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ClientOnReceivedHttpErrorTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ConsoleMessagesForBlockedLoadsTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/ContentViewMiscTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/CookieManagerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/DisableHardwareAccelerationForTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/FindAddressTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/GeolocationTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/GetTitleTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/HeapProfilingTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/HttpAuthDatabaseTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/KeySystemTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/LoadUrlTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/MediaAccessPermissionRequestTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/OnDiskFileTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/PlatformMediaCodecTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/PolicyUrlFilteringTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/PopupWindowTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/PostMessageTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/RenderProcessGoneHelper.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/AwUncaughtExceptionTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/SslPreferencesTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/StandaloneAwQuotaManagerBridgeTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/TestAwContents.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/TestAwServiceWorkerClient.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/UserAgentTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/VariationsSeedHolderTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/VariationsSeedLoaderTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/VariationsUtilsTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/VisualStateTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/WebKitHitTestTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/WebViewAsynchronousFindApisTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/WebViewFindApisTestRule.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/WebViewWebVrTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/services/CrashReceiverServiceTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/services/MinidumpUploaderTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/services/MockVariationsSeedServer.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/services/VariationsSeedServerTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/services/VisualStateCallbackTest.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/CommonResources.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/CookieUtils.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/GraphicsTestUtils.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/ImagePageGenerator.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/JSUtils.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/JavascriptEventObserver.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/VariationsTestUtils.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/VideoSurfaceViewUtils.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java",
|
||||||
|
"../javatests/src/org/chromium/android_webview/test/util/VideoTestWebServer.java",
|
||||||
|
]
|
||||||
|
data = [
|
||||||
|
"data/",
|
||||||
|
]
|
||||||
|
data_deps = [
|
||||||
|
"//testing/buildbot/filters:webview_instrumentation_test_apk_filters",
|
||||||
|
]
|
||||||
|
|
||||||
|
# We only want to bother including these on bots set up for VR testing
|
||||||
|
if (include_vr_data) {
|
||||||
|
data += [
|
||||||
|
"//chrome/android/shared_preference_files/test/",
|
||||||
|
"//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
additional_apks = [
|
||||||
|
"//android_webview/test/embedded_test_server:aw_net_test_support_apk",
|
||||||
|
"//net/android:net_test_support_apk",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("android_webview_unittests") {
|
||||||
|
# Dependencies (e.g. Play services) make the binary reach the dex limit.
|
||||||
|
enable_multidex = true
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":android_webview_unittests_assets",
|
||||||
|
":android_webview_unittests_java",
|
||||||
|
":android_webview_unittests_jni",
|
||||||
|
"//android_webview:common",
|
||||||
|
"//base/test:test_support",
|
||||||
|
"//components/prefs:prefs",
|
||||||
|
"//components/prefs:test_support",
|
||||||
|
"//content:content",
|
||||||
|
"//content/test:test_support",
|
||||||
|
"//net:net",
|
||||||
|
"//net:test_support",
|
||||||
|
"//ui/base:ui_base_jni_headers",
|
||||||
|
"//ui/gl",
|
||||||
|
"//ui/gl:test_support",
|
||||||
|
]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"../browser/aw_content_browser_client_unittest.cc",
|
||||||
|
"../browser/aw_contents_client_bridge_unittest.cc",
|
||||||
|
"../browser/aw_form_database_service_unittest.cc",
|
||||||
|
"../browser/aw_media_url_interceptor_unittest.cc",
|
||||||
|
"../browser/aw_permission_manager_unittest.cc",
|
||||||
|
"../browser/aw_static_cookie_policy_unittest.cc",
|
||||||
|
"../browser/command_line_helper_unittest.cc",
|
||||||
|
"../browser/gfx/browser_view_renderer_unittest.cc",
|
||||||
|
"../browser/gfx/test/fake_window.cc",
|
||||||
|
"../browser/gfx/test/fake_window.h",
|
||||||
|
"../browser/gfx/test/rendering_test.cc",
|
||||||
|
"../browser/gfx/test/rendering_test.h",
|
||||||
|
"../browser/input_stream_unittest.cc",
|
||||||
|
"../browser/net/android_stream_reader_url_request_job_unittest.cc",
|
||||||
|
"../browser/net/aw_cookie_store_wrapper_unittest.cc",
|
||||||
|
"../browser/net/aw_url_request_context_getter_unittest.cc",
|
||||||
|
"../browser/net/input_stream_reader_unittest.cc",
|
||||||
|
"../browser/net_network_service/android_stream_reader_url_loader_unittest.cc",
|
||||||
|
"../browser/permission/media_access_permission_request_unittest.cc",
|
||||||
|
"../browser/permission/permission_request_handler_unittest.cc",
|
||||||
|
"../browser/renderer_host/auto_login_parser_unittest.cc",
|
||||||
|
"../browser/safe_browsing/aw_safe_browsing_whitelist_manager_unittest.cc",
|
||||||
|
"../browser/state_serializer_unittest.cc",
|
||||||
|
"../lib/webview_tests.cc",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_assets("android_webview_unittests_assets") {
|
||||||
|
sources = [
|
||||||
|
"unittest/assets/asset_file.ogg",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library("android_webview_unittests_java") {
|
||||||
|
testonly = true
|
||||||
|
deps = [
|
||||||
|
"//android_webview:android_webview_java",
|
||||||
|
"//base:base_java",
|
||||||
|
"//content/public/test/android:content_java_test_support",
|
||||||
|
]
|
||||||
|
java_files = [
|
||||||
|
"../unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java",
|
||||||
|
"../unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
generate_jni("android_webview_unittests_jni") {
|
||||||
|
jni_package = "android_webview_unittests"
|
||||||
|
sources = [
|
||||||
|
"../unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java",
|
||||||
|
"../unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java",
|
||||||
|
]
|
||||||
|
}
|
71
src/android_webview/test/embedded_test_server/BUILD.gn
Normal file
71
src/android_webview/test/embedded_test_server/BUILD.gn
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# Copyright 2017 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.
|
||||||
|
|
||||||
|
import("//build/config/android/config.gni")
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
android_library("aw_net_java_test_support") {
|
||||||
|
testonly = true
|
||||||
|
java_files = [
|
||||||
|
"java/src/org/chromium/android_webview/test/AwEmbeddedTestServer.java",
|
||||||
|
"java/src/org/chromium/android_webview/test/AwEmbeddedTestServerImpl.java",
|
||||||
|
"java/src/org/chromium/android_webview/test/AwEmbeddedTestServerService.java",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//base:base_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//net/android:embedded_test_server_aidl_java",
|
||||||
|
"//net/android:net_java",
|
||||||
|
"//net/android:net_java_test_support",
|
||||||
|
"//net/android:net_java_test_support_provider",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
generate_jni("aw_net_jni_headers") {
|
||||||
|
sources = [
|
||||||
|
"java/src/org/chromium/android_webview/test/AwEmbeddedTestServerImpl.java",
|
||||||
|
]
|
||||||
|
jni_package = "android_webview/test"
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("aw_java_test_native_support") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"../../../net/test/embedded_test_server/android/embedded_test_server_android.cc",
|
||||||
|
"../../../net/test/embedded_test_server/android/embedded_test_server_android.h",
|
||||||
|
"aw_embedded_test_server.cc",
|
||||||
|
"aw_test_entry_point.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//net:test_support",
|
||||||
|
]
|
||||||
|
public_deps = [
|
||||||
|
":aw_net_jni_headers",
|
||||||
|
"//net:net_test_jni_headers",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
shared_library("aw_net_java_test_native_support") {
|
||||||
|
testonly = true
|
||||||
|
deps = [
|
||||||
|
":aw_java_test_native_support",
|
||||||
|
"//net:test_support",
|
||||||
|
]
|
||||||
|
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
|
||||||
|
configs += [ "//build/config/android:hide_all_but_jni" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_apk("aw_net_test_support_apk") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
# Used as an additional_apk in test scripts.
|
||||||
|
never_incremental = true
|
||||||
|
deps = [
|
||||||
|
":aw_net_java_test_support",
|
||||||
|
"//base:base_java",
|
||||||
|
]
|
||||||
|
android_manifest = "java/AndroidManifest.xml"
|
||||||
|
apk_name = "ChromiumNetTestAwSupport"
|
||||||
|
shared_libraries = [ ":aw_net_java_test_native_support" ]
|
||||||
|
}
|
72
src/android_webview/tools/automated_ui_tests/BUILD.gn
Normal file
72
src/android_webview/tools/automated_ui_tests/BUILD.gn
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# Copyright 2016 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
import("//testing/test.gni")
|
||||||
|
|
||||||
|
group("webview_ui_test_app") {
|
||||||
|
testonly = true
|
||||||
|
deps = [
|
||||||
|
":webview_ui_test_app_apk",
|
||||||
|
":webview_ui_test_app_test_apk",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_apk("webview_ui_test_app_apk") {
|
||||||
|
apk_name = "WebViewUiTestApp"
|
||||||
|
android_manifest = "java/AndroidManifest.xml"
|
||||||
|
deps = [
|
||||||
|
":webview_ui_test_app_apk_resources",
|
||||||
|
":webview_ui_test_app_java",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_library("webview_ui_test_app_java") {
|
||||||
|
java_files =
|
||||||
|
[ "java/src/org/chromium/webview_ui_test/WebViewUiTestActivity.java" ]
|
||||||
|
deps = [
|
||||||
|
":webview_ui_test_app_apk_resources",
|
||||||
|
"//base:base_java",
|
||||||
|
]
|
||||||
|
|
||||||
|
android_manifest_for_lint = "java/AndroidManifest.xml"
|
||||||
|
}
|
||||||
|
|
||||||
|
android_resources("webview_ui_test_app_apk_resources") {
|
||||||
|
resource_dirs = [ "java/res" ]
|
||||||
|
custom_package = "org.chromium.webview_ui_test"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumentation_test_apk("webview_ui_test_app_test_apk") {
|
||||||
|
apk_name = "WebViewUiTestAppTest"
|
||||||
|
apk_under_test = ":webview_ui_test_app_apk"
|
||||||
|
android_manifest = "javatests/AndroidManifest.xml"
|
||||||
|
java_files = [
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/DropDownListTest.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/WebViewJSTest.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/util/Actions.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/util/Atoms.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/util/UseLayout.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/util/WebViewUiTestRule.java",
|
||||||
|
"javatests/src/org/chromium/webview_ui_test/test/util/WebViewSyncWrapper.java",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":webview_ui_test_app_apk_resources",
|
||||||
|
":webview_ui_test_app_java",
|
||||||
|
"//base:base_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//third_party/android_deps:android_support_annotations_java",
|
||||||
|
"//third_party/android_support_test_runner:rules_java",
|
||||||
|
"//third_party/android_support_test_runner:runner_java",
|
||||||
|
"//third_party/android_tools:android_test_base_java",
|
||||||
|
"//third_party/espresso:espresso_all_java",
|
||||||
|
"//third_party/hamcrest:hamcrest_java",
|
||||||
|
"//third_party/junit",
|
||||||
|
"//third_party/ub-uiautomator:ub_uiautomator_java",
|
||||||
|
]
|
||||||
|
data = [
|
||||||
|
"test/data/",
|
||||||
|
]
|
||||||
|
}
|
91
src/android_webview/tools/system_webview_shell/BUILD.gn
Normal file
91
src/android_webview/tools/system_webview_shell/BUILD.gn
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
import("//testing/test.gni")
|
||||||
|
|
||||||
|
# Mark all targets as test only.
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
group("system_webview_shell") {
|
||||||
|
deps = [
|
||||||
|
":system_webview_shell_apk",
|
||||||
|
":system_webview_shell_layout_test_apk",
|
||||||
|
":system_webview_shell_page_cycler_apk",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_apk("system_webview_shell_apk") {
|
||||||
|
apk_name = "SystemWebViewShell"
|
||||||
|
java_files = [
|
||||||
|
"apk/src/org/chromium/webview_shell/JankActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/PageCyclerTestActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/StartupTimeActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/TelemetryActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/TelemetryMemoryPressureActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/WebViewAnimationTestActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/WebViewCreateDestroyActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/WebViewLayoutTestActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/WebViewThreadTestActivity.java",
|
||||||
|
"apk/src/org/chromium/webview_shell/WebViewTracingActivity.java",
|
||||||
|
]
|
||||||
|
android_manifest = "apk/AndroidManifest.xml"
|
||||||
|
deps = [
|
||||||
|
":system_webview_shell_apk_resources",
|
||||||
|
"//base:base_java",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
android_resources("system_webview_shell_apk_resources") {
|
||||||
|
resource_dirs = [ "apk/res" ]
|
||||||
|
custom_package = "org.chromium.webview_shell"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumentation_test_apk("system_webview_shell_page_cycler_apk") {
|
||||||
|
apk_name = "SystemWebViewShellPageCycler"
|
||||||
|
apk_under_test = ":system_webview_shell_apk"
|
||||||
|
android_manifest = "page_cycler/AndroidManifest.xml"
|
||||||
|
java_files = [ "page_cycler/src/org/chromium/webview_shell/page_cycler/PageCyclerTest.java" ]
|
||||||
|
deps = [
|
||||||
|
"//base:base_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//content/public/android:content_java",
|
||||||
|
"//content/public/test/android:content_java_test_support",
|
||||||
|
"//testing/android/reporter:reporter_java",
|
||||||
|
"//third_party/android_support_test_runner:rules_java",
|
||||||
|
"//third_party/android_support_test_runner:runner_java",
|
||||||
|
"//third_party/junit",
|
||||||
|
]
|
||||||
|
enable_multidex = true
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumentation_test_apk("system_webview_shell_layout_test_apk") {
|
||||||
|
apk_name = "SystemWebViewShellLayoutTest"
|
||||||
|
apk_under_test = ":system_webview_shell_apk"
|
||||||
|
android_manifest = "layout_tests/AndroidManifest.xml"
|
||||||
|
java_files = [
|
||||||
|
"layout_tests/src/org/chromium/webview_shell/test/WebViewLayoutTest.java",
|
||||||
|
"layout_tests/src/org/chromium/webview_shell/test/WebViewThreadTest.java",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//base:base_java",
|
||||||
|
"//base:base_java_test_support",
|
||||||
|
"//testing/android/reporter:reporter_java",
|
||||||
|
"//third_party/android_support_test_runner:rules_java",
|
||||||
|
"//third_party/android_support_test_runner:runner_java",
|
||||||
|
"//third_party/junit",
|
||||||
|
]
|
||||||
|
data = [
|
||||||
|
"test/data/",
|
||||||
|
"//third_party/blink/web_tests/platform/linux/virtual/stable/webexposed/",
|
||||||
|
"//third_party/blink/web_tests/platform/mac/virtual/stable/webexposed/",
|
||||||
|
"//third_party/blink/web_tests/platform/win/virtual/stable/webexposed/",
|
||||||
|
"//third_party/blink/web_tests/resources/global-interface-listing.js",
|
||||||
|
"//third_party/blink/web_tests/virtual/stable/webexposed/",
|
||||||
|
"//third_party/blink/web_tests/webexposed/global-interface-listing.html",
|
||||||
|
"//third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt",
|
||||||
|
]
|
||||||
|
additional_apks = [ system_webview_apk_target ]
|
||||||
|
}
|
10
src/android_webview/tools/webview_log_verbosifier/BUILD.gn
Normal file
10
src/android_webview/tools/webview_log_verbosifier/BUILD.gn
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/android/rules.gni")
|
||||||
|
|
||||||
|
android_apk("webview_log_verbosifier_apk") {
|
||||||
|
apk_name = "WebViewLogVerbosifier"
|
||||||
|
android_manifest = "AndroidManifest.xml"
|
||||||
|
}
|
13
src/android_webview/variables.gni
Normal file
13
src/android_webview/variables.gni
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
system_webview_android_manifest =
|
||||||
|
"$root_gen_dir/android_webview/system_webview_apk/AndroidManifest.xml"
|
||||||
|
trichrome_webview_android_manifest =
|
||||||
|
"$root_gen_dir/android_webview/trichrome_webview_apk/AndroidManifest.xml"
|
||||||
|
|
||||||
|
upstream_only_webview_deps = [
|
||||||
|
"//android_webview:platform_service_bridge_upstream_implementation_java",
|
||||||
|
"//android_webview:system_webview_resources",
|
||||||
|
]
|
35
src/android_webview/webview_repack_locales.gni
Normal file
35
src/android_webview/webview_repack_locales.gni
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//tools/grit/repack.gni")
|
||||||
|
import("webview_repack_locales_list.gni")
|
||||||
|
|
||||||
|
# Wraps repack_locales(), setting the source_patterns and deps required for
|
||||||
|
# Chrome.
|
||||||
|
template("webview_repack_locales") {
|
||||||
|
repack_locales(target_name) {
|
||||||
|
forward_variables_from(invoker, "*")
|
||||||
|
if (!defined(deps)) {
|
||||||
|
deps = []
|
||||||
|
}
|
||||||
|
|
||||||
|
# Adding webview specific pak file? You should add it to
|
||||||
|
# webview_repack_locales_source_patterns, so it is also included in
|
||||||
|
# Monochrome.
|
||||||
|
|
||||||
|
source_patterns = [
|
||||||
|
"${root_gen_dir}/android_webview/components_strings_",
|
||||||
|
"${root_gen_dir}/content/app/strings/content_strings_",
|
||||||
|
"${root_gen_dir}/ui/strings/app_locale_settings_",
|
||||||
|
]
|
||||||
|
deps += [
|
||||||
|
"//android_webview:generate_components_strings",
|
||||||
|
"//content/app/strings",
|
||||||
|
"//ui/strings:app_locale_settings",
|
||||||
|
]
|
||||||
|
source_patterns += webview_repack_locales_source_patterns
|
||||||
|
deps += webview_repack_locales_deps
|
||||||
|
output_dir = "$root_out_dir/android_webview/locales"
|
||||||
|
}
|
||||||
|
}
|
10
src/android_webview/webview_repack_locales_list.gni
Normal file
10
src/android_webview/webview_repack_locales_list.gni
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Copyright 2016 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.
|
||||||
|
|
||||||
|
# For how to add pattern, see additional_source_patterns argument of
|
||||||
|
# _repack_one_locale in chrome/chrome_repack_locales.gni.
|
||||||
|
webview_repack_locales_source_patterns =
|
||||||
|
[ "${root_gen_dir}/android_webview/aw_strings_" ]
|
||||||
|
|
||||||
|
webview_repack_locales_deps = [ "//android_webview:generate_aw_strings" ]
|
64
src/apps/BUILD.gn
Normal file
64
src/apps/BUILD.gn
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
import("//build/config/features.gni")
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
import("//extensions/buildflags/buildflags.gni")
|
||||||
|
|
||||||
|
assert(!is_android && !is_ios)
|
||||||
|
assert(enable_extensions,
|
||||||
|
"Cannot depend on extensions because enable_extensions=false.")
|
||||||
|
|
||||||
|
static_library("apps") {
|
||||||
|
sources = []
|
||||||
|
|
||||||
|
sources += [
|
||||||
|
"app_lifetime_monitor.cc",
|
||||||
|
"app_lifetime_monitor.h",
|
||||||
|
"app_lifetime_monitor_factory.cc",
|
||||||
|
"app_lifetime_monitor_factory.h",
|
||||||
|
"app_restore_service.cc",
|
||||||
|
"app_restore_service.h",
|
||||||
|
"app_restore_service_factory.cc",
|
||||||
|
"app_restore_service_factory.h",
|
||||||
|
"browser_context_keyed_service_factories.cc",
|
||||||
|
"browser_context_keyed_service_factories.h",
|
||||||
|
"launcher.cc",
|
||||||
|
"launcher.h",
|
||||||
|
"saved_files_service.cc",
|
||||||
|
"saved_files_service.h",
|
||||||
|
"saved_files_service_factory.cc",
|
||||||
|
"saved_files_service_factory.h",
|
||||||
|
"switches.cc",
|
||||||
|
"switches.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//components/keyed_service/content",
|
||||||
|
"//content/public/browser",
|
||||||
|
"//content/public/common",
|
||||||
|
"//extensions/browser",
|
||||||
|
"//extensions/common",
|
||||||
|
"//extensions/common/api",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (is_chromeos) {
|
||||||
|
deps += [ "//components/user_manager" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static_library("test_support") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"test/app_window_waiter.cc",
|
||||||
|
"test/app_window_waiter.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//content/public/browser",
|
||||||
|
"//extensions/browser",
|
||||||
|
]
|
||||||
|
}
|
26
src/apps/ui/views/BUILD.gn
Normal file
26
src/apps/ui/views/BUILD.gn
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright 2017 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.
|
||||||
|
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
import("//extensions/buildflags/buildflags.gni")
|
||||||
|
|
||||||
|
assert(enable_extensions)
|
||||||
|
|
||||||
|
source_set("views") {
|
||||||
|
sources = [
|
||||||
|
"app_window_frame_view.cc",
|
||||||
|
"app_window_frame_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//cc/paint",
|
||||||
|
"//chrome/app/theme:theme_resources",
|
||||||
|
"//extensions/browser",
|
||||||
|
"//extensions/common",
|
||||||
|
"//skia",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/strings",
|
||||||
|
"//ui/views",
|
||||||
|
]
|
||||||
|
}
|
2283
src/ash/BUILD.gn
Normal file
2283
src/ash/BUILD.gn
Normal file
File diff suppressed because it is too large
Load Diff
257
src/ash/app_list/BUILD.gn
Normal file
257
src/ash/app_list/BUILD.gn
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
import("//testing/test.gni")
|
||||||
|
|
||||||
|
assert(is_chromeos)
|
||||||
|
|
||||||
|
component("app_list") {
|
||||||
|
sources = [
|
||||||
|
"app_list_export.h",
|
||||||
|
"app_list_metrics.cc",
|
||||||
|
"app_list_metrics.h",
|
||||||
|
"app_list_util.cc",
|
||||||
|
"app_list_util.h",
|
||||||
|
"app_list_view_delegate.h",
|
||||||
|
"paged_view_structure.cc",
|
||||||
|
"paged_view_structure.h",
|
||||||
|
"pagination_controller.cc",
|
||||||
|
"pagination_controller.h",
|
||||||
|
"pagination_model.cc",
|
||||||
|
"pagination_model.h",
|
||||||
|
"pagination_model_observer.h",
|
||||||
|
"views/app_list_drag_and_drop_host.h",
|
||||||
|
"views/app_list_folder_view.cc",
|
||||||
|
"views/app_list_folder_view.h",
|
||||||
|
"views/app_list_item_view.cc",
|
||||||
|
"views/app_list_item_view.h",
|
||||||
|
"views/app_list_main_view.cc",
|
||||||
|
"views/app_list_main_view.h",
|
||||||
|
"views/app_list_menu_model_adapter.cc",
|
||||||
|
"views/app_list_menu_model_adapter.h",
|
||||||
|
"views/app_list_page.cc",
|
||||||
|
"views/app_list_page.h",
|
||||||
|
"views/app_list_view.cc",
|
||||||
|
"views/app_list_view.h",
|
||||||
|
"views/apps_container_view.cc",
|
||||||
|
"views/apps_container_view.h",
|
||||||
|
"views/apps_grid_view.cc",
|
||||||
|
"views/apps_grid_view.h",
|
||||||
|
"views/apps_grid_view_folder_delegate.h",
|
||||||
|
"views/assistant/assistant_main_stage.cc",
|
||||||
|
"views/assistant/assistant_main_stage.h",
|
||||||
|
"views/assistant/assistant_main_view.cc",
|
||||||
|
"views/assistant/assistant_main_view.h",
|
||||||
|
"views/assistant/assistant_page_view.cc",
|
||||||
|
"views/assistant/assistant_page_view.h",
|
||||||
|
"views/assistant/dialog_plate.cc",
|
||||||
|
"views/assistant/dialog_plate.h",
|
||||||
|
"views/contents_view.cc",
|
||||||
|
"views/contents_view.h",
|
||||||
|
"views/expand_arrow_view.cc",
|
||||||
|
"views/expand_arrow_view.h",
|
||||||
|
"views/folder_background_view.cc",
|
||||||
|
"views/folder_background_view.h",
|
||||||
|
"views/folder_header_view.cc",
|
||||||
|
"views/folder_header_view.h",
|
||||||
|
"views/folder_header_view_delegate.h",
|
||||||
|
"views/ghost_image_view.cc",
|
||||||
|
"views/ghost_image_view.h",
|
||||||
|
"views/horizontal_page.cc",
|
||||||
|
"views/horizontal_page.h",
|
||||||
|
"views/horizontal_page_container.cc",
|
||||||
|
"views/horizontal_page_container.h",
|
||||||
|
"views/page_switcher.cc",
|
||||||
|
"views/page_switcher.h",
|
||||||
|
"views/pulsing_block_view.cc",
|
||||||
|
"views/pulsing_block_view.h",
|
||||||
|
"views/remove_query_confirmation_dialog.cc",
|
||||||
|
"views/remove_query_confirmation_dialog.h",
|
||||||
|
"views/search_box_view.cc",
|
||||||
|
"views/search_box_view.h",
|
||||||
|
"views/search_result_actions_view.cc",
|
||||||
|
"views/search_result_actions_view.h",
|
||||||
|
"views/search_result_actions_view_delegate.h",
|
||||||
|
"views/search_result_answer_card_view.cc",
|
||||||
|
"views/search_result_answer_card_view.h",
|
||||||
|
"views/search_result_base_view.cc",
|
||||||
|
"views/search_result_base_view.h",
|
||||||
|
"views/search_result_container_view.cc",
|
||||||
|
"views/search_result_container_view.h",
|
||||||
|
"views/search_result_list_view.cc",
|
||||||
|
"views/search_result_list_view.h",
|
||||||
|
"views/search_result_page_view.cc",
|
||||||
|
"views/search_result_page_view.h",
|
||||||
|
"views/search_result_suggestion_chip_view.cc",
|
||||||
|
"views/search_result_suggestion_chip_view.h",
|
||||||
|
"views/search_result_tile_item_list_view.cc",
|
||||||
|
"views/search_result_tile_item_list_view.h",
|
||||||
|
"views/search_result_tile_item_view.cc",
|
||||||
|
"views/search_result_tile_item_view.h",
|
||||||
|
"views/search_result_view.cc",
|
||||||
|
"views/search_result_view.h",
|
||||||
|
"views/suggestion_chip_container_view.cc",
|
||||||
|
"views/suggestion_chip_container_view.h",
|
||||||
|
"views/suggestion_chip_view.cc",
|
||||||
|
"views/suggestion_chip_view.h",
|
||||||
|
"views/top_icon_animation_view.cc",
|
||||||
|
"views/top_icon_animation_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "APP_LIST_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/app_list/resources",
|
||||||
|
"//ash/app_menu",
|
||||||
|
"//ash/assistant/model",
|
||||||
|
"//ash/assistant/ui",
|
||||||
|
"//ash/assistant/ui:constants",
|
||||||
|
"//ash/assistant/util",
|
||||||
|
"//ash/public/cpp/app_list/vector_icons",
|
||||||
|
"//ash/public/cpp/vector_icons",
|
||||||
|
"//ash/resources/vector_icons",
|
||||||
|
"//ash/strings",
|
||||||
|
"//base",
|
||||||
|
"//base:i18n",
|
||||||
|
"//base/third_party/dynamic_annotations",
|
||||||
|
"//cc/paint",
|
||||||
|
"//chromeos:chromeos",
|
||||||
|
"//components/keyed_service/core",
|
||||||
|
"//components/sync",
|
||||||
|
"//mojo/public/cpp/bindings",
|
||||||
|
"//services/content/public/cpp",
|
||||||
|
"//services/ws/public/cpp",
|
||||||
|
"//services/ws/public/mojom",
|
||||||
|
"//services/ws/remote_view_host",
|
||||||
|
"//skia",
|
||||||
|
"//third_party/icu",
|
||||||
|
"//ui/accessibility",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/base/ime",
|
||||||
|
"//ui/chromeos/search_box",
|
||||||
|
"//ui/compositor",
|
||||||
|
"//ui/display",
|
||||||
|
"//ui/events",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
"//ui/keyboard/",
|
||||||
|
"//ui/resources",
|
||||||
|
"//ui/strings",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views/mus/remote_view:remote_view_host",
|
||||||
|
"//ui/wm",
|
||||||
|
]
|
||||||
|
|
||||||
|
# TODO(hejq): Remove this once app_list is migrated. http://crbug.com/733662
|
||||||
|
public_deps = [
|
||||||
|
"//ash/app_list/model:app_list_model",
|
||||||
|
"//ash/app_list/model:search_model",
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//services/content/public/mojom",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
static_library("test_support") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"test/app_list_test_model.cc",
|
||||||
|
"test/app_list_test_model.h",
|
||||||
|
"test/app_list_test_view_delegate.cc",
|
||||||
|
"test/app_list_test_view_delegate.h",
|
||||||
|
"test/test_search_result.cc",
|
||||||
|
"test/test_search_result.h",
|
||||||
|
"views/test/apps_grid_view_test_api.cc",
|
||||||
|
"views/test/apps_grid_view_test_api.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":app_list",
|
||||||
|
"//base",
|
||||||
|
"//services/content/public/cpp/test:test_support",
|
||||||
|
"//ui/base:base",
|
||||||
|
"//ui/events",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
executable("app_list_demo") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"demo/app_list_demo_views.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":app_list",
|
||||||
|
":test_support",
|
||||||
|
"//base",
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
"//content",
|
||||||
|
"//content/public/browser",
|
||||||
|
"//skia",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/events",
|
||||||
|
"//ui/resources",
|
||||||
|
"//ui/resources:ui_test_pak",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views_content_client",
|
||||||
|
"//url",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("app_list_unittests") {
|
||||||
|
sources = [
|
||||||
|
"folder_image_unittest.cc",
|
||||||
|
"pagination_model_unittest.cc",
|
||||||
|
"test/run_all_unittests.cc",
|
||||||
|
"views/app_list_main_view_unittest.cc",
|
||||||
|
"views/app_list_menu_model_adapter_unittest.cc",
|
||||||
|
"views/app_list_view_unittest.cc",
|
||||||
|
"views/apps_grid_view_unittest.cc",
|
||||||
|
"views/folder_header_view_unittest.cc",
|
||||||
|
"views/search_box_view_unittest.cc",
|
||||||
|
"views/search_result_answer_card_view_unittest.cc",
|
||||||
|
"views/search_result_list_view_unittest.cc",
|
||||||
|
"views/search_result_page_view_unittest.cc",
|
||||||
|
"views/search_result_tile_item_list_view_unittest.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":app_list",
|
||||||
|
":test_support",
|
||||||
|
"//ash/public/cpp/app_list/vector_icons",
|
||||||
|
"//base",
|
||||||
|
"//base/test:test_support",
|
||||||
|
"//chromeos/constants",
|
||||||
|
"//mojo/core/embedder",
|
||||||
|
"//mojo/public/cpp/bindings",
|
||||||
|
"//services/content/public/cpp",
|
||||||
|
"//services/content/public/cpp/test:test_support",
|
||||||
|
"//services/content/public/mojom",
|
||||||
|
"//skia",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//ui/accessibility",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/chromeos/search_box",
|
||||||
|
"//ui/compositor",
|
||||||
|
"//ui/events:test_support",
|
||||||
|
"//ui/gfx:test_support",
|
||||||
|
"//ui/gl:test_support",
|
||||||
|
"//ui/keyboard",
|
||||||
|
"//ui/resources",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views:test_support",
|
||||||
|
]
|
||||||
|
|
||||||
|
data_deps = [
|
||||||
|
"//third_party/mesa_headers",
|
||||||
|
"//ui/resources:ui_test_pak_data",
|
||||||
|
]
|
||||||
|
}
|
57
src/ash/app_list/model/BUILD.gn
Normal file
57
src/ash/app_list/model/BUILD.gn
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Copyright 2017 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.
|
||||||
|
|
||||||
|
component("app_list_model") {
|
||||||
|
sources = [
|
||||||
|
"app_list_folder_item.cc",
|
||||||
|
"app_list_folder_item.h",
|
||||||
|
"app_list_item.cc",
|
||||||
|
"app_list_item.h",
|
||||||
|
"app_list_item_list.cc",
|
||||||
|
"app_list_item_list.h",
|
||||||
|
"app_list_item_list_observer.h",
|
||||||
|
"app_list_item_observer.h",
|
||||||
|
"app_list_model.cc",
|
||||||
|
"app_list_model.h",
|
||||||
|
"app_list_model_observer.h",
|
||||||
|
"app_list_view_state.h",
|
||||||
|
"folder_image.cc",
|
||||||
|
"folder_image.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "APP_LIST_MODEL_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/public/cpp:cpp",
|
||||||
|
"//base:i18n",
|
||||||
|
"//cc/paint",
|
||||||
|
"//components/sync",
|
||||||
|
"//skia",
|
||||||
|
"//third_party/icu",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/gfx",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
component("search_model") {
|
||||||
|
sources = [
|
||||||
|
"search/search_box_model.cc",
|
||||||
|
"search/search_box_model.h",
|
||||||
|
"search/search_box_model_observer.h",
|
||||||
|
"search/search_model.cc",
|
||||||
|
"search/search_model.h",
|
||||||
|
"search/search_result.cc",
|
||||||
|
"search/search_result.h",
|
||||||
|
"search/search_result_observer.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "APP_LIST_MODEL_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/public/cpp:cpp",
|
||||||
|
"//base:i18n",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/gfx",
|
||||||
|
]
|
||||||
|
}
|
34
src/ash/app_list/presenter/BUILD.gn
Normal file
34
src/ash/app_list/presenter/BUILD.gn
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Copyright 2016 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.
|
||||||
|
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
import("//testing/test.gni")
|
||||||
|
|
||||||
|
assert(use_aura)
|
||||||
|
|
||||||
|
component("presenter") {
|
||||||
|
sources = [
|
||||||
|
"app_list_presenter_delegate.cc",
|
||||||
|
"app_list_presenter_delegate.h",
|
||||||
|
"app_list_presenter_export.h",
|
||||||
|
"app_list_presenter_impl.cc",
|
||||||
|
"app_list_presenter_impl.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "APP_LIST_PRESENTER_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//ash/app_list",
|
||||||
|
"//base",
|
||||||
|
"//mojo/public/cpp/bindings",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/compositor",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
"//ui/views",
|
||||||
|
|
||||||
|
# Temporary dependency to fix compile flake in http://crbug.com/611898.
|
||||||
|
# TODO(tapted): Remove once http://crbug.com/612382 is fixed.
|
||||||
|
"//ui/accessibility:ax_enums_mojo",
|
||||||
|
]
|
||||||
|
}
|
22
src/ash/app_list/resources/BUILD.gn
Normal file
22
src/ash/app_list/resources/BUILD.gn
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//tools/grit/grit_rule.gni")
|
||||||
|
import("//tools/grit/repack.gni")
|
||||||
|
|
||||||
|
group("resources") {
|
||||||
|
public_deps = [
|
||||||
|
":resources_grd",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
grit("resources_grd") {
|
||||||
|
source = "app_list_resources.grd"
|
||||||
|
outputs = [
|
||||||
|
"grit/app_list_resources.h",
|
||||||
|
"app_list_resources_100_percent.pak",
|
||||||
|
"app_list_resources_200_percent.pak",
|
||||||
|
"app_list_resources_300_percent.pak",
|
||||||
|
]
|
||||||
|
}
|
36
src/ash/app_menu/BUILD.gn
Normal file
36
src/ash/app_menu/BUILD.gn
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
|
||||||
|
assert(is_chromeos)
|
||||||
|
|
||||||
|
component("app_menu") {
|
||||||
|
sources = [
|
||||||
|
"app_menu_model_adapter.cc",
|
||||||
|
"app_menu_model_adapter.h",
|
||||||
|
"notification_item_view.cc",
|
||||||
|
"notification_item_view.h",
|
||||||
|
"notification_menu_controller.cc",
|
||||||
|
"notification_menu_controller.h",
|
||||||
|
"notification_menu_header_view.cc",
|
||||||
|
"notification_menu_header_view.h",
|
||||||
|
"notification_menu_view.cc",
|
||||||
|
"notification_menu_view.h",
|
||||||
|
"notification_overflow_view.cc",
|
||||||
|
"notification_overflow_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "APP_MENU_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//base",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
"//ui/message_center",
|
||||||
|
"//ui/strings:ui_strings_grit",
|
||||||
|
"//ui/views",
|
||||||
|
]
|
||||||
|
}
|
48
src/ash/assistant/model/BUILD.gn
Normal file
48
src/ash/assistant/model/BUILD.gn
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
assert(is_chromeos)
|
||||||
|
|
||||||
|
component("model") {
|
||||||
|
output_name = "assistant_model"
|
||||||
|
|
||||||
|
defines = [ "IS_ASSISTANT_MODEL_IMPL" ]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"assistant_alarm_timer_model.cc",
|
||||||
|
"assistant_alarm_timer_model.h",
|
||||||
|
"assistant_alarm_timer_model_observer.h",
|
||||||
|
"assistant_cache_model.cc",
|
||||||
|
"assistant_cache_model.h",
|
||||||
|
"assistant_cache_model_observer.h",
|
||||||
|
"assistant_interaction_model.cc",
|
||||||
|
"assistant_interaction_model.h",
|
||||||
|
"assistant_interaction_model_observer.h",
|
||||||
|
"assistant_notification_model.cc",
|
||||||
|
"assistant_notification_model.h",
|
||||||
|
"assistant_notification_model_observer.h",
|
||||||
|
"assistant_query.cc",
|
||||||
|
"assistant_query.h",
|
||||||
|
"assistant_query_history.cc",
|
||||||
|
"assistant_query_history.h",
|
||||||
|
"assistant_response.cc",
|
||||||
|
"assistant_response.h",
|
||||||
|
"assistant_screen_context_model.cc",
|
||||||
|
"assistant_screen_context_model.h",
|
||||||
|
"assistant_screen_context_model_observer.h",
|
||||||
|
"assistant_ui_element.cc",
|
||||||
|
"assistant_ui_element.h",
|
||||||
|
"assistant_ui_model.cc",
|
||||||
|
"assistant_ui_model.h",
|
||||||
|
"assistant_ui_model_observer.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/assistant/ui:constants",
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//chromeos/services/assistant/public/mojom",
|
||||||
|
"//services/content/public/cpp",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
]
|
||||||
|
}
|
124
src/ash/assistant/ui/BUILD.gn
Normal file
124
src/ash/assistant/ui/BUILD.gn
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
import("//chromeos/assistant/assistant.gni")
|
||||||
|
|
||||||
|
assert(is_chromeos)
|
||||||
|
|
||||||
|
component("constants") {
|
||||||
|
output_name = "assistant_ui_constants"
|
||||||
|
|
||||||
|
defines = [ "IS_ASSISTANT_UI_CONSTANTS_IMPL" ]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"assistant_ui_constants.cc",
|
||||||
|
"assistant_ui_constants.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//base",
|
||||||
|
"//skia",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/gfx",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
component("ui") {
|
||||||
|
output_name = "assistant_ui"
|
||||||
|
|
||||||
|
defines = [ "IS_ASSISTANT_UI_IMPL" ]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"assistant_container_view.cc",
|
||||||
|
"assistant_container_view.h",
|
||||||
|
"assistant_container_view_animator.cc",
|
||||||
|
"assistant_container_view_animator.h",
|
||||||
|
"assistant_container_view_animator_legacy_impl.cc",
|
||||||
|
"assistant_container_view_animator_legacy_impl.h",
|
||||||
|
"assistant_container_view_focus_traversable.cc",
|
||||||
|
"assistant_container_view_focus_traversable.h",
|
||||||
|
"assistant_main_view.cc",
|
||||||
|
"assistant_main_view.h",
|
||||||
|
"assistant_mini_view.cc",
|
||||||
|
"assistant_mini_view.h",
|
||||||
|
"assistant_notification_overlay.cc",
|
||||||
|
"assistant_notification_overlay.h",
|
||||||
|
"assistant_notification_view.cc",
|
||||||
|
"assistant_notification_view.h",
|
||||||
|
"assistant_overlay.h",
|
||||||
|
"assistant_view_delegate.h",
|
||||||
|
"assistant_web_view.cc",
|
||||||
|
"assistant_web_view.h",
|
||||||
|
"base/assistant_button.cc",
|
||||||
|
"base/assistant_button.h",
|
||||||
|
"base/assistant_scroll_view.cc",
|
||||||
|
"base/assistant_scroll_view.h",
|
||||||
|
"caption_bar.cc",
|
||||||
|
"caption_bar.h",
|
||||||
|
"dialog_plate/action_view.cc",
|
||||||
|
"dialog_plate/action_view.h",
|
||||||
|
"dialog_plate/dialog_plate.cc",
|
||||||
|
"dialog_plate/dialog_plate.h",
|
||||||
|
"logo_view/base_logo_view.cc",
|
||||||
|
"logo_view/base_logo_view.h",
|
||||||
|
"main_stage/assistant_card_element_view.cc",
|
||||||
|
"main_stage/assistant_card_element_view.h",
|
||||||
|
"main_stage/assistant_footer_view.cc",
|
||||||
|
"main_stage/assistant_footer_view.h",
|
||||||
|
"main_stage/assistant_header_view.cc",
|
||||||
|
"main_stage/assistant_header_view.h",
|
||||||
|
"main_stage/assistant_main_stage.cc",
|
||||||
|
"main_stage/assistant_main_stage.h",
|
||||||
|
"main_stage/assistant_opt_in_view.cc",
|
||||||
|
"main_stage/assistant_opt_in_view.h",
|
||||||
|
"main_stage/assistant_progress_indicator.cc",
|
||||||
|
"main_stage/assistant_progress_indicator.h",
|
||||||
|
"main_stage/assistant_query_view.cc",
|
||||||
|
"main_stage/assistant_query_view.h",
|
||||||
|
"main_stage/assistant_text_element_view.cc",
|
||||||
|
"main_stage/assistant_text_element_view.h",
|
||||||
|
"main_stage/suggestion_chip_view.cc",
|
||||||
|
"main_stage/suggestion_chip_view.h",
|
||||||
|
"main_stage/suggestion_container_view.cc",
|
||||||
|
"main_stage/suggestion_container_view.h",
|
||||||
|
"main_stage/ui_element_container_view.cc",
|
||||||
|
"main_stage/ui_element_container_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/assistant/model",
|
||||||
|
"//ash/assistant/ui:constants",
|
||||||
|
"//ash/assistant/util",
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//ash/public/cpp/vector_icons",
|
||||||
|
"//ash/resources/vector_icons",
|
||||||
|
"//ash/strings",
|
||||||
|
"//base",
|
||||||
|
"//chromeos/assistant:buildflags",
|
||||||
|
"//chromeos/services/assistant/public:feature_flags",
|
||||||
|
"//chromeos/services/assistant/public/mojom",
|
||||||
|
"//services/content/public/cpp",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/compositor",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views/window/vector_icons",
|
||||||
|
"//ui/wm",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (enable_cros_libassistant) {
|
||||||
|
sources += [
|
||||||
|
"logo_view/logo_view.cc",
|
||||||
|
"logo_view/logo_view.h",
|
||||||
|
"logo_view/shape/mic_part_shape.cc",
|
||||||
|
"logo_view/shape/mic_part_shape.h",
|
||||||
|
"logo_view/shape/shape.cc",
|
||||||
|
"logo_view/shape/shape.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps += [ "//chromeos/assistant/internal/logo_view" ]
|
||||||
|
}
|
||||||
|
}
|
35
src/ash/assistant/util/BUILD.gn
Normal file
35
src/ash/assistant/util/BUILD.gn
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Copyright 2019 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.
|
||||||
|
|
||||||
|
assert(is_chromeos)
|
||||||
|
|
||||||
|
component("util") {
|
||||||
|
output_name = "assistant_util"
|
||||||
|
|
||||||
|
defines = [ "IS_ASSISTANT_UTIL_IMPL" ]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"animation_util.cc",
|
||||||
|
"animation_util.h",
|
||||||
|
"assistant_util.cc",
|
||||||
|
"assistant_util.h",
|
||||||
|
"deep_link_util.cc",
|
||||||
|
"deep_link_util.h",
|
||||||
|
"histogram_util.cc",
|
||||||
|
"histogram_util.h",
|
||||||
|
"i18n_util.cc",
|
||||||
|
"i18n_util.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/assistant/model",
|
||||||
|
"//base",
|
||||||
|
"//base:i18n",
|
||||||
|
"//net",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/views",
|
||||||
|
"//url",
|
||||||
|
]
|
||||||
|
}
|
23
src/ash/components/cursor/BUILD.gn
Normal file
23
src/ash/components/cursor/BUILD.gn
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
source_set("cursor") {
|
||||||
|
sources = [
|
||||||
|
"cursor_view.cc",
|
||||||
|
"cursor_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/components/fast_ink",
|
||||||
|
"//base",
|
||||||
|
"//cc",
|
||||||
|
"//components/viz/common",
|
||||||
|
"//skia",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/events",
|
||||||
|
"//ui/events/ozone:events_ozone",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/views:views",
|
||||||
|
]
|
||||||
|
}
|
42
src/ash/components/fast_ink/BUILD.gn
Normal file
42
src/ash/components/fast_ink/BUILD.gn
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
source_set("fast_ink") {
|
||||||
|
sources = [
|
||||||
|
"fast_ink_pointer_controller.cc",
|
||||||
|
"fast_ink_pointer_controller.h",
|
||||||
|
"fast_ink_points.cc",
|
||||||
|
"fast_ink_points.h",
|
||||||
|
"fast_ink_view.cc",
|
||||||
|
"fast_ink_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//base",
|
||||||
|
"//cc",
|
||||||
|
"//components/viz/service",
|
||||||
|
"//gpu",
|
||||||
|
"//gpu/command_buffer/client:gles2_interface",
|
||||||
|
"//services/ws/public/mojom",
|
||||||
|
"//skia",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
"//ui/gl",
|
||||||
|
"//ui/views:views",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("unit_tests") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"fast_ink_points_unittest.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":fast_ink",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//ui/events:test_support",
|
||||||
|
]
|
||||||
|
}
|
16
src/ash/components/resources/BUILD.gn
Normal file
16
src/ash/components/resources/BUILD.gn
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//tools/grit/grit_rule.gni")
|
||||||
|
|
||||||
|
grit("resources") {
|
||||||
|
source = "ash_components_resources.grd"
|
||||||
|
outputs = [
|
||||||
|
"grit/ash_components_resources.h",
|
||||||
|
"grit/ash_components_resources_map.cc",
|
||||||
|
"grit/ash_components_resources_map.h",
|
||||||
|
"ash_components_resources_100_percent.pak",
|
||||||
|
"ash_components_resources_200_percent.pak",
|
||||||
|
]
|
||||||
|
}
|
67
src/ash/components/shortcut_viewer/BUILD.gn
Normal file
67
src/ash/components/shortcut_viewer/BUILD.gn
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
# KSV: Keyboard Shortcut Viewer
|
||||||
|
source_set("lib") {
|
||||||
|
sources = [
|
||||||
|
"keyboard_shortcut_item.cc",
|
||||||
|
"keyboard_shortcut_item.h",
|
||||||
|
"keyboard_shortcut_viewer_metadata.cc",
|
||||||
|
"keyboard_shortcut_viewer_metadata.h",
|
||||||
|
"ksv_export.h",
|
||||||
|
"last_window_closed_observer.cc",
|
||||||
|
"last_window_closed_observer.h",
|
||||||
|
"shortcut_viewer_application.cc",
|
||||||
|
"shortcut_viewer_application.h",
|
||||||
|
"views/bubble_view.cc",
|
||||||
|
"views/bubble_view.h",
|
||||||
|
"views/keyboard_shortcut_item_list_view.cc",
|
||||||
|
"views/keyboard_shortcut_item_list_view.h",
|
||||||
|
"views/keyboard_shortcut_item_view.cc",
|
||||||
|
"views/keyboard_shortcut_item_view.h",
|
||||||
|
"views/keyboard_shortcut_view.cc",
|
||||||
|
"views/keyboard_shortcut_view.h",
|
||||||
|
"views/ksv_search_box_view.cc",
|
||||||
|
"views/ksv_search_box_view.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "KSV_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/components/shortcut_viewer/public/mojom",
|
||||||
|
"//ash/components/shortcut_viewer/vector_icons",
|
||||||
|
"//ash/components/strings",
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//ash/public/cpp/resources:ash_public_unscaled_resources",
|
||||||
|
"//cc/paint",
|
||||||
|
"//services/service_manager/public/cpp/",
|
||||||
|
"//ui/accessibility",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/chromeos/events",
|
||||||
|
"//ui/chromeos/search_box",
|
||||||
|
"//ui/events:events_base",
|
||||||
|
"//ui/events/devices",
|
||||||
|
"//ui/events/ozone:events_ozone_layout",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views/mus",
|
||||||
|
"//ui/views/mus:resources",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("unit_tests") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"views/keyboard_shortcut_view_unittest.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":lib",
|
||||||
|
"//ash:test_support",
|
||||||
|
"//base/test:test_support",
|
||||||
|
"//services/ws/public/cpp/input_devices:test_support",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//ui/compositor:test_support",
|
||||||
|
"//ui/events:test_support",
|
||||||
|
"//ui/views",
|
||||||
|
]
|
||||||
|
}
|
18
src/ash/components/shortcut_viewer/public/cpp/BUILD.gn
Normal file
18
src/ash/components/shortcut_viewer/public/cpp/BUILD.gn
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2019 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.
|
||||||
|
|
||||||
|
source_set("manifest") {
|
||||||
|
sources = [
|
||||||
|
"manifest.cc",
|
||||||
|
"manifest.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/components/shortcut_viewer/public/mojom",
|
||||||
|
"//base",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/ws/public/mojom:constants",
|
||||||
|
"//ui/accessibility/mojom",
|
||||||
|
]
|
||||||
|
}
|
15
src/ash/components/shortcut_viewer/public/mojom/BUILD.gn
Normal file
15
src/ash/components/shortcut_viewer/public/mojom/BUILD.gn
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//mojo/public/tools/bindings/mojom.gni")
|
||||||
|
|
||||||
|
mojom("mojom") {
|
||||||
|
sources = [
|
||||||
|
"shortcut_viewer.mojom",
|
||||||
|
]
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//mojo/public/mojom/base",
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module shortcut_viewer.mojom;
|
||||||
|
|
||||||
|
import "mojo/public/mojom/base/time.mojom";
|
||||||
|
|
||||||
|
const string kServiceName = "shortcut_viewer_app";
|
||||||
|
|
||||||
|
// Grants a client the ability to toggle the Keyboard Shortcut Viewer window
|
||||||
|
// through the ShortcutViewer interface defined below.
|
||||||
|
const string kToggleUiCapability = "toggle_ui";
|
||||||
|
|
||||||
|
// Used to toggle the Keyboard Shortcut Viewer window.
|
||||||
|
interface ShortcutViewer {
|
||||||
|
// |user_gesture_time| is the time of the user gesture that caused the window
|
||||||
|
// to show. Used for metrics.
|
||||||
|
Toggle(mojo_base.mojom.TimeTicks user_gesture_time);
|
||||||
|
};
|
||||||
|
|
40
src/ash/components/shortcut_viewer/vector_icons/BUILD.gn
Normal file
40
src/ash/components/shortcut_viewer/vector_icons/BUILD.gn
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//components/vector_icons/vector_icons.gni")
|
||||||
|
|
||||||
|
aggregate_vector_icons("ksv_vector_icons") {
|
||||||
|
icon_directory = "."
|
||||||
|
|
||||||
|
icons = [
|
||||||
|
"ksv_search_back.icon",
|
||||||
|
"ksv_search_bar.icon",
|
||||||
|
"ksv_search_close.icon",
|
||||||
|
"ksv_search_no_result.icon",
|
||||||
|
"ksv_separator_plus.icon",
|
||||||
|
"ksv_arrow_down.icon",
|
||||||
|
"ksv_arrow_left.icon",
|
||||||
|
"ksv_arrow_right.icon",
|
||||||
|
"ksv_arrow_up.icon",
|
||||||
|
"ksv_brightness_down.icon",
|
||||||
|
"ksv_brightness_up.icon",
|
||||||
|
"ksv_browser_back.icon",
|
||||||
|
"ksv_browser_forward.icon",
|
||||||
|
"ksv_fullscreen.icon",
|
||||||
|
"ksv_mute.icon",
|
||||||
|
"ksv_overview.icon",
|
||||||
|
"ksv_reload.icon",
|
||||||
|
"ksv_volume_down.icon",
|
||||||
|
"ksv_volume_up.icon",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("vector_icons") {
|
||||||
|
sources = get_target_outputs(":ksv_vector_icons")
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":ksv_vector_icons",
|
||||||
|
"//skia",
|
||||||
|
]
|
||||||
|
}
|
66
src/ash/components/strings/BUILD.gn
Normal file
66
src/ash/components/strings/BUILD.gn
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//tools/grit/grit_rule.gni")
|
||||||
|
|
||||||
|
grit("strings") {
|
||||||
|
source = "../ash_components_strings.grd"
|
||||||
|
outputs = [
|
||||||
|
"grit/ash_components_strings.h",
|
||||||
|
"ash_components_strings_am.pak",
|
||||||
|
"ash_components_strings_ar.pak",
|
||||||
|
"ash_components_strings_bg.pak",
|
||||||
|
"ash_components_strings_bn.pak",
|
||||||
|
"ash_components_strings_ca.pak",
|
||||||
|
"ash_components_strings_cs.pak",
|
||||||
|
"ash_components_strings_da.pak",
|
||||||
|
"ash_components_strings_de.pak",
|
||||||
|
"ash_components_strings_el.pak",
|
||||||
|
"ash_components_strings_en-GB.pak",
|
||||||
|
"ash_components_strings_en-US.pak",
|
||||||
|
"ash_components_strings_es-419.pak",
|
||||||
|
"ash_components_strings_es.pak",
|
||||||
|
"ash_components_strings_et.pak",
|
||||||
|
"ash_components_strings_fake-bidi.pak",
|
||||||
|
"ash_components_strings_fa.pak",
|
||||||
|
"ash_components_strings_fil.pak",
|
||||||
|
"ash_components_strings_fi.pak",
|
||||||
|
"ash_components_strings_fr.pak",
|
||||||
|
"ash_components_strings_gu.pak",
|
||||||
|
"ash_components_strings_he.pak",
|
||||||
|
"ash_components_strings_hi.pak",
|
||||||
|
"ash_components_strings_hr.pak",
|
||||||
|
"ash_components_strings_hu.pak",
|
||||||
|
"ash_components_strings_id.pak",
|
||||||
|
"ash_components_strings_it.pak",
|
||||||
|
"ash_components_strings_ja.pak",
|
||||||
|
"ash_components_strings_kn.pak",
|
||||||
|
"ash_components_strings_ko.pak",
|
||||||
|
"ash_components_strings_lt.pak",
|
||||||
|
"ash_components_strings_lv.pak",
|
||||||
|
"ash_components_strings_ml.pak",
|
||||||
|
"ash_components_strings_mr.pak",
|
||||||
|
"ash_components_strings_ms.pak",
|
||||||
|
"ash_components_strings_nb.pak",
|
||||||
|
"ash_components_strings_nl.pak",
|
||||||
|
"ash_components_strings_pl.pak",
|
||||||
|
"ash_components_strings_pt-BR.pak",
|
||||||
|
"ash_components_strings_pt-PT.pak",
|
||||||
|
"ash_components_strings_ro.pak",
|
||||||
|
"ash_components_strings_ru.pak",
|
||||||
|
"ash_components_strings_sk.pak",
|
||||||
|
"ash_components_strings_sl.pak",
|
||||||
|
"ash_components_strings_sr.pak",
|
||||||
|
"ash_components_strings_sv.pak",
|
||||||
|
"ash_components_strings_sw.pak",
|
||||||
|
"ash_components_strings_ta.pak",
|
||||||
|
"ash_components_strings_te.pak",
|
||||||
|
"ash_components_strings_th.pak",
|
||||||
|
"ash_components_strings_tr.pak",
|
||||||
|
"ash_components_strings_uk.pak",
|
||||||
|
"ash_components_strings_vi.pak",
|
||||||
|
"ash_components_strings_zh-CN.pak",
|
||||||
|
"ash_components_strings_zh-TW.pak",
|
||||||
|
]
|
||||||
|
}
|
45
src/ash/components/tap_visualizer/BUILD.gn
Normal file
45
src/ash/components/tap_visualizer/BUILD.gn
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Copyright 2016 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.
|
||||||
|
|
||||||
|
source_set("lib") {
|
||||||
|
sources = [
|
||||||
|
"tap_renderer.cc",
|
||||||
|
"tap_renderer.h",
|
||||||
|
"tap_visualizer_app.cc",
|
||||||
|
"tap_visualizer_app.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/components/tap_visualizer/public/mojom",
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//base",
|
||||||
|
"//cc/paint",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/ws/public/cpp",
|
||||||
|
"//services/ws/public/mojom",
|
||||||
|
"//skia",
|
||||||
|
"//ui/compositor",
|
||||||
|
"//ui/events",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views/mus:for_mojo_application",
|
||||||
|
"//ui/views/mus:resources",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("unit_tests") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"tap_visualizer_app_unittest.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":lib",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//ui/aura:test_support",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views:test_support",
|
||||||
|
"//ui/views/mus",
|
||||||
|
]
|
||||||
|
}
|
17
src/ash/components/tap_visualizer/public/cpp/BUILD.gn
Normal file
17
src/ash/components/tap_visualizer/public/cpp/BUILD.gn
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2019 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.
|
||||||
|
|
||||||
|
source_set("manifest") {
|
||||||
|
sources = [
|
||||||
|
"manifest.cc",
|
||||||
|
"manifest.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/components/tap_visualizer/public/mojom",
|
||||||
|
"//base",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/ws/public/mojom:constants",
|
||||||
|
]
|
||||||
|
}
|
11
src/ash/components/tap_visualizer/public/mojom/BUILD.gn
Normal file
11
src/ash/components/tap_visualizer/public/mojom/BUILD.gn
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//mojo/public/tools/bindings/mojom.gni")
|
||||||
|
|
||||||
|
mojom("mojom") {
|
||||||
|
sources = [
|
||||||
|
"tap_visualizer.mojom",
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module tap_visualizer.mojom;
|
||||||
|
|
||||||
|
const string kServiceName = "tap_visualizer_app";
|
||||||
|
|
||||||
|
// Grants a client the ability to show this service's UI through the
|
||||||
|
// TapVisualizer interface defined below.
|
||||||
|
const string kShowUiCapability = "show_ui";
|
||||||
|
|
||||||
|
interface TapVisualizer {
|
||||||
|
// Show the UI.
|
||||||
|
Show();
|
||||||
|
};
|
22
src/ash/keyboard/arc/BUILD.gn
Normal file
22
src/ash/keyboard/arc/BUILD.gn
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//build/config/ui.gni")
|
||||||
|
|
||||||
|
static_library("arc") {
|
||||||
|
sources = [
|
||||||
|
"arc_input_method_surface_manager.cc",
|
||||||
|
"arc_input_method_surface_manager.h",
|
||||||
|
"arc_virtual_keyboard_container_layout_manager.cc",
|
||||||
|
"arc_virtual_keyboard_container_layout_manager.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/public/cpp",
|
||||||
|
"//base",
|
||||||
|
"//components/exo",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/gfx/geometry",
|
||||||
|
]
|
||||||
|
}
|
17
src/ash/login/resources/BUILD.gn
Normal file
17
src/ash/login/resources/BUILD.gn
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//tools/grit/grit_rule.gni")
|
||||||
|
|
||||||
|
grit("resources") {
|
||||||
|
source = "login_resources.grd"
|
||||||
|
outputs = [
|
||||||
|
"grit/login_resources.h",
|
||||||
|
"grit/login_resources_map.cc",
|
||||||
|
"grit/login_resources_map.h",
|
||||||
|
"login_resources_100_percent.pak",
|
||||||
|
"login_resources_200_percent.pak",
|
||||||
|
"login_resources_300_percent.pak",
|
||||||
|
]
|
||||||
|
}
|
262
src/ash/public/cpp/BUILD.gn
Normal file
262
src/ash/public/cpp/BUILD.gn
Normal file
@ -0,0 +1,262 @@
|
|||||||
|
# Copyright 2016 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.
|
||||||
|
|
||||||
|
import("//mojo/public/tools/bindings/mojom.gni")
|
||||||
|
|
||||||
|
# C++ headers and sources that can be used outside ash.
|
||||||
|
component("cpp") {
|
||||||
|
sources = [
|
||||||
|
"accelerators.cc",
|
||||||
|
"accelerators.h",
|
||||||
|
"app_list/app_list_config.cc",
|
||||||
|
"app_list/app_list_config.h",
|
||||||
|
"app_list/app_list_features.cc",
|
||||||
|
"app_list/app_list_features.h",
|
||||||
|
"app_list/app_list_metrics.cc",
|
||||||
|
"app_list/app_list_metrics.h",
|
||||||
|
"app_list/app_list_switches.cc",
|
||||||
|
"app_list/app_list_switches.h",
|
||||||
|
"app_list/app_list_types.cc",
|
||||||
|
"app_list/app_list_types.h",
|
||||||
|
"app_list/internal_app_id_constants.h",
|
||||||
|
"app_list/term_break_iterator.cc",
|
||||||
|
"app_list/term_break_iterator.h",
|
||||||
|
"app_list/tokenized_string.cc",
|
||||||
|
"app_list/tokenized_string.h",
|
||||||
|
"app_list/tokenized_string_char_iterator.cc",
|
||||||
|
"app_list/tokenized_string_char_iterator.h",
|
||||||
|
"app_list/tokenized_string_match.cc",
|
||||||
|
"app_list/tokenized_string_match.h",
|
||||||
|
"app_menu_constants.h",
|
||||||
|
"app_types.h",
|
||||||
|
"ash_client.cc",
|
||||||
|
"ash_client.h",
|
||||||
|
"ash_constants.h",
|
||||||
|
"ash_features.cc",
|
||||||
|
"ash_features.h",
|
||||||
|
"ash_pref_names.cc",
|
||||||
|
"ash_pref_names.h",
|
||||||
|
"ash_public_export.h",
|
||||||
|
"ash_switches.cc",
|
||||||
|
"ash_switches.h",
|
||||||
|
"ash_typography.cc",
|
||||||
|
"ash_typography.h",
|
||||||
|
"ash_view_ids.h",
|
||||||
|
"assistant/assistant_state_base.cc",
|
||||||
|
"assistant/assistant_state_base.h",
|
||||||
|
"assistant/assistant_state_proxy.cc",
|
||||||
|
"assistant/assistant_state_proxy.h",
|
||||||
|
"assistant/default_voice_interaction_observer.h",
|
||||||
|
"caption_buttons/caption_button_model.h",
|
||||||
|
"caption_buttons/frame_back_button.cc",
|
||||||
|
"caption_buttons/frame_back_button.h",
|
||||||
|
"caption_buttons/frame_caption_button_container_view.cc",
|
||||||
|
"caption_buttons/frame_caption_button_container_view.h",
|
||||||
|
"caption_buttons/frame_caption_delegate.h",
|
||||||
|
"caption_buttons/frame_size_button.cc",
|
||||||
|
"caption_buttons/frame_size_button.h",
|
||||||
|
"caption_buttons/frame_size_button_delegate.h",
|
||||||
|
"default_frame_header.cc",
|
||||||
|
"default_frame_header.h",
|
||||||
|
"default_scale_factor_retriever.cc",
|
||||||
|
"default_scale_factor_retriever.h",
|
||||||
|
"fps_counter.cc",
|
||||||
|
"fps_counter.h",
|
||||||
|
"frame_header.cc",
|
||||||
|
"frame_header.h",
|
||||||
|
"frame_utils.cc",
|
||||||
|
"frame_utils.h",
|
||||||
|
"gesture_action_type.h",
|
||||||
|
"immersive/immersive_context.h",
|
||||||
|
"immersive/immersive_focus_watcher.cc",
|
||||||
|
"immersive/immersive_focus_watcher.h",
|
||||||
|
"immersive/immersive_fullscreen_controller.cc",
|
||||||
|
"immersive/immersive_fullscreen_controller.h",
|
||||||
|
"immersive/immersive_fullscreen_controller_delegate.h",
|
||||||
|
"immersive/immersive_revealed_lock.cc",
|
||||||
|
"immersive/immersive_revealed_lock.h",
|
||||||
|
"lock_screen_widget_factory.cc",
|
||||||
|
"lock_screen_widget_factory.h",
|
||||||
|
"login_constants.h",
|
||||||
|
"menu_utils.cc",
|
||||||
|
"menu_utils.h",
|
||||||
|
"mus_property_mirror_ash.cc",
|
||||||
|
"mus_property_mirror_ash.h",
|
||||||
|
"network_icon_image_source.cc",
|
||||||
|
"network_icon_image_source.h",
|
||||||
|
"notification_utils.cc",
|
||||||
|
"notification_utils.h",
|
||||||
|
"power_utils.cc",
|
||||||
|
"power_utils.h",
|
||||||
|
"presentation_time_recorder.cc",
|
||||||
|
"presentation_time_recorder.h",
|
||||||
|
"remote_shelf_item_delegate.cc",
|
||||||
|
"remote_shelf_item_delegate.h",
|
||||||
|
"rounded_corner_decorator.cc",
|
||||||
|
"rounded_corner_decorator.h",
|
||||||
|
"scale_utility.cc",
|
||||||
|
"scale_utility.h",
|
||||||
|
"session_types.h",
|
||||||
|
"shelf_item.cc",
|
||||||
|
"shelf_item.h",
|
||||||
|
"shelf_item_delegate.cc",
|
||||||
|
"shelf_item_delegate.h",
|
||||||
|
"shelf_model.cc",
|
||||||
|
"shelf_model.h",
|
||||||
|
"shelf_model_observer.h",
|
||||||
|
"shelf_prefs.cc",
|
||||||
|
"shelf_prefs.h",
|
||||||
|
"shelf_types.cc",
|
||||||
|
"shelf_types.h",
|
||||||
|
"shell_window_ids.cc",
|
||||||
|
"shell_window_ids.h",
|
||||||
|
"stylus_utils.cc",
|
||||||
|
"stylus_utils.h",
|
||||||
|
"system_tray_focus_observer.h",
|
||||||
|
"tablet_mode.cc",
|
||||||
|
"tablet_mode.h",
|
||||||
|
"touch_uma.cc",
|
||||||
|
"touch_uma.h",
|
||||||
|
"wallpaper_types.h",
|
||||||
|
"window_animation_types.h",
|
||||||
|
"window_pin_type.cc",
|
||||||
|
"window_pin_type.h",
|
||||||
|
"window_properties.cc",
|
||||||
|
"window_properties.h",
|
||||||
|
"window_state_type.cc",
|
||||||
|
"window_state_type.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
defines = [ "ASH_PUBLIC_IMPLEMENTATION" ]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/public/cpp/vector_icons",
|
||||||
|
"//chromeos/constants",
|
||||||
|
"//chromeos/dbus:power_manager_proto",
|
||||||
|
"//components/prefs",
|
||||||
|
"//mojo/public/cpp/bindings",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/ws/public/cpp",
|
||||||
|
"//services/ws/public/mojom",
|
||||||
|
"//skia/public/interfaces",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/chromeos/strings",
|
||||||
|
"//ui/compositor_extra",
|
||||||
|
"//ui/display",
|
||||||
|
"//ui/events/devices",
|
||||||
|
"//ui/message_center/public/cpp",
|
||||||
|
"//ui/views",
|
||||||
|
"//ui/views/mus",
|
||||||
|
"//ui/views/window/vector_icons",
|
||||||
|
"//ui/wm",
|
||||||
|
"//ui/wm/public",
|
||||||
|
]
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//ash/public/interfaces:interfaces_internal",
|
||||||
|
"//base",
|
||||||
|
"//ui/gfx",
|
||||||
|
]
|
||||||
|
|
||||||
|
allow_circular_includes_from =
|
||||||
|
[ "//ash/public/interfaces:interfaces_internal" ]
|
||||||
|
|
||||||
|
output_name = "ash_public_cpp"
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("manifest") {
|
||||||
|
sources = [
|
||||||
|
"manifest.cc",
|
||||||
|
"manifest.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
"//ash/public/interfaces:interfaces_internal",
|
||||||
|
"//base",
|
||||||
|
"//chromeos/services/multidevice_setup/public/mojom",
|
||||||
|
"//services/content/public/mojom",
|
||||||
|
"//services/data_decoder/public/mojom",
|
||||||
|
"//services/device/public/mojom",
|
||||||
|
"//services/preferences/public/mojom",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/service_manager/public/mojom",
|
||||||
|
"//services/viz/public/interfaces",
|
||||||
|
"//services/ws/public/cpp:manifest",
|
||||||
|
"//services/ws/public/mojom",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("manifest_for_tests") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"test_manifest.cc",
|
||||||
|
"test_manifest.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":manifest",
|
||||||
|
"//ash/public/interfaces:test_interfaces",
|
||||||
|
"//base",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/service_manager/public/mojom",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Using a test service because the traits need to pass handles around. Revisit
|
||||||
|
# this after Deserialize(Serialize()) API works with handles.
|
||||||
|
mojom("test_interfaces") {
|
||||||
|
visibility = [ ":unit_tests" ]
|
||||||
|
disable_variants = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"shelf_struct_traits_test_service.mojom",
|
||||||
|
]
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//ash/public/interfaces:interfaces_internal",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("unit_tests") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"default_scale_factor_retriever_unittest.cc",
|
||||||
|
"menu_utils_unittest.cc",
|
||||||
|
"power_utils_unittest.cc",
|
||||||
|
"rounded_corner_decorator_unittest.cc",
|
||||||
|
"shelf_model_unittest.cc",
|
||||||
|
"shelf_struct_mojom_traits_unittest.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":cpp",
|
||||||
|
":test_interfaces",
|
||||||
|
"//base",
|
||||||
|
"//testing/gtest",
|
||||||
|
"//ui/aura:test_support",
|
||||||
|
"//ui/gfx:test_support",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("test_support") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"immersive/immersive_fullscreen_controller_test_api.cc",
|
||||||
|
"immersive/immersive_fullscreen_controller_test_api.h",
|
||||||
|
"test/test_keyboard_controller_observer.cc",
|
||||||
|
"test/test_keyboard_controller_observer.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":cpp",
|
||||||
|
"//base",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//ui/aura",
|
||||||
|
"//ui/aura:test_support",
|
||||||
|
"//ui/gfx",
|
||||||
|
"//ui/keyboard:mojom",
|
||||||
|
"//ui/views",
|
||||||
|
]
|
||||||
|
}
|
40
src/ash/public/cpp/app_list/vector_icons/BUILD.gn
Normal file
40
src/ash/public/cpp/app_list/vector_icons/BUILD.gn
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Copyright 2017 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.
|
||||||
|
|
||||||
|
import("//components/vector_icons/vector_icons.gni")
|
||||||
|
|
||||||
|
aggregate_vector_icons("app_list_vector_icons") {
|
||||||
|
icon_directory = "."
|
||||||
|
|
||||||
|
icons = [
|
||||||
|
"arrow_up.icon",
|
||||||
|
"badge_instant.icon",
|
||||||
|
"badge_play.icon",
|
||||||
|
"badge_rating.icon",
|
||||||
|
"bookmark.icon",
|
||||||
|
"domain.icon",
|
||||||
|
"equal.icon",
|
||||||
|
"google_black.icon",
|
||||||
|
"google_color.icon",
|
||||||
|
"history.icon",
|
||||||
|
"mic_black.icon",
|
||||||
|
"search.icon",
|
||||||
|
"search_engine_not_google.icon",
|
||||||
|
"search_result_append.icon",
|
||||||
|
"search_result_remove.icon",
|
||||||
|
"vertical_bar_end.icon",
|
||||||
|
"vertical_bar_middle.icon",
|
||||||
|
"vertical_bar_single.icon",
|
||||||
|
"vertical_bar_start.icon",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("vector_icons") {
|
||||||
|
sources = get_target_outputs(":app_list_vector_icons")
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":app_list_vector_icons",
|
||||||
|
"//skia",
|
||||||
|
]
|
||||||
|
}
|
13
src/ash/public/cpp/resources/BUILD.gn
Normal file
13
src/ash/public/cpp/resources/BUILD.gn
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//tools/grit/grit_rule.gni")
|
||||||
|
|
||||||
|
grit("ash_public_unscaled_resources") {
|
||||||
|
source = "ash_public_unscaled_resources.grd"
|
||||||
|
outputs = [
|
||||||
|
"grit/ash_public_unscaled_resources.h",
|
||||||
|
"ash_public_unscaled_resources.pak",
|
||||||
|
]
|
||||||
|
}
|
13
src/ash/public/cpp/shelf_struct_traits_test_service.mojom
Normal file
13
src/ash/public/cpp/shelf_struct_traits_test_service.mojom
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/shelf.mojom";
|
||||||
|
|
||||||
|
// A test echo interface for traits.
|
||||||
|
interface ShelfStructTraitsTestService {
|
||||||
|
[Sync]
|
||||||
|
EchoShelfItem(ShelfItem in) => (ShelfItem out);
|
||||||
|
};
|
57
src/ash/public/cpp/vector_icons/BUILD.gn
Normal file
57
src/ash/public/cpp/vector_icons/BUILD.gn
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
import("//components/vector_icons/vector_icons.gni")
|
||||||
|
|
||||||
|
# The icons in this target, unlike those in //ash/resources/vector_icons, are ok to use from outside of ash/.
|
||||||
|
aggregate_vector_icons("ash_public_vector_icons") {
|
||||||
|
icon_directory = "."
|
||||||
|
|
||||||
|
icons = [
|
||||||
|
"assistant.icon",
|
||||||
|
"assistant_mic.icon",
|
||||||
|
"auto_launch_managed_guest_session.icon",
|
||||||
|
"notification_assistant.icon",
|
||||||
|
"notification_captive_portal.icon",
|
||||||
|
"notification_cellular_alert.icon",
|
||||||
|
"notification_download.icon",
|
||||||
|
"notification_end_of_support.icon",
|
||||||
|
"window_control_dezoom.icon",
|
||||||
|
"window_control_back.icon",
|
||||||
|
"window_control_menu.icon",
|
||||||
|
"window_control_zoom.icon",
|
||||||
|
"notification_family_link.icon",
|
||||||
|
"notification_google.icon",
|
||||||
|
"notification_image.icon",
|
||||||
|
"notification_installed.icon",
|
||||||
|
"notification_linux.icon",
|
||||||
|
"notification_messages.icon",
|
||||||
|
"notification_mobile_data.icon",
|
||||||
|
"notification_mobile_data_off.icon",
|
||||||
|
"notification_multi_device_setup.icon",
|
||||||
|
"notification_play_prism.icon",
|
||||||
|
"notification_printing.icon",
|
||||||
|
"notification_printing_done.icon",
|
||||||
|
"notification_printing_warning.icon",
|
||||||
|
"notification_settings.icon",
|
||||||
|
"notification_storage_full.icon",
|
||||||
|
"notification_supervised_user.icon",
|
||||||
|
"notification_vpn.icon",
|
||||||
|
"notification_warning.icon",
|
||||||
|
"notification_wifi_off.icon",
|
||||||
|
"window_control_left_snapped.icon",
|
||||||
|
"window_control_right_snapped.icon",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
source_set("vector_icons") {
|
||||||
|
sources = get_target_outputs(":ash_public_vector_icons")
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
":ash_public_vector_icons",
|
||||||
|
"//base",
|
||||||
|
"//skia",
|
||||||
|
"//ui/gfx",
|
||||||
|
]
|
||||||
|
}
|
117
src/ash/public/interfaces/BUILD.gn
Normal file
117
src/ash/public/interfaces/BUILD.gn
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import("//mojo/public/tools/bindings/mojom.gni")
|
||||||
|
|
||||||
|
# Depend upon //ash/public/cpp, which has a public_dep on this. The two targets
|
||||||
|
# must be bundled together as the typemaps depend upon //ash/public/cpp,
|
||||||
|
# and //ash/public/cpp needs to depend on this for generated code (such as
|
||||||
|
# enums and constants).
|
||||||
|
mojom("interfaces_internal") {
|
||||||
|
visibility = [ "//ash/public/cpp:*" ]
|
||||||
|
disable_variants = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"accelerator_controller.mojom",
|
||||||
|
"accessibility_controller.mojom",
|
||||||
|
"accessibility_controller_enums.mojom",
|
||||||
|
"accessibility_focus_ring_controller.mojom",
|
||||||
|
"app_list.mojom",
|
||||||
|
"arc_custom_tab.mojom",
|
||||||
|
"ash_display_controller.mojom",
|
||||||
|
"ash_message_center_controller.mojom",
|
||||||
|
"ash_window_manager.mojom",
|
||||||
|
"assistant_controller.mojom",
|
||||||
|
"assistant_image_downloader.mojom",
|
||||||
|
"assistant_setup.mojom",
|
||||||
|
"assistant_volume_control.mojom",
|
||||||
|
"cast_config.mojom",
|
||||||
|
"constants.mojom",
|
||||||
|
"cros_display_config.mojom",
|
||||||
|
"display_output_protection.mojom",
|
||||||
|
"docked_magnifier_controller.mojom",
|
||||||
|
"event_properties.mojom",
|
||||||
|
"event_rewriter_controller.mojom",
|
||||||
|
"first_run_helper.mojom",
|
||||||
|
"highlighter_controller.mojom",
|
||||||
|
"ime_controller.mojom",
|
||||||
|
"ime_info.mojom",
|
||||||
|
"keyboard_controller.mojom",
|
||||||
|
"kiosk_app_info.mojom",
|
||||||
|
"kiosk_next_shell.mojom",
|
||||||
|
"locale.mojom",
|
||||||
|
"login_screen.mojom",
|
||||||
|
"login_user_info.mojom",
|
||||||
|
"media.mojom",
|
||||||
|
"menu.mojom",
|
||||||
|
"multi_user_window_manager.mojom",
|
||||||
|
"new_window.mojom",
|
||||||
|
"night_light_controller.mojom",
|
||||||
|
"note_taking_controller.mojom",
|
||||||
|
"pref_connector.mojom",
|
||||||
|
"process_creation_time_recorder.mojom",
|
||||||
|
"session_controller.mojom",
|
||||||
|
"shelf.mojom",
|
||||||
|
"shutdown.mojom",
|
||||||
|
"split_view.mojom",
|
||||||
|
"system_tray.mojom",
|
||||||
|
"tablet_mode.mojom",
|
||||||
|
"tray_action.mojom",
|
||||||
|
"update.mojom",
|
||||||
|
"user_info.mojom",
|
||||||
|
"voice_interaction_controller.mojom",
|
||||||
|
"volume.mojom",
|
||||||
|
"vpn_list.mojom",
|
||||||
|
"wallpaper.mojom",
|
||||||
|
"window_pin_type.mojom",
|
||||||
|
"window_properties.mojom",
|
||||||
|
"window_state_type.mojom",
|
||||||
|
]
|
||||||
|
|
||||||
|
public_deps = [
|
||||||
|
"//chromeos/components/proximity_auth/public/interfaces",
|
||||||
|
"//chromeos/services/assistant/public/mojom",
|
||||||
|
"//components/account_id/interfaces",
|
||||||
|
"//components/arc/common:notifications",
|
||||||
|
"//components/sync/mojo:interfaces",
|
||||||
|
"//mojo/public/mojom/base",
|
||||||
|
"//services/content/public/mojom",
|
||||||
|
"//services/preferences/public/mojom",
|
||||||
|
"//skia/public/interfaces",
|
||||||
|
"//ui/accessibility:ax_enums_mojo",
|
||||||
|
"//ui/base/ime/chromeos/public/interfaces",
|
||||||
|
"//ui/base/mojo",
|
||||||
|
"//ui/display/mojo:interfaces",
|
||||||
|
"//ui/events/mojo:interfaces",
|
||||||
|
"//ui/gfx/geometry/mojo",
|
||||||
|
"//ui/gfx/image/mojo:interfaces",
|
||||||
|
"//ui/gfx/range/mojo",
|
||||||
|
"//ui/keyboard:mojom",
|
||||||
|
"//ui/message_center/public/mojo:mojo",
|
||||||
|
"//url/mojom:url_mojom_gurl",
|
||||||
|
]
|
||||||
|
|
||||||
|
component_output_prefix = "ash_public_interfaces_internal"
|
||||||
|
export_class_attribute = "ASH_PUBLIC_EXPORT"
|
||||||
|
export_define = "ASH_PUBLIC_IMPLEMENTATION=1"
|
||||||
|
export_header = "ash/public/cpp/ash_public_export.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
mojom("test_interfaces") {
|
||||||
|
testonly = true
|
||||||
|
disable_variants = true
|
||||||
|
sources = [
|
||||||
|
"login_screen_test_api.test-mojom",
|
||||||
|
"shelf_test_api.test-mojom",
|
||||||
|
"shell_test_api.test-mojom",
|
||||||
|
"status_area_widget_test_api.test-mojom",
|
||||||
|
"system_tray_test_api.test-mojom",
|
||||||
|
"time_to_first_present_recorder_test_api.test-mojom",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//components/account_id/interfaces",
|
||||||
|
"//mojo/public/mojom/base",
|
||||||
|
"//ui/gfx/geometry/mojo",
|
||||||
|
]
|
||||||
|
}
|
16
src/ash/public/interfaces/accelerator_controller.mojom
Normal file
16
src/ash/public/interfaces/accelerator_controller.mojom
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/volume.mojom";
|
||||||
|
|
||||||
|
// Implemented by ash to delegate parts of keyboard accelerator handling back
|
||||||
|
// to chrome.
|
||||||
|
interface AcceleratorController {
|
||||||
|
// Sets the volume controller interface. This lives in chrome because chrome
|
||||||
|
// owns the D-Bus CrasAudioHandler implementation. Also the accessibility
|
||||||
|
// manager in chrome needs to know about volume changes.
|
||||||
|
SetVolumeController(VolumeController controller);
|
||||||
|
};
|
140
src/ash/public/interfaces/accessibility_controller.mojom
Normal file
140
src/ash/public/interfaces/accessibility_controller.mojom
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/accessibility_controller_enums.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "mojo/public/mojom/base/time.mojom";
|
||||||
|
import "ui/accessibility/ax_enums.mojom";
|
||||||
|
import "ui/events/mojo/event.mojom";
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
// Allows a client to implement Select-to-Speak.
|
||||||
|
// TODO(katie): Consider combining DispatchMouseEvent and DispatchKeyEvent
|
||||||
|
// into a single DispatchEvent function.
|
||||||
|
interface SelectToSpeakEventHandlerDelegate {
|
||||||
|
// Sends a KeyEvent to the Select-to-Speak extension in Chrome. The event
|
||||||
|
// is cast to a key event with a type CHECK.
|
||||||
|
DispatchKeyEvent(ui.mojom.Event event);
|
||||||
|
|
||||||
|
// Sends a MouseEvent to the Select-to-Speak extension in Chrome. The event
|
||||||
|
// is cast to a mouse event with a type CHECK.
|
||||||
|
DispatchMouseEvent(ui.mojom.Event event);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows a client to implement Switch Access.
|
||||||
|
interface SwitchAccessEventHandlerDelegate {
|
||||||
|
// Sends a KeyEvent to the Switch Access extension in Chrome. The event
|
||||||
|
// is cast to a key event with a type CHECK.
|
||||||
|
DispatchKeyEvent(ui.mojom.Event event);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash client (e.g. Chrome) to control and query accessibility
|
||||||
|
// features.
|
||||||
|
interface AccessibilityController {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(AccessibilityControllerClient client);
|
||||||
|
|
||||||
|
// Starts or stops darkening the screen (e.g. to allow chrome a11y extensions
|
||||||
|
// to darken the screen).
|
||||||
|
SetDarkenScreen(bool darken);
|
||||||
|
|
||||||
|
// Called when braille display state is changed.
|
||||||
|
BrailleDisplayStateChanged(bool connected);
|
||||||
|
|
||||||
|
// Sets the focus highlight rect using |bounds_in_screen|. Called when focus
|
||||||
|
// changed in page and a11y focus highlight feature is enabled.
|
||||||
|
SetFocusHighlightRect(gfx.mojom.Rect bounds_in_screen);
|
||||||
|
|
||||||
|
// Sets the text input caret bounds used to draw the caret highlight effect.
|
||||||
|
// For effciency, only sent when the caret highlight feature is enabled.
|
||||||
|
// Setting off-screen or empty bounds suppresses the highlight.
|
||||||
|
SetCaretBounds(gfx.mojom.Rect bounds_in_screen);
|
||||||
|
|
||||||
|
// Sets whether the accessibility panel should always be visible, regardless
|
||||||
|
// of whether the window is fullscreen.
|
||||||
|
SetAccessibilityPanelAlwaysVisible(bool always_visible);
|
||||||
|
|
||||||
|
// Sets the bounds for the accessibility panel. Overrides current
|
||||||
|
// configuration (i.e. fullscreen, full-width).
|
||||||
|
SetAccessibilityPanelBounds(gfx.mojom.Rect bounds,
|
||||||
|
AccessibilityPanelState state);
|
||||||
|
|
||||||
|
// Sets the current Select-to-Speak state. This should be used by the Select-
|
||||||
|
// to-Speak extension to inform ash of its updated state.
|
||||||
|
SetSelectToSpeakState(SelectToSpeakState state);
|
||||||
|
|
||||||
|
// Set the delegate used by the Select-to-Speak event handler.
|
||||||
|
SetSelectToSpeakEventHandlerDelegate(
|
||||||
|
SelectToSpeakEventHandlerDelegate delegate);
|
||||||
|
|
||||||
|
// Sets the key codes that Switch Access should capture.
|
||||||
|
SetSwitchAccessKeysToCapture(array<int32> keys_to_capture);
|
||||||
|
|
||||||
|
// Set the delegate used by the Switch Access event handler.
|
||||||
|
SetSwitchAccessEventHandlerDelegate(
|
||||||
|
SwitchAccessEventHandlerDelegate delegate);
|
||||||
|
|
||||||
|
// Starts or stops dictation. Records metrics for toggling via SwitchAccess.
|
||||||
|
ToggleDictationFromSource(DictationToggleSource source);
|
||||||
|
|
||||||
|
// Tells the Switch Access Event Handler whether to forward all key events to
|
||||||
|
// the Switch Access extension.
|
||||||
|
ForwardKeyEventsToSwitchAccess(bool should_forward);
|
||||||
|
|
||||||
|
// Retrieves a string description of the current battery status.
|
||||||
|
GetBatteryDescription()
|
||||||
|
=> (mojo_base.mojom.String16 battery_description);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash to request accessibility service from its client (e.g.
|
||||||
|
// Chrome).
|
||||||
|
interface AccessibilityControllerClient {
|
||||||
|
// Triggers an accessibility alert to give the user feedback.
|
||||||
|
TriggerAccessibilityAlert(AccessibilityAlert alert);
|
||||||
|
|
||||||
|
// Plays an earcon. Earcons are brief and distinctive sounds that indicate
|
||||||
|
// that their mapped event has occurred. The |sound_key| enums can be found in
|
||||||
|
// chromeos/audio/chromeos_sounds.h. This method exists because the browser
|
||||||
|
// owns all media playback.
|
||||||
|
PlayEarcon(int32 sound_key);
|
||||||
|
|
||||||
|
// Initiates play of shutdown sound and returns sound duration. This method
|
||||||
|
// exists because the browser owns all media playback.
|
||||||
|
PlayShutdownSound() => (mojo_base.mojom.TimeDelta sound_duration);
|
||||||
|
|
||||||
|
// Forwards an accessibility gesture from the touch exploration controller to
|
||||||
|
// ChromeVox.
|
||||||
|
HandleAccessibilityGesture(ax.mojom.Gesture gesture);
|
||||||
|
|
||||||
|
// Starts or stops dictation (type what you speak).
|
||||||
|
// Returns the new dictation state after the toggle.
|
||||||
|
ToggleDictation() => (bool dictation_on);
|
||||||
|
|
||||||
|
// Cancels all current and queued speech immediately.
|
||||||
|
SilenceSpokenFeedback();
|
||||||
|
|
||||||
|
// Called when we first detect two fingers are held down, which can be used to
|
||||||
|
// toggle spoken feedback on some touch-only devices.
|
||||||
|
OnTwoFingerTouchStart();
|
||||||
|
|
||||||
|
// Called when the user is no longer holding down two fingers (including
|
||||||
|
// releasing one, holding down three, or moving them).
|
||||||
|
OnTwoFingerTouchStop();
|
||||||
|
|
||||||
|
// Whether or not to enable toggling spoken feedback via holding down two
|
||||||
|
// fingers on the screen.
|
||||||
|
ShouldToggleSpokenFeedbackViaTouch() => (bool should_toggle);
|
||||||
|
|
||||||
|
// Plays tick sound indicating spoken feedback will be toggled after
|
||||||
|
// countdown.
|
||||||
|
PlaySpokenFeedbackToggleCountdown(int32 tick_count);
|
||||||
|
|
||||||
|
// Requests the Select-to-Speak extension to change its state. This lets users
|
||||||
|
// do the same things in tablet mode as with a keyboard. Specifically, if
|
||||||
|
// Select-to-Speak is not speaking, move to capturing state; if
|
||||||
|
// Select-to-Speak is speaking, cancel speaking and move to inactive state.
|
||||||
|
RequestSelectToSpeakStateChange();
|
||||||
|
};
|
@ -0,0 +1,97 @@
|
|||||||
|
// Copyright 2019 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// Alert sent to the accessibility api.
|
||||||
|
enum AccessibilityAlert {
|
||||||
|
// Default value, indicates no accessibility alert.
|
||||||
|
NONE,
|
||||||
|
|
||||||
|
// When caps lock is turned on.
|
||||||
|
CAPS_ON,
|
||||||
|
|
||||||
|
// When caps lock is turned off.
|
||||||
|
CAPS_OFF,
|
||||||
|
|
||||||
|
// When screen is turned on by tablet power button.
|
||||||
|
SCREEN_ON,
|
||||||
|
|
||||||
|
// When screen is turned off by tablet power button.
|
||||||
|
SCREEN_OFF,
|
||||||
|
|
||||||
|
// When window moved to another display by accelerators.
|
||||||
|
WINDOW_MOVED_TO_ANOTHER_DISPLAY,
|
||||||
|
|
||||||
|
// When the user attempts a keyboard command that requires a window to work,
|
||||||
|
// and none is available.
|
||||||
|
WINDOW_NEEDED,
|
||||||
|
|
||||||
|
// When the user enters window overview mode.
|
||||||
|
WINDOW_OVERVIEW_MODE_ENTERED
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AccessibilityPanelState {
|
||||||
|
// Window bounds are set explicitly.
|
||||||
|
BOUNDED,
|
||||||
|
|
||||||
|
// Width of panel matches screen width, y_coord and height are set by bounds.
|
||||||
|
FULL_WIDTH,
|
||||||
|
|
||||||
|
// Panel occupies the full screen. Bounds are ignored.
|
||||||
|
FULLSCREEN
|
||||||
|
};
|
||||||
|
|
||||||
|
// These values are persisted to logs and should not be renumbered or re-used.
|
||||||
|
// See tools/metrics/histograms/enums.xml.
|
||||||
|
enum DictationToggleSource {
|
||||||
|
// Toggled by the keyboard command (Search + D).
|
||||||
|
kKeyboard,
|
||||||
|
|
||||||
|
// Toggled by the dictation button in the tray.
|
||||||
|
kButton,
|
||||||
|
|
||||||
|
// Switch Access context menu button.
|
||||||
|
kSwitchAccess,
|
||||||
|
|
||||||
|
// Chromevox chrome extension.
|
||||||
|
kChromevox
|
||||||
|
};
|
||||||
|
|
||||||
|
enum SelectToSpeakState {
|
||||||
|
// Select to Speak is not actively selecting text or speaking.
|
||||||
|
kSelectToSpeakStateInactive,
|
||||||
|
|
||||||
|
// Select to Speak is being used to actively select a new region. Note that
|
||||||
|
// it might also be speaking, but the selecting state takes precedence.
|
||||||
|
kSelectToSpeakStateSelecting,
|
||||||
|
|
||||||
|
// Select to Speak is currently speaking.
|
||||||
|
kSelectToSpeakStateSpeaking,
|
||||||
|
};
|
||||||
|
|
||||||
|
// The type of mouse event the dwell control feature should perform when
|
||||||
|
// dwelling. These values are written to prefs and correspond to
|
||||||
|
// AutoclickActionType in enums.xml, so should not be changed. New values
|
||||||
|
// should be added at the end.
|
||||||
|
[Extensible]
|
||||||
|
enum AutoclickEventType {
|
||||||
|
// Perform a left click.
|
||||||
|
kLeftClick,
|
||||||
|
|
||||||
|
// Perform a right click.
|
||||||
|
kRightClick,
|
||||||
|
|
||||||
|
// Perform a drag and drop, i.e. click down at the first dwell, and up at the
|
||||||
|
// second dwell.
|
||||||
|
kDragAndDrop,
|
||||||
|
|
||||||
|
// Perform a double-click.
|
||||||
|
kDoubleClick,
|
||||||
|
|
||||||
|
// A non-action, i.e. nothing will happen at the end of the dwell time.
|
||||||
|
kNoAction,
|
||||||
|
|
||||||
|
// TODO(katie): Add scroll.
|
||||||
|
};
|
@ -0,0 +1,47 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
enum FocusRingBehavior { FADE_OUT_FOCUS_RING, PERSIST_FOCUS_RING };
|
||||||
|
|
||||||
|
// Interface for ash client (e.g. Chrome) to control and query accessibility
|
||||||
|
// focus ring features.
|
||||||
|
interface AccessibilityFocusRingController {
|
||||||
|
// Sets the focus ring color for the given caller.
|
||||||
|
SetFocusRingColor(uint32 skcolor, string caller_id);
|
||||||
|
|
||||||
|
// Resets the focus ring color back to the default for the given caller.
|
||||||
|
ResetFocusRingColor(string caller_id);
|
||||||
|
|
||||||
|
// Draws a focus ring around the given set of rects in screen coordinates. Use
|
||||||
|
// |focus_ring_behavior| to specify whether the focus ring should persist or
|
||||||
|
// fade out for the given caller.
|
||||||
|
SetFocusRing(array<gfx.mojom.Rect> rects_in_screen,
|
||||||
|
FocusRingBehavior focus_ring_behavior,
|
||||||
|
string caller_id);
|
||||||
|
|
||||||
|
// Hides focus ring on screen for the given caller.
|
||||||
|
HideFocusRing(string caller_id);
|
||||||
|
|
||||||
|
// Draws a highlight at the given rects in screen coordinates. Rects may be
|
||||||
|
// overlapping and will be merged into one layer. This looks similar to
|
||||||
|
// selecting a region with the cursor, except it is drawn in the foreground
|
||||||
|
// rather than behind a text layer.
|
||||||
|
// TODO(katie): Add |caller_id| to highlights as well if other Accessibility
|
||||||
|
// tools or extensions want to use this API.
|
||||||
|
SetHighlights(array<gfx.mojom.Rect> rects_in_screen, uint32 skcolor);
|
||||||
|
|
||||||
|
// Hides highlight on screen.
|
||||||
|
// TODO(katie): Add |caller_id| to highlights as well.
|
||||||
|
HideHighlights();
|
||||||
|
|
||||||
|
// Enables double focus rings and sets the second color for the given caller.
|
||||||
|
EnableDoubleFocusRing(uint32 skcolor, string caller_id);
|
||||||
|
|
||||||
|
// Disables double focus rings for the given caller.
|
||||||
|
DisableDoubleFocusRing(string caller_id);
|
||||||
|
};
|
413
src/ash/public/interfaces/app_list.mojom
Normal file
413
src/ash/public/interfaces/app_list.mojom
Normal file
@ -0,0 +1,413 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/menu.mojom";
|
||||||
|
import "components/sync/mojo/syncer.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "mojo/public/mojom/base/unguessable_token.mojom";
|
||||||
|
import "services/content/public/mojom/navigable_contents_factory.mojom";
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
import "ui/gfx/image/mojo/image.mojom";
|
||||||
|
import "ui/gfx/range/mojo/range.mojom";
|
||||||
|
import "url/mojom/url.mojom";
|
||||||
|
|
||||||
|
// A structure holding the common information which is sent between ash and,
|
||||||
|
// chrome representing an app list item.
|
||||||
|
// This structure should be kept as small as possible so that minimum data
|
||||||
|
// is sent via mojo calls when an item is moved or reparented.
|
||||||
|
struct AppListItemMetadata {
|
||||||
|
string id; // The id of the app list item.
|
||||||
|
string name; // The corresponding app or folder's name of the item.
|
||||||
|
string short_name; // The corresponding app's short name of the item. It's
|
||||||
|
// empty if the app doesn't have one or it's a folder.
|
||||||
|
string folder_id; // The id of the item's folder.
|
||||||
|
syncer.mojom.StringOrdinal position; // The position of the item.
|
||||||
|
bool is_folder; // Whether this item is a folder.
|
||||||
|
bool is_persistent; // Whether this folder is allowed to contain 1 item.
|
||||||
|
gfx.mojom.ImageSkia? icon; // The icon of this item.
|
||||||
|
bool is_page_break; // Whether this item is a "page break" item.
|
||||||
|
};
|
||||||
|
|
||||||
|
// A structure holding the common information which is sent from chrome to ash,
|
||||||
|
// representing a search result.
|
||||||
|
struct SearchResultMetadata {
|
||||||
|
string id; // The id of the result.
|
||||||
|
mojo_base.mojom.String16 title; // The title of the result, e.g. an app's
|
||||||
|
// name, an autocomplete query, etc.
|
||||||
|
mojo_base.mojom.String16 details; // A detail string of this result.
|
||||||
|
mojo_base.mojom.String16 accessible_name;
|
||||||
|
// An text to be announced by a screen
|
||||||
|
// reader app.
|
||||||
|
array<SearchResultTag> title_tags; // How the title matches the query. See
|
||||||
|
// the SearchResultTag section for
|
||||||
|
// more details.
|
||||||
|
array<SearchResultTag> details_tags; // How the details match the query. See
|
||||||
|
// the SearchResultTag section for
|
||||||
|
// more details.
|
||||||
|
array<SearchResultAction> actions; // Actions that can be performed on this
|
||||||
|
// result. See the SearchResultAction
|
||||||
|
// section for more details.
|
||||||
|
float rating = -1.0; // The average rating score of the app
|
||||||
|
// corresponding to this result, ranged from 0 to
|
||||||
|
// 5. It's negative if there's no rating for the
|
||||||
|
// result.
|
||||||
|
mojo_base.mojom.String16 formatted_price; // A formatted price string, e.g.
|
||||||
|
// "$7.09", "HK$3.94", etc.
|
||||||
|
SearchResultType result_type; // The type of this result.
|
||||||
|
SearchResultDisplayType display_type = kList;
|
||||||
|
// How this result is displayed.
|
||||||
|
double display_score; // A score to determine the result display order.
|
||||||
|
bool is_omnibox_search; // Whether this result is searched from Omnibox.
|
||||||
|
bool is_installing; // Whether this result is installing.
|
||||||
|
|
||||||
|
url.mojom.Url? query_url; // A query URL associated with this result. The
|
||||||
|
// meaning and treatment of the URL
|
||||||
|
// (e.g. displaying inline web contents) is
|
||||||
|
// dependent on the result type.
|
||||||
|
|
||||||
|
string? equivalent_result_id; // An optional id that identifies an equivalent
|
||||||
|
// result to this result. Answer card result
|
||||||
|
// has this set to remove the equivalent
|
||||||
|
// omnibox search-what-you-typed result when
|
||||||
|
// there is an answer card for the query.
|
||||||
|
|
||||||
|
gfx.mojom.ImageSkia? icon; // The icon of this result.
|
||||||
|
gfx.mojom.ImageSkia? chip_icon; // The icon of this result in a smaller
|
||||||
|
// dimension to be rendered in suggestion
|
||||||
|
// chip view.
|
||||||
|
gfx.mojom.ImageSkia? badge_icon; // The badge icon of this result that
|
||||||
|
// indicates its type, e.g. installable from
|
||||||
|
// PlayStore, installable from WebStore,
|
||||||
|
// etc.
|
||||||
|
// If set to true, whether or not to send visibility updates through to to
|
||||||
|
// the chrome side when this result is set visible/invisible.
|
||||||
|
bool notify_visibility_change;
|
||||||
|
};
|
||||||
|
|
||||||
|
// All possible states of the app list.
|
||||||
|
enum AppListState {
|
||||||
|
kStateApps = 0,
|
||||||
|
kStateSearchResults,
|
||||||
|
kStateStart,
|
||||||
|
kStateEmbeddedAssistant,
|
||||||
|
};
|
||||||
|
|
||||||
|
// The status of the app list model.
|
||||||
|
enum AppListModelStatus {
|
||||||
|
kStatusNormal,
|
||||||
|
kStatusSyncing, // Syncing apps or installing synced apps.
|
||||||
|
};
|
||||||
|
|
||||||
|
// The UI component the user launched the search result from. Must match
|
||||||
|
// chrome/browser/ui/app_list/app_launch_event_logger.proto.
|
||||||
|
enum AppListLaunchedFrom {
|
||||||
|
kLaunchedFromGrid = 1,
|
||||||
|
kLaunchedFromSuggestionChip,
|
||||||
|
kLaunchedFromShelf,
|
||||||
|
kLaunchedFromSearchBox,
|
||||||
|
};
|
||||||
|
|
||||||
|
// The UI representation of the search result. Currently all search results
|
||||||
|
// that are not apps (OminboxResult, LauncherSearcResult, etc.) are grouped
|
||||||
|
// into kSearchResult. Meanwhile SearchResultTileItemView (shown in zero state)
|
||||||
|
// and suggested chips are considered kAppSearchResult.
|
||||||
|
enum AppListLaunchType {
|
||||||
|
kSearchResult = 0,
|
||||||
|
kAppSearchResult,
|
||||||
|
};
|
||||||
|
|
||||||
|
// How the result should be displayed. Do not change the order of these as
|
||||||
|
// they are used for metrics.
|
||||||
|
enum SearchResultDisplayType {
|
||||||
|
kNone = 0,
|
||||||
|
kList,
|
||||||
|
kTile,
|
||||||
|
kRecommendation,
|
||||||
|
kCard,
|
||||||
|
// Add new values here.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Type of the search result, which is set in Chrome.
|
||||||
|
enum SearchResultType {
|
||||||
|
kInstalledApp, // Installed apps.
|
||||||
|
kPlayStoreApp, // Installable apps from PlayStore.
|
||||||
|
kInstantApp, // Instant apps.
|
||||||
|
kInternalApp, // Chrome OS apps.
|
||||||
|
kWebStoreApp, // Installable apps from WebStore.
|
||||||
|
kWebStoreSearch, // A search query in WebStore.
|
||||||
|
kOmnibox, // Results from Omninbox.
|
||||||
|
kLauncher, // Results from launcher search (currently only from Files).
|
||||||
|
kAnswerCard, // WebContents based answer card.
|
||||||
|
kPlayStoreReinstallApp, // Reinstall recommendations from PlayStore.
|
||||||
|
kArcAppShortcut, // ARC++ app shortcuts.
|
||||||
|
// Add new values here.
|
||||||
|
};
|
||||||
|
|
||||||
|
// A tagged range in search result text.
|
||||||
|
struct SearchResultTag {
|
||||||
|
// Similar to ACMatchClassification::Style, the style values are not
|
||||||
|
// mutually exclusive.
|
||||||
|
int16 styles;
|
||||||
|
gfx.mojom.Range range;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Data representing an action that can be performed on a search result.
|
||||||
|
// An action could be represented as an image button, it will be always visibe
|
||||||
|
// if |visible_on_hover| is false; otherwise how it is visible only when
|
||||||
|
// when its associated search result is hovered.
|
||||||
|
struct SearchResultAction {
|
||||||
|
mojo_base.mojom.String16 tooltip_text;
|
||||||
|
gfx.mojom.ImageSkia image;
|
||||||
|
bool visible_on_hover;
|
||||||
|
};
|
||||||
|
|
||||||
|
// The Chrome app list (aka Launcher), is the place where user can find and
|
||||||
|
// organize all installed apps, or search for various types of information.
|
||||||
|
//
|
||||||
|
// For apps:
|
||||||
|
// The app list displays apps synced across devices based on a user account, in
|
||||||
|
// an order that can be modified by the user. It supports up-to-3-layer app
|
||||||
|
// organization, the root app list, folders, and apps:
|
||||||
|
// - Each app can stay in the root app list or a folder.
|
||||||
|
// - Each folder holds more than one apps, which means it'll automatically get
|
||||||
|
// removed when there's only one app left in it.
|
||||||
|
// - The OEM folder is a special folder where we cannot move items to/from it.
|
||||||
|
// And we cannot rename it.
|
||||||
|
// - Other folders are renamable.
|
||||||
|
// - Folders cannot hold folders.
|
||||||
|
// - Different items/folders never have a same GUID.
|
||||||
|
// - Every item/folder has a same GUID on different devices.
|
||||||
|
//
|
||||||
|
// For searching:
|
||||||
|
// The app list supports various kinds of searching (e.g. apps, onmibox, etc).
|
||||||
|
// And search results can be displayed in different formats (e.g. tiles, cards).
|
||||||
|
// - Result ids are url like string, e.g.
|
||||||
|
// "chrome-extension://mgndgikekgjfcpckkfioiadnlibdjbkf/",
|
||||||
|
// "play://hhbckbkcbnemggclionhhgaceohjfdkl", etc.
|
||||||
|
// - Different search results never have a same id.
|
||||||
|
// - Every search result has a same id on different devices.
|
||||||
|
// - Every search result can have a list of actions (e.g. install), see
|
||||||
|
// app_list::SearchResult::Action.
|
||||||
|
//
|
||||||
|
// Users can long press on any app list item or search result to show a context
|
||||||
|
// menu. A context menu has a list of commands (e.g. open, uninstall, etc.).
|
||||||
|
// - Different items/results may have different command lists.
|
||||||
|
// - Each item/result usually has a same command list, but not always. Consider
|
||||||
|
// when we pin an app to the shelf and when we unpin it, the context menu
|
||||||
|
// looks different.
|
||||||
|
// - Inside each command list, each command has its own unique command id.
|
||||||
|
// - A same command in different command lists has a unique command id, see
|
||||||
|
// app_list::AppContextMenu::CommandId.
|
||||||
|
|
||||||
|
// The Chrome app list has its UI running in Ash, and everything else running in
|
||||||
|
// Chrome (e.g. syncing, user profile, etc). This controller is implemented in
|
||||||
|
// Ash to handle calls from Chrome. These include:
|
||||||
|
// - When app list data changes in Chrome, it should notifies the UI models and
|
||||||
|
// views in Ash to get updated. This can happen while syncing, searching, etc.
|
||||||
|
// - When Chrome needs real-time UI information from Ash. This can happen while
|
||||||
|
// calculating recommended search results based on the app list item order.
|
||||||
|
// - When app list states in Chrome change that require UI's response. This can
|
||||||
|
// happen while installing/uninstalling apps and the app list gets toggled.
|
||||||
|
interface AppListController {
|
||||||
|
// Sets a client to handle calls from Ash.
|
||||||
|
SetClient(AppListClient client);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces that come from AppListModelUpdater:
|
||||||
|
// The following interfaces are called to update the app list model in Ash,
|
||||||
|
// including both the app list item model, search result model and search box
|
||||||
|
// model.
|
||||||
|
// Adds an item to AppListModel.
|
||||||
|
AddItem(AppListItemMetadata app_item);
|
||||||
|
// Adds an item into a certain folder in AppListModel.
|
||||||
|
AddItemToFolder(AppListItemMetadata app_item, string folder_id);
|
||||||
|
// Removes an item by its id from AppListModel.
|
||||||
|
RemoveItem(string id);
|
||||||
|
// Removes an item by its id, and also cleans up if its parent folder has a
|
||||||
|
// single child left.
|
||||||
|
RemoveUninstalledItem(string id);
|
||||||
|
// Moves the item with |id| to the folder with |folder_id|.
|
||||||
|
MoveItemToFolder(string id, string folder_id);
|
||||||
|
// Tells Ash what the current status of AppListModel should be,
|
||||||
|
// e.g. the model is under synchronization or in normal status.
|
||||||
|
SetStatus(AppListModelStatus status);
|
||||||
|
// Tells Ash what the current state of the app list should be,
|
||||||
|
// e.g. the user is searching for something, or showing apps, etc.
|
||||||
|
SetState(AppListState state);
|
||||||
|
// Highlights the given item in the app list. If not present and it is later
|
||||||
|
// added, the item will be highlighted after being added.
|
||||||
|
HighlightItemInstalledFromUI(string id);
|
||||||
|
// Sets whether the search engine is Google or not.
|
||||||
|
SetSearchEngineIsGoogle(bool is_google);
|
||||||
|
// Sets the text for screen readers on the search box, and updates the
|
||||||
|
// accessible names.
|
||||||
|
SetSearchTabletAndClamshellAccessibleName(
|
||||||
|
mojo_base.mojom.String16 tablet_accessible_name,
|
||||||
|
mojo_base.mojom.String16 clamshell_accessible_name);
|
||||||
|
// Sets the hint text to display when there is in input.
|
||||||
|
SetSearchHintText(mojo_base.mojom.String16 hint_text);
|
||||||
|
// Sets the text for the search box's Textfield and the voice search flag.
|
||||||
|
UpdateSearchBox(mojo_base.mojom.String16 text, bool initiated_by_user);
|
||||||
|
// Publishes search results to Ash to render them.
|
||||||
|
PublishSearchResults(array<SearchResultMetadata> results);
|
||||||
|
// Update the whole model, usually when profile changes happen in Chrome.
|
||||||
|
SetModelData(int32 profile_id,
|
||||||
|
array<AppListItemMetadata> apps,
|
||||||
|
bool is_search_engine_google);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces only used by ChromeAppListItem:
|
||||||
|
// These interfaces are called when an item's data is updated in Chrome.
|
||||||
|
// Updates an item's metadata (e.g. name, position, etc).
|
||||||
|
SetItemMetadata(string id, AppListItemMetadata metadata);
|
||||||
|
// Updates an item's icon.
|
||||||
|
SetItemIcon(string id, gfx.mojom.ImageSkia? icon);
|
||||||
|
// Updates whether an item is installing.
|
||||||
|
SetItemIsInstalling(string id, bool is_installing);
|
||||||
|
// Updates the downloaded percentage of an item.
|
||||||
|
SetItemPercentDownloaded(string id, int32 percent_downloaded);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces for item querying:
|
||||||
|
// Returns a map from each item's id to its shown index in the app list.
|
||||||
|
GetIdToAppListIndexMap() => (map<string, uint16> indices);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces for AppListSyncableService:
|
||||||
|
// These interfaces are called while dealing with the OEM folder in the
|
||||||
|
// AppListSyncableService in Chrome.
|
||||||
|
// Finds the OEM folder or creates one if it doesn't exist.
|
||||||
|
// |oem_folder_name|: the expected name of the OEM folder while creating.
|
||||||
|
// |preferred_oem_position|: the preferred position of the OEM folder while
|
||||||
|
// creating; if it's invalid then the final position
|
||||||
|
// is determined in Ash.
|
||||||
|
// |oem_folder|: the meta data of the existing/created OEM folder.
|
||||||
|
FindOrCreateOemFolder(
|
||||||
|
string oem_folder_name,
|
||||||
|
syncer.mojom.StringOrdinal preferred_oem_position)
|
||||||
|
=> (AppListItemMetadata oem_folder);
|
||||||
|
// Resolves the position of the OEM folder.
|
||||||
|
// |preferred_oem_position|: the preferred position of the OEM folder; if it's
|
||||||
|
// invalid then the final position is determined in
|
||||||
|
// Ash.
|
||||||
|
// |oem_folder|: the meta data of the OEM folder, or null if it doesn't exist.
|
||||||
|
ResolveOemFolderPosition(
|
||||||
|
syncer.mojom.StringOrdinal preferred_oem_position)
|
||||||
|
=> (AppListItemMetadata? oem_folder);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces for ChromeSearchReult:
|
||||||
|
SetSearchResultMetadata(SearchResultMetadata metadata);
|
||||||
|
SetSearchResultIsInstalling(string result_id, bool is_installing);
|
||||||
|
SetSearchResultPercentDownloaded(string result_id, int32 percent_downloaded);
|
||||||
|
NotifySearchResultItemInstalled(string result_id);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces for views:
|
||||||
|
// Dismisses the app list.
|
||||||
|
DismissAppList();
|
||||||
|
// Returns bounds of a rectangle to show an AppInfo dialog.
|
||||||
|
GetAppInfoDialogBounds() => (gfx.mojom.Rect bounds);
|
||||||
|
// Shows the app list and switches to |state|.
|
||||||
|
ShowAppListAndSwitchToState(AppListState state);
|
||||||
|
// Shows the app list.
|
||||||
|
ShowAppList();
|
||||||
|
};
|
||||||
|
|
||||||
|
// In contrast to AppListController, this client is implemented in Chrome to
|
||||||
|
// handle calls from Ash. These include:
|
||||||
|
// - When Chrome components are needed to get involved in the user's actions on
|
||||||
|
// app list views. This can happen while the user is searching, clicking on
|
||||||
|
// any app list item, etc.
|
||||||
|
// - When view changes in Ash and we want to notify Chrome. This can happen
|
||||||
|
// while app list is performing animations.
|
||||||
|
// - When a user action on views need information from Chrome to complete. This
|
||||||
|
// can happen while populating context menu models, which depends on item data
|
||||||
|
// in Chrome.
|
||||||
|
interface AppListClient {
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces on searching:
|
||||||
|
// Triggers a search query.
|
||||||
|
// |trimmed_query|: the trimmed input texts from the search text field.
|
||||||
|
StartSearch(mojo_base.mojom.String16 trimmed_query);
|
||||||
|
// Opens a search result and logs to metrics when its view is clicked or
|
||||||
|
// pressed.
|
||||||
|
// |result_id|: the id of the search result the user wants to open.
|
||||||
|
// |launched_from|: where the result was launched.
|
||||||
|
// |launch_type|: how the result is represented in the UI.
|
||||||
|
// |suggestion_index|: the position of the result as a suggestion chip in
|
||||||
|
// the AppsGridView or the position of the result in the zero state search
|
||||||
|
// page.
|
||||||
|
OpenSearchResult(string result_id, int32 event_flags,
|
||||||
|
AppListLaunchedFrom launched_from,
|
||||||
|
AppListLaunchType launch_type, int32 suggestion_index);
|
||||||
|
// Invokes a custom action on a result with |result_id|.
|
||||||
|
// |action_index| corresponds to the index of an action on the search result,
|
||||||
|
// for example, installing. They are stored in SearchResult::actions_.
|
||||||
|
InvokeSearchResultAction(string result_id,
|
||||||
|
int32 action_index,
|
||||||
|
int32 event_flags);
|
||||||
|
// Returns the context menu model for the search result with |result_id|, or
|
||||||
|
// an empty array if there is currently no menu for the result.
|
||||||
|
GetSearchResultContextMenuModel(string result_id) => (array<MenuItem> items);
|
||||||
|
// Invoked when a context menu item of a search result is clicked.
|
||||||
|
// |result_id|: the clicked search result's id.
|
||||||
|
// |command_id|: the clicked menu item's command id.
|
||||||
|
// |event_flags|: flags from the event which triggered this command.
|
||||||
|
SearchResultContextMenuItemSelected(string result_id,
|
||||||
|
int32 command_id,
|
||||||
|
int32 event_flags);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces on the app list UI:
|
||||||
|
// Invoked when the app list is shown in the display with |display_id|.
|
||||||
|
ViewShown(int64 display_id);
|
||||||
|
// Invoked when the app list is closed.
|
||||||
|
ViewClosing();
|
||||||
|
// Notifies target visibility changes of the app list.
|
||||||
|
OnAppListTargetVisibilityChanged(bool visible);
|
||||||
|
// Notifies visibility changes of the app list.
|
||||||
|
OnAppListVisibilityChanged(bool visible);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Interfaces on app list items. |profile_id| indicates the profile to which
|
||||||
|
// app list items belong. In multi-profile mode, each profile has its own
|
||||||
|
// app list model updater:
|
||||||
|
// Activates (opens) the item with |id|.
|
||||||
|
ActivateItem(int32 profile_id, string id, int32 event_flags);
|
||||||
|
// Returns the context menu model for the item with |id|, or an empty array if
|
||||||
|
// there is currently no menu for the item (e.g. during install).
|
||||||
|
GetContextMenuModel(int32 profile_id, string id) => (array<MenuItem> items);
|
||||||
|
// Invoked when a context menu item of an app list item is clicked.
|
||||||
|
// |id|: the clicked AppListItem's id.
|
||||||
|
// |command_id|: the clicked menu item's command id.
|
||||||
|
// |event_flags|: flags from the event which triggered this command.
|
||||||
|
ContextMenuItemSelected(int32 profile_id,
|
||||||
|
string id,
|
||||||
|
int32 command_id,
|
||||||
|
int32 event_flags);
|
||||||
|
// Invoked when a folder is created in Ash (e.g. merge items into a folder).
|
||||||
|
OnFolderCreated(int32 profile_id, AppListItemMetadata folder);
|
||||||
|
// Invoked when a folder has only one item left and so gets removed.
|
||||||
|
OnFolderDeleted(int32 profile_id, AppListItemMetadata folder);
|
||||||
|
// Invoked when user changes a folder's name or an item's position.
|
||||||
|
OnItemUpdated(int32 profile_id, AppListItemMetadata folder);
|
||||||
|
// Invoked when a "page break" item is added with |id| and |position|.
|
||||||
|
OnPageBreakItemAdded(int32 profile_id,
|
||||||
|
string id,
|
||||||
|
syncer.mojom.StringOrdinal position);
|
||||||
|
// Invoked when a "page break" item with |id| is deleted.
|
||||||
|
OnPageBreakItemDeleted(int32 profile_id, string id);
|
||||||
|
|
||||||
|
// Updated when item with |id| is set to |visible|. Only sent if
|
||||||
|
// |notify_visibility_change| was set on the SearchResultMetadata.
|
||||||
|
OnSearchResultVisibilityChanged(string id, bool visibility);
|
||||||
|
|
||||||
|
// Acquires a NavigableContentsFactory (indirectly) from the Content Service
|
||||||
|
// to allow the app list to display embedded web contents. Currently used only
|
||||||
|
// for answer card search results.
|
||||||
|
GetNavigableContentsFactory(content.mojom.NavigableContentsFactory& request);
|
||||||
|
};
|
21
src/ash/public/interfaces/app_list.typemap
Normal file
21
src/ash/public/interfaces/app_list.typemap
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
mojom = "//ash/public/interfaces/app_list.mojom"
|
||||||
|
public_headers = [ "//ash/public/cpp/app_list/app_list_types.h" ]
|
||||||
|
traits_headers = [ "//ash/public/cpp/app_list/app_list_struct_traits.h" ]
|
||||||
|
sources = [
|
||||||
|
"//ash/public/cpp/app_list/app_list_struct_traits.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//ui/gfx/range/mojo:struct_traits",
|
||||||
|
]
|
||||||
|
type_mappings = [
|
||||||
|
"ash.mojom.AppListState=ash::AppListState",
|
||||||
|
"ash.mojom.AppListModelStatus=ash::AppListModelStatus",
|
||||||
|
"ash.mojom.SearchResultType=ash::SearchResultType",
|
||||||
|
"ash.mojom.SearchResultDisplayType=ash::SearchResultDisplayType",
|
||||||
|
"ash.mojom.SearchResultTag=ash::SearchResultTag",
|
||||||
|
"ash.mojom.SearchResultAction=ash::SearchResultAction",
|
||||||
|
]
|
22
src/ash/public/interfaces/arc_custom_tab.mojom
Normal file
22
src/ash/public/interfaces/arc_custom_tab.mojom
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2019 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "mojo/public/mojom/base/unguessable_token.mojom";
|
||||||
|
|
||||||
|
// An interface that an ash user uses to interact with each ARC custom tab.
|
||||||
|
interface ArcCustomTabView {
|
||||||
|
// Embeds the remote view specified by the token.
|
||||||
|
EmbedUsingToken(mojo_base.mojom.UnguessableToken token);
|
||||||
|
};
|
||||||
|
|
||||||
|
// An exported object in ash which lets an ash consumer set a client interface.
|
||||||
|
interface ArcCustomTabController {
|
||||||
|
// Creates an ArcCustomTabView instance for the ARC window specified by the
|
||||||
|
// task ID and the surface ID.
|
||||||
|
// May return null when the arguments are invalid.
|
||||||
|
CreateView(int32 task_id, int32 surface_id, int32 top_margin)
|
||||||
|
=> (ArcCustomTabView? controller);
|
||||||
|
};
|
18
src/ash/public/interfaces/ash_display_controller.mojom
Normal file
18
src/ash/public/interfaces/ash_display_controller.mojom
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// Allows configuring various display related state.
|
||||||
|
interface AshDisplayController {
|
||||||
|
// ============================ Virtual Terminal ============================
|
||||||
|
|
||||||
|
// Take control of all display output. This is called when switching from the
|
||||||
|
// virtual terminal back to Chrome in response to a dbus message.
|
||||||
|
TakeDisplayControl() => (bool status);
|
||||||
|
|
||||||
|
// Relinquish control of all display output. This is called when switching
|
||||||
|
// from Chrome to the virtual terminal in response to a dbus message.
|
||||||
|
RelinquishDisplayControl() => (bool status);
|
||||||
|
};
|
101
src/ash/public/interfaces/ash_message_center_controller.mojom
Normal file
101
src/ash/public/interfaces/ash_message_center_controller.mojom
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/arc/common/notifications.mojom";
|
||||||
|
import "ui/gfx/image/mojo/image.mojom";
|
||||||
|
import "ui/message_center/public/mojo/notification.mojom";
|
||||||
|
import "ui/message_center/public/mojo/notifier_id.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "mojo/public/mojom/base/unguessable_token.mojom";
|
||||||
|
|
||||||
|
// A struct that contains information for presenting a notifier in a settings
|
||||||
|
// panel.
|
||||||
|
struct NotifierUiData {
|
||||||
|
// The notifier (e.g. an extension).
|
||||||
|
message_center.mojom.NotifierId notifier_id;
|
||||||
|
|
||||||
|
// The user-visible name of the notifier (e.g. an extension's name).
|
||||||
|
mojo_base.mojom.String16 name;
|
||||||
|
|
||||||
|
// True if notifications from the notifier are presently enabled.
|
||||||
|
bool enabled;
|
||||||
|
|
||||||
|
// True if the setting is enforced by administrator and the user can't change.
|
||||||
|
bool enforced;
|
||||||
|
|
||||||
|
// An icon displayed next to the name.
|
||||||
|
gfx.mojom.ImageSkia? icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
// The message center controller funnels notification requests from the client
|
||||||
|
// to the MessageCenter.
|
||||||
|
interface AshMessageCenterController {
|
||||||
|
SetClient(associated AshMessageCenterClient client);
|
||||||
|
|
||||||
|
// Sets the ARC notification instance.
|
||||||
|
SetArcNotificationsInstance(arc.mojom.NotificationsInstance instance);
|
||||||
|
|
||||||
|
// Shows a notification. |display_token| will be used to reference this
|
||||||
|
// notification for AshMessageCenterClient::Close().
|
||||||
|
ShowClientNotification(message_center.mojom.Notification notification,
|
||||||
|
mojo_base.mojom.UnguessableToken display_token);
|
||||||
|
|
||||||
|
// Closes a notification by the notification ID.
|
||||||
|
CloseClientNotification(string id);
|
||||||
|
|
||||||
|
UpdateNotifierIcon(message_center.mojom.NotifierId notifier_id,
|
||||||
|
gfx.mojom.ImageSkia icon);
|
||||||
|
|
||||||
|
NotifierEnabledChanged(message_center.mojom.NotifierId notifier_id,
|
||||||
|
bool enabled);
|
||||||
|
|
||||||
|
// Gets a list of all the notifications in the message center.
|
||||||
|
GetActiveNotifications() =>
|
||||||
|
(array<message_center.mojom.Notification> notifications);
|
||||||
|
|
||||||
|
// Changes the quiet mode state in the message center.
|
||||||
|
SetQuietMode(bool enabled);
|
||||||
|
};
|
||||||
|
|
||||||
|
// The message center client interface mimics
|
||||||
|
// message_center::NotificationDelegate. The ID strings match the id passed in
|
||||||
|
// |notification| in ShowClientNotification and the format of the ID is up to
|
||||||
|
// the client.
|
||||||
|
interface AshMessageCenterClient {
|
||||||
|
// Called when a notification previously displayed by the client is closed.
|
||||||
|
HandleNotificationClosed(mojo_base.mojom.UnguessableToken display_token,
|
||||||
|
bool by_user);
|
||||||
|
|
||||||
|
// Called when the body of a notification is clicked.
|
||||||
|
HandleNotificationClicked(string id);
|
||||||
|
|
||||||
|
// Called when a notification that has buttons (e.g., "Learn more") receives a
|
||||||
|
// click on one of the buttons. |reply| is a user-provided string for cases
|
||||||
|
// where the button had a text input field attached to it.
|
||||||
|
HandleNotificationButtonClicked(string id, int32 button_index,
|
||||||
|
mojo_base.mojom.String16? reply);
|
||||||
|
|
||||||
|
// Called when a notification's settings button has been pressed (and the
|
||||||
|
// handler is SettingsButtonHandler::DELEGATE).
|
||||||
|
HandleNotificationSettingsButtonClicked(string id);
|
||||||
|
|
||||||
|
// Called when a notification has been disabled (via inline settings).
|
||||||
|
DisableNotification(string id);
|
||||||
|
|
||||||
|
// Called when a user enables or disables notifications from the given
|
||||||
|
// notifier.
|
||||||
|
SetNotifierEnabled(message_center.mojom.NotifierId notifier_id, bool enabled);
|
||||||
|
|
||||||
|
// Asks the client for a list of notifiers and associated UI information to be
|
||||||
|
// displayed in a settings panel.
|
||||||
|
GetNotifierList() => (array<NotifierUiData> notifiers);
|
||||||
|
|
||||||
|
// Gets ARC app id from a given package name.
|
||||||
|
GetArcAppIdByPackageName(string package_name) => (string app_id);
|
||||||
|
|
||||||
|
// Show the lockscreen notification setting on the Chrome OS setting.
|
||||||
|
ShowLockScreenNotificationSettings();
|
||||||
|
};
|
58
src/ash/public/interfaces/ash_window_manager.mojom
Normal file
58
src/ash/public/interfaces/ash_window_manager.mojom
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/menu.mojom";
|
||||||
|
import "ui/events/mojo/event_constants.mojom";
|
||||||
|
|
||||||
|
// The previewed snap state for a window, corresponding to the use of a
|
||||||
|
// PhantomWindowController.
|
||||||
|
enum SnapDirection {
|
||||||
|
kNone, // No snap preview.
|
||||||
|
kLeft, // The phantom window controller is previewing a snap to the left.
|
||||||
|
kRight, // The phantom window controller is previewing a snap to the left.
|
||||||
|
};
|
||||||
|
|
||||||
|
enum OrientationLockType {
|
||||||
|
kAny,
|
||||||
|
kNatural,
|
||||||
|
kCurrent,
|
||||||
|
kPortrait,
|
||||||
|
kLandscape,
|
||||||
|
kPortraitPrimary,
|
||||||
|
kPortraitSecondary,
|
||||||
|
kLandscapePrimary,
|
||||||
|
kLandscapeSecondary,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface exposed via WindowTree::BindWindowManagerInterface(). This
|
||||||
|
// interface is used for functionality specific to Ash that is associated with
|
||||||
|
// windows created by the window service.
|
||||||
|
interface AshWindowManager {
|
||||||
|
AddWindowToTabletMode(uint64 window_id);
|
||||||
|
|
||||||
|
ShowSnapPreview(uint64 window_id, SnapDirection snap);
|
||||||
|
|
||||||
|
CommitSnap(uint64 window_id, SnapDirection snap);
|
||||||
|
|
||||||
|
// Locks or unlocks the screen orientation. The provided window is the source
|
||||||
|
// of the orientation request and need not be a top level window, but the
|
||||||
|
// client connection type must not be an embedding (i.e. renderer).
|
||||||
|
LockOrientation(uint64 window_id, OrientationLockType type);
|
||||||
|
UnlockOrientation(uint64 window_id);
|
||||||
|
|
||||||
|
// Maximizes the window in response to a double click or tap on the HTCAPTION
|
||||||
|
// area.
|
||||||
|
MaximizeWindowByCaptionClick(uint64 window_id, ui.mojom.PointerKind pointer);
|
||||||
|
|
||||||
|
// Plays the window bounce animation (scale the window up and down).
|
||||||
|
BounceWindow(uint64 window_id);
|
||||||
|
|
||||||
|
// Sets the context menu items to be displayed on a window's frame, for
|
||||||
|
// windows where the frame is provided by Ash. |delegate| handles interaction
|
||||||
|
// with the menu.
|
||||||
|
SetWindowFrameMenuItems(uint64 window_id, array<MenuItem> menu_items,
|
||||||
|
MenuDelegate delegate);
|
||||||
|
};
|
93
src/ash/public/interfaces/assistant_controller.mojom
Normal file
93
src/ash/public/interfaces/assistant_controller.mojom
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/assistant_image_downloader.mojom";
|
||||||
|
import "ash/public/interfaces/assistant_setup.mojom";
|
||||||
|
import "chromeos/services/assistant/public/mojom/assistant.mojom";
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
// Interface to AssistantController which is owned by Shell in Ash. This is
|
||||||
|
// typically used by the Assistant service to provide the controller with an
|
||||||
|
// interface to itself, as well as by the Assistant client in chrome/browser to
|
||||||
|
// provide interfaces to delegates which depend on browser.
|
||||||
|
interface AssistantController {
|
||||||
|
// Provides a reference to the underlying |assistant| service.
|
||||||
|
SetAssistant(chromeos.assistant.mojom.Assistant assistant);
|
||||||
|
|
||||||
|
// Provides an interface to the |assistant_image_downloader| owned by
|
||||||
|
// AssistantClient.
|
||||||
|
SetAssistantImageDownloader(
|
||||||
|
AssistantImageDownloader assistant_image_downloader);
|
||||||
|
|
||||||
|
// Opens Google Assistant settings.
|
||||||
|
OpenAssistantSettings();
|
||||||
|
|
||||||
|
// Show speaker id enrollment flow.
|
||||||
|
StartSpeakerIdEnrollmentFlow();
|
||||||
|
|
||||||
|
// Send Assistant feedback to Assistant server. If |pii_allowed| is
|
||||||
|
// true then the user gives permission to attach Assistant debug info.
|
||||||
|
// |feedback_description| is user's feedback input.
|
||||||
|
SendAssistantFeedback(
|
||||||
|
bool pii_allowed,
|
||||||
|
string feedback_description,
|
||||||
|
string screenshot_png);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface to the AssistantAlarmTimerController which is owned by the
|
||||||
|
// AssistantController. Currently used by the Assistant service to notify Ash
|
||||||
|
// of changes to the underlying alarm/timer state in LibAssistant.
|
||||||
|
interface AssistantAlarmTimerController {
|
||||||
|
// Invoked when a timer has started sounding.
|
||||||
|
OnTimerSoundingStarted();
|
||||||
|
|
||||||
|
// Invoked when a timer has finished sounding.
|
||||||
|
OnTimerSoundingFinished();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface to the AssistantNotificationController which is owned by the
|
||||||
|
// AssistantController. Currently used by the Assistant service to modify
|
||||||
|
// Assistant notification state in Ash in response to LibAssistant events.
|
||||||
|
interface AssistantNotificationController {
|
||||||
|
// Requests that the specified |notification| be added or updated. If the
|
||||||
|
// |client_id| for |notification| matches that of an existing notification,
|
||||||
|
// an update will occur. Otherwise, a new notification will be added.
|
||||||
|
AddOrUpdateNotification(
|
||||||
|
chromeos.assistant.mojom.AssistantNotification notification);
|
||||||
|
|
||||||
|
// Requests that the notification uniquely identified by |id| be removed. If
|
||||||
|
// |from_server| is true the request to remove was initiated by the server.
|
||||||
|
RemoveNotificationById(string id, bool from_server);
|
||||||
|
|
||||||
|
// Requests that all notifications associated with the given |grouping_key|
|
||||||
|
// be removed. If |from_server| is true the request to remove was initiated
|
||||||
|
// by the server.
|
||||||
|
RemoveNotificationByGroupingKey(string grouping_key, bool from_server);
|
||||||
|
|
||||||
|
// Requests that all notifications be removed. If |from_server| is true the
|
||||||
|
// request was initiated by the server.
|
||||||
|
RemoveAllNotifications(bool from_server);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface to the AssistantScreenContextController which is owned by the
|
||||||
|
// AssistantController. Currently used by the Assistant service to request
|
||||||
|
// screenshots.
|
||||||
|
interface AssistantScreenContextController {
|
||||||
|
// Requests a screenshot of the region enclosed by |rect| and returns the
|
||||||
|
// screenshot encoded in JPEG format. If |rect| is empty, it returns a
|
||||||
|
// fullscreen screenshot.
|
||||||
|
RequestScreenshot(gfx.mojom.Rect rect) => (array<uint8> screenshot);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface to the AssistantSetupController which is owned by the
|
||||||
|
// AssistantController. Currently used by AssistantSetup in chrome/browser
|
||||||
|
// to provide an interface to itself. This is used for triggering a runtime
|
||||||
|
// onboarding flow.
|
||||||
|
interface AssistantSetupController {
|
||||||
|
// Provides an interface to the |assistant_setup| owned by AssistantClient
|
||||||
|
// in chrome/browser.
|
||||||
|
SetAssistantSetup(AssistantSetup assistant_setup);
|
||||||
|
};
|
20
src/ash/public/interfaces/assistant_image_downloader.mojom
Normal file
20
src/ash/public/interfaces/assistant_image_downloader.mojom
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
import "ui/gfx/image/mojo/image.mojom";
|
||||||
|
import "url/mojom/url.mojom";
|
||||||
|
|
||||||
|
// Interface for a class which is responsible for downloading images on behalf
|
||||||
|
// of the Assistant UI in ash.
|
||||||
|
interface AssistantImageDownloader {
|
||||||
|
// Downloads the image found at |url| for the profile associated with
|
||||||
|
// |account_id|. On completion, the supplied callback is run with the
|
||||||
|
// downloaded |image|. In the event that the download attempt fails, a NULL
|
||||||
|
// image will be returned.
|
||||||
|
Download(signin.mojom.AccountId account_id, url.mojom.Url url)
|
||||||
|
=> (gfx.mojom.ImageSkia image);
|
||||||
|
};
|
22
src/ash/public/interfaces/assistant_setup.mojom
Normal file
22
src/ash/public/interfaces/assistant_setup.mojom
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
enum FlowType {
|
||||||
|
// The whole consent flow.
|
||||||
|
CONSENT_FLOW,
|
||||||
|
// The speaker id enrollment flow.
|
||||||
|
SPEAKER_ID_ENROLLMENT,
|
||||||
|
// The speaker id retrain flow.
|
||||||
|
SPEAKER_ID_RETRAIN,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for a class which is responsible for start Assistant OptIn flow.
|
||||||
|
interface AssistantSetup {
|
||||||
|
// Start the assistant setup flow.
|
||||||
|
// |completed| is true if the user has completed the entire flow and opted in
|
||||||
|
// to using assistant.
|
||||||
|
StartAssistantOptInFlow(FlowType type) => (bool completed);
|
||||||
|
};
|
27
src/ash/public/interfaces/assistant_volume_control.mojom
Normal file
27
src/ash/public/interfaces/assistant_volume_control.mojom
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// Interface to control system volume through Ash.
|
||||||
|
interface AssistantVolumeControl {
|
||||||
|
// Sets system volume to |volume|, which is between 0 - 100.
|
||||||
|
SetVolume(int32 volume, bool user_initiated);
|
||||||
|
|
||||||
|
// Sets mute state to |muted|.
|
||||||
|
SetMuted(bool muted);
|
||||||
|
|
||||||
|
// Adds volume observer. The observer will be immediately notified of volume
|
||||||
|
// and mute status when added.
|
||||||
|
AddVolumeObserver(VolumeObserver observer);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Observes volume state changes.
|
||||||
|
interface VolumeObserver {
|
||||||
|
// Called when volume is updated.
|
||||||
|
OnVolumeChanged(int32 volume);
|
||||||
|
|
||||||
|
// Called when mute state changed.
|
||||||
|
OnMuteStateChanged(bool muted);
|
||||||
|
};
|
78
src/ash/public/interfaces/cast_config.mojom
Normal file
78
src/ash/public/interfaces/cast_config.mojom
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// The type of icon the sink is associated with. These values match
|
||||||
|
// media_router::SinkIconType.
|
||||||
|
enum SinkIconType {
|
||||||
|
CAST = 0,
|
||||||
|
CAST_AUDIO_GROUP = 1,
|
||||||
|
CAST_AUDIO = 2,
|
||||||
|
MEETING = 3,
|
||||||
|
HANGOUT = 4,
|
||||||
|
EDUCATION = 5,
|
||||||
|
WIRED_DISPLAY = 6,
|
||||||
|
GENERIC = 7
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CastSink {
|
||||||
|
string id;
|
||||||
|
string name;
|
||||||
|
string domain;
|
||||||
|
|
||||||
|
// Icon which describes the type of sink media is being routed to.
|
||||||
|
SinkIconType sink_icon_type = SinkIconType.GENERIC;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ContentSource {
|
||||||
|
UNKNOWN,
|
||||||
|
TAB,
|
||||||
|
DESKTOP
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CastRoute {
|
||||||
|
string id;
|
||||||
|
string title;
|
||||||
|
|
||||||
|
// Is the activity source this computer? ie, are we mirroring the display?
|
||||||
|
bool is_local_source = false;
|
||||||
|
|
||||||
|
// What is source of the content? For example, we could be DIAL casting a
|
||||||
|
// tab or mirroring the entire desktop.
|
||||||
|
ContentSource content_source = ContentSource.UNKNOWN;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SinkAndRoute {
|
||||||
|
CastSink sink;
|
||||||
|
CastRoute route;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows clients (e.g. Chrome browser) to interface with the cast item in the
|
||||||
|
// system tray.
|
||||||
|
interface CastConfig {
|
||||||
|
// Sets the client interface. This client interface will receive commands from
|
||||||
|
// ash and provide OnDevicesUpdated() calls.
|
||||||
|
SetClient(associated CastConfigClient client);
|
||||||
|
|
||||||
|
// Invoked whenever there is new sink or route information available.
|
||||||
|
OnDevicesUpdated(array<SinkAndRoute> device);
|
||||||
|
};
|
||||||
|
|
||||||
|
// This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|,
|
||||||
|
// to access the cast system.
|
||||||
|
//
|
||||||
|
// TODO(erg): Eventually, this should no longer be exported by chrome, but
|
||||||
|
// should be exported by a separate cast service.
|
||||||
|
interface CastConfigClient {
|
||||||
|
// Request fresh data from the backend. When the data is available, all
|
||||||
|
// registered observers will get called.
|
||||||
|
RequestDeviceRefresh();
|
||||||
|
|
||||||
|
// Initiate a casting session to |sink|.
|
||||||
|
CastToSink(CastSink sink);
|
||||||
|
|
||||||
|
// A user-initiated request to stop the given cast session.
|
||||||
|
StopCasting(CastRoute route);
|
||||||
|
};
|
7
src/ash/public/interfaces/constants.mojom
Normal file
7
src/ash/public/interfaces/constants.mojom
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
const string kServiceName = "ash";
|
275
src/ash/public/interfaces/cros_display_config.mojom
Normal file
275
src/ash/public/interfaces/cros_display_config.mojom
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
import "ui/display/mojo/display.mojom";
|
||||||
|
|
||||||
|
// All points, bounds, and insets are in display pixels unless otherwise
|
||||||
|
// sepcified.
|
||||||
|
|
||||||
|
// SetDisplayLayoutInfo or SetDisplayProperties result.
|
||||||
|
enum DisplayConfigResult {
|
||||||
|
kSuccess = 0,
|
||||||
|
kInvalidOperationError,
|
||||||
|
kInvalidDisplayIdError,
|
||||||
|
kUnifiedNotEnabledError,
|
||||||
|
kPropertyValueOutOfRangeError,
|
||||||
|
kNotSupportedOnInternalDisplayError,
|
||||||
|
kNegativeValueError,
|
||||||
|
kSetDisplayModeError,
|
||||||
|
kInvalidDisplayLayoutError,
|
||||||
|
kMirrorModeSingleDisplayError,
|
||||||
|
kMirrorModeSourceIdError,
|
||||||
|
kMirrorModeDestIdError,
|
||||||
|
kCalibrationNotAvailableError,
|
||||||
|
kCalibrationNotStartedError,
|
||||||
|
kCalibrationInProgressError,
|
||||||
|
kCalibrationInvalidDataError,
|
||||||
|
kCalibrationFailedError,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Describes how the displays are laid out.
|
||||||
|
enum DisplayLayoutMode {
|
||||||
|
// In normal mode displays are laid out as described by
|
||||||
|
// DisplayLayoutInfo.layouts.
|
||||||
|
kNormal = 0,
|
||||||
|
// In unified desktop mode, a single desktop will be stretched across all
|
||||||
|
// available displays.
|
||||||
|
kUnified,
|
||||||
|
// In mirrored mode, the display defined by DisplayLayoutInfo.mirrorSourceId
|
||||||
|
// will be mirrored in the displays defined by
|
||||||
|
// DisplayLayoutInfo.mirrorDestinationIds, or in all other displays if
|
||||||
|
// mirrorDestinationIds is empty.
|
||||||
|
kMirrored
|
||||||
|
};
|
||||||
|
|
||||||
|
// Describes a display edge.
|
||||||
|
enum DisplayLayoutPosition {
|
||||||
|
kTop = 0,
|
||||||
|
kRight,
|
||||||
|
kBottom,
|
||||||
|
kLeft
|
||||||
|
};
|
||||||
|
|
||||||
|
// Describes an overscan or touch calibration operation.
|
||||||
|
enum DisplayConfigOperation {
|
||||||
|
kStart = 0,
|
||||||
|
kAdjust,
|
||||||
|
kReset,
|
||||||
|
kComplete,
|
||||||
|
kShowNative,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines a pair of display + touch points used for touch calibration.
|
||||||
|
struct TouchCalibrationPair {
|
||||||
|
// The coordinates of the display point.
|
||||||
|
gfx.mojom.Point display_point;
|
||||||
|
// The coordinates of the touch point corresponding to the display point.
|
||||||
|
gfx.mojom.Point touch_point;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the data required for touch calibration.
|
||||||
|
struct TouchCalibration {
|
||||||
|
// Must contain exactly four pairs of touch calibration points.
|
||||||
|
array<TouchCalibrationPair> pairs;
|
||||||
|
// Width and height of the display area when the touch calibration was
|
||||||
|
// performed.
|
||||||
|
gfx.mojom.Size bounds;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the layout of a single display.
|
||||||
|
struct DisplayLayout {
|
||||||
|
// The unique identifier of the display.
|
||||||
|
string id;
|
||||||
|
// The unique identifier of the parent display. Empty for the root display.
|
||||||
|
string parent_id;
|
||||||
|
// The edge of the display that is shared with the parent display. Ignored for
|
||||||
|
// the root display.
|
||||||
|
DisplayLayoutPosition position;
|
||||||
|
// The offset of the display along the connected edge. 0 indicates that
|
||||||
|
// the topmost or leftmost corner is aligned.
|
||||||
|
int32 offset;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the layout mode and details.
|
||||||
|
struct DisplayLayoutInfo {
|
||||||
|
// The layout mode to use, see DisplayLayoutMode for details.
|
||||||
|
DisplayLayoutMode layout_mode;
|
||||||
|
// Ignored if If layout_mode is not kMirrored. Otherwise, if provided,
|
||||||
|
// specifies the unique identifier of the source display for mirroring. If
|
||||||
|
// not provided, mirror_destination_ids will be ignored and default ('normal')
|
||||||
|
// mirrored mode will be enabled.
|
||||||
|
string? mirror_source_id;
|
||||||
|
// Ignored if layout_mode is not kMirrored. Otherwise, if provided, specifies
|
||||||
|
// the unique identifiers of the displays to mirror the source display. If not
|
||||||
|
// provided or empty, all displays will mirror the source display.
|
||||||
|
array<string>? mirror_destination_ids;
|
||||||
|
// An array of layouts describing a directed graph of displays. Required if
|
||||||
|
// layout_mode is kNormal or kMirrored and not all displays are mirrored
|
||||||
|
// ('mixed' mode). Ignored if layout_mode is kUnified.
|
||||||
|
array<DisplayLayout>? layouts;
|
||||||
|
};
|
||||||
|
|
||||||
|
// EDID extracted parameters. Field description refers to "VESA ENHANCED
|
||||||
|
// EXTENDED DISPLAY IDENTIFICATION DATA STANDARD (Defines EDID Structure
|
||||||
|
// Version 1, Revision 4)" Release A, Revision 2 September 25, 2006.
|
||||||
|
// https://www.vesa.org/vesa-standards
|
||||||
|
struct Edid {
|
||||||
|
// Three character manufacturer code, Sec. 3.4.1 page 21.
|
||||||
|
string manufacturer_id;
|
||||||
|
// Two byte manufacturer-assigned code, Sec. 3.4.2 page 21.
|
||||||
|
string product_id;
|
||||||
|
// Year of manufacture. Sec. 3.4.4 page 22.
|
||||||
|
int32 year_of_manufacture;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Struct wrapper so that the property can be optional.
|
||||||
|
struct DisplayRotation {
|
||||||
|
display.mojom.Rotation rotation;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the properties for a display mode, i.e. a valid size and scale.
|
||||||
|
struct DisplayMode {
|
||||||
|
// The display mode size in device independent (user visible) pixels.
|
||||||
|
gfx.mojom.Size size;
|
||||||
|
// The display mode size in native pixels.
|
||||||
|
gfx.mojom.Size size_in_native_pixels;
|
||||||
|
// The display mode device scale factor.
|
||||||
|
double device_scale_factor;
|
||||||
|
// The display mode refresh rate in hertz.
|
||||||
|
double refresh_rate;
|
||||||
|
// True if the mode is the display's native mode.
|
||||||
|
bool is_native;
|
||||||
|
// True if the mode is interlaced.
|
||||||
|
bool is_interlaced;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the properties of an individual display, returned by
|
||||||
|
// GetDisplayLayoutInfo.
|
||||||
|
struct DisplayUnitInfo {
|
||||||
|
// The unique identifier of the display.
|
||||||
|
string id;
|
||||||
|
// The user-friendly name (e.g. "Acme LCD monitor").
|
||||||
|
string name;
|
||||||
|
// EDID properties when available.
|
||||||
|
Edid? edid;
|
||||||
|
// True if this is the primary display.
|
||||||
|
bool is_primary;
|
||||||
|
// True if this is an internal display.
|
||||||
|
bool is_internal;
|
||||||
|
// True if this display is enabled.
|
||||||
|
bool is_enabled;
|
||||||
|
// True when the display is in tablet mode.
|
||||||
|
bool is_tablet_mode;
|
||||||
|
// True if this display has a touch input device associated with it.
|
||||||
|
bool has_touch_support;
|
||||||
|
// True if this display has an accelerometer associated with it.
|
||||||
|
bool has_accelerometer_support;
|
||||||
|
// The number of pixels per inch along the x-axis.
|
||||||
|
double dpi_x;
|
||||||
|
// The number of pixels per inch along the y-axis.
|
||||||
|
double dpi_y;
|
||||||
|
// The display's clockwise rotation.
|
||||||
|
display.mojom.Rotation rotation;
|
||||||
|
// The display's logical bounds.
|
||||||
|
gfx.mojom.Rect bounds;
|
||||||
|
// The display's ovserscan insets within its screen's bounds.
|
||||||
|
gfx.mojom.Insets overscan;
|
||||||
|
// The usable work area of the display within the display bounds. Excludes
|
||||||
|
// areas of the display reserved for the OS, e.g. the taskbar and launcher.
|
||||||
|
gfx.mojom.Rect work_area;
|
||||||
|
// The index of the selected display mode.
|
||||||
|
int32 selected_display_mode_index;
|
||||||
|
// The list of available display modes.
|
||||||
|
array<DisplayMode> available_display_modes;
|
||||||
|
// The ratio between the display's current and default zoom. i.e. 1.0 is
|
||||||
|
// is equivalent to 100% zoom, and value 1.5 is equivalent to 150% zoom.
|
||||||
|
double display_zoom_factor;
|
||||||
|
// The list of allowed zoom factor values for the display.
|
||||||
|
array<double> available_display_zoom_factors;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Properties for configuring an individual display, used in
|
||||||
|
// SetDisplayProperties.
|
||||||
|
struct DisplayConfigProperties {
|
||||||
|
// If true, makes the display primary. No-op if set to false.
|
||||||
|
bool set_primary;
|
||||||
|
// If provided, sets the display's overscan insets to the provided value.
|
||||||
|
// Note: overscan values may not be negative or larger than a half of the
|
||||||
|
// screen's size. Overscan cannot be changed on the internal monitor.
|
||||||
|
gfx.mojom.Insets? overscan;
|
||||||
|
// If provided updates the display's rotation.
|
||||||
|
DisplayRotation? rotation;
|
||||||
|
// If provided, updates the display's logical bounds origin. Note: when
|
||||||
|
// updating the display origin, some constraints will be applied. so the final
|
||||||
|
// bounds origin may be different than the one set. The actual bounds will be
|
||||||
|
// reflected in DisplayUnitInfo. Cannot be changed on the primary display (or
|
||||||
|
// if set_primary is true).
|
||||||
|
gfx.mojom.Point? bounds_origin;
|
||||||
|
// If non zero, updates the zoom associated with the display. This zoom
|
||||||
|
// performs relayout and repaint thus resulting in a better quality zoom than
|
||||||
|
// just performing a pixel by pixel stretch enlargement.
|
||||||
|
double display_zoom_factor;
|
||||||
|
// Optional DisplayMode properties to set. This should match one of the
|
||||||
|
// modes listed in DisplayUnitInfo.available_display_modes. Other custom
|
||||||
|
// modes may or may not be valid.
|
||||||
|
DisplayMode? display_mode;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for configuring displays in Chrome OS. Currently this is
|
||||||
|
// implemented in Ash through classes owned by ash::Shell, but the interface
|
||||||
|
// should not have any Ash specific dependencies.
|
||||||
|
interface CrosDisplayConfigController {
|
||||||
|
// Observers are notified when the display layout or any display properties
|
||||||
|
// change.
|
||||||
|
AddObserver(associated CrosDisplayConfigObserver observer);
|
||||||
|
|
||||||
|
// Returns the display layout info, including the list of layouts.
|
||||||
|
GetDisplayLayoutInfo() => (DisplayLayoutInfo info);
|
||||||
|
|
||||||
|
// Sets the layout mode, mirroring, and layouts. Returns kSuccess if the
|
||||||
|
// layout is valid or an error value otherwise.
|
||||||
|
SetDisplayLayoutInfo(DisplayLayoutInfo info) => (DisplayConfigResult result);
|
||||||
|
|
||||||
|
// Returns the properties for all displays. If |single_unified| is true, a
|
||||||
|
// single display will be returned if the display layout is in unifed mode.
|
||||||
|
GetDisplayUnitInfoList(bool single_unified) =>
|
||||||
|
(array<DisplayUnitInfo> info_list);
|
||||||
|
|
||||||
|
// Sets |properties| for individual display with identifier |id|. Returns
|
||||||
|
// Success if the properties are valid or an error value otherwise.
|
||||||
|
SetDisplayProperties(string id, DisplayConfigProperties properties) =>
|
||||||
|
(DisplayConfigResult result);
|
||||||
|
|
||||||
|
// Enables or disables unified desktop mode. If the current display mode is
|
||||||
|
// kMirrored the mode will not be changed, if it is kNormal then the mode will
|
||||||
|
// be set to kUnified.
|
||||||
|
SetUnifiedDesktopEnabled(bool enabled);
|
||||||
|
|
||||||
|
// Starts, updates, completes, or resets overscan calibration for the display
|
||||||
|
// with identifier |display_id|. If |op| is kAdjust, |delta| describes the
|
||||||
|
// amount to change the overscan value. Runs the callback after performing the
|
||||||
|
// operation or on error.
|
||||||
|
OverscanCalibration(string display_id,
|
||||||
|
DisplayConfigOperation op,
|
||||||
|
gfx.mojom.Insets? delta) => (DisplayConfigResult result);
|
||||||
|
|
||||||
|
// Starts, completes, or resets touch calibration for the display with
|
||||||
|
// identifier |display_id|. If |op| is kShowNative shows the native
|
||||||
|
// calibration UI. Runs the callback after performing the operation or on
|
||||||
|
// error.
|
||||||
|
TouchCalibration(string display_id,
|
||||||
|
DisplayConfigOperation op,
|
||||||
|
TouchCalibration? calibration) =>
|
||||||
|
(DisplayConfigResult result);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for clients needing to be informed when the display configuration
|
||||||
|
// changes.
|
||||||
|
interface CrosDisplayConfigObserver {
|
||||||
|
// Called any time the display configuration changes.
|
||||||
|
OnDisplayConfigChanged();
|
||||||
|
};
|
32
src/ash/public/interfaces/display_output_protection.mojom
Normal file
32
src/ash/public/interfaces/display_output_protection.mojom
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// An interface for clients that are allowed to control the display output
|
||||||
|
// content protection. Multiple clients can request content protection at
|
||||||
|
// the same time, and the display will be protected until all clients are
|
||||||
|
// closed or set |desired_method_mask| to 0 with |SetContentProtection|.
|
||||||
|
interface DisplayOutputProtection {
|
||||||
|
// Queries link status and protection status.
|
||||||
|
// |link_mask| is the type of connected display links, which is a bitmask of
|
||||||
|
// DisplayConnectionType values.
|
||||||
|
// |protection_mask)| is the desired protection methods, which is a bitmask of
|
||||||
|
// the ContentProtectionMethod values.
|
||||||
|
// See //ui/display/types/display_constants.h for DisplayConnectionType and
|
||||||
|
// ContentProtectionMethod.
|
||||||
|
QueryContentProtectionStatus(int64 display_id) => (bool success,
|
||||||
|
uint32 link_mask,
|
||||||
|
uint32 protection_mask);
|
||||||
|
|
||||||
|
// Requests the desired protection methods.
|
||||||
|
// |protection_mask| is the desired protection methods, which is a bitmask
|
||||||
|
// of the ContentProtectionMethod values. When the interface is closed,
|
||||||
|
// the content protection mask will be reverted.
|
||||||
|
// Return true on success. Return false if it failed to make the protection
|
||||||
|
// request on the given display.
|
||||||
|
// See //ui/display/types/display_constants.h for ContentProtectionMethod.
|
||||||
|
SetContentProtection(int64 display_id,
|
||||||
|
uint32 desired_method_mask) => (bool success);
|
||||||
|
};
|
18
src/ash/public/interfaces/docked_magnifier_controller.mojom
Normal file
18
src/ash/public/interfaces/docked_magnifier_controller.mojom
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
// Used by a client (e.g. Chrome) to notify ash of focus change events of nodes
|
||||||
|
// in webpages.
|
||||||
|
interface DockedMagnifierController {
|
||||||
|
// Requests that the Docked Magnifier centers its viewport around this given
|
||||||
|
// screen point. This can be used by a client (e.g. Chrome) to notify ash of
|
||||||
|
// focus change events in e.g. webpages when feature is enabled. Note that ash
|
||||||
|
// observes the focus change events of the text input carets in editable nodes
|
||||||
|
// by itself.
|
||||||
|
CenterOnPoint(gfx.mojom.Point point_in_screen);
|
||||||
|
};
|
13
src/ash/public/interfaces/event_properties.mojom
Normal file
13
src/ash/public/interfaces/event_properties.mojom
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// This is added to KeyEvents that ash has an accelerator for. This is only used
|
||||||
|
// for accelerators ash does not handle immediately. That is, those the target
|
||||||
|
// is given priority to process.
|
||||||
|
// No value is set for this property, the presence indicates ash has an
|
||||||
|
// accelerator.
|
||||||
|
const string kWillProcessAccelerator_KeyEventProperty =
|
||||||
|
"ash:will-process-accelerator";
|
43
src/ash/public/interfaces/event_rewriter_controller.mojom
Normal file
43
src/ash/public/interfaces/event_rewriter_controller.mojom
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/events/mojo/event.mojom";
|
||||||
|
|
||||||
|
// Allows a client to implement spoken feedback features; used for ChromeVox.
|
||||||
|
interface SpokenFeedbackEventRewriterDelegate {
|
||||||
|
// Used to send key events to the ChromeVox extension. |capture| is true if
|
||||||
|
// the rewriter discarded the event, false if the rewriter continues event
|
||||||
|
// propagation.
|
||||||
|
DispatchKeyEventToChromeVox(ui.mojom.Event event, bool capture);
|
||||||
|
|
||||||
|
// Used to send mouse events to the ChromeVox extension.
|
||||||
|
DispatchMouseEventToChromeVox(ui.mojom.Event event);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows clients to toggle some event rewriting behavior.
|
||||||
|
interface EventRewriterController {
|
||||||
|
// Enables the KeyboardDrivenEventRewriter, which is disabled by default.
|
||||||
|
// This only applies when the user is on the login screen.
|
||||||
|
SetKeyboardDrivenEventRewriterEnabled(bool enabled);
|
||||||
|
|
||||||
|
// If true, Shift + Arrow keys are rewritten to Tab/Shift-Tab keys.
|
||||||
|
// This only applies when the KeyboardDrivenEventRewriter is active.
|
||||||
|
SetArrowToTabRewritingEnabled(bool enabled);
|
||||||
|
|
||||||
|
// Set the delegate used by the spoken feedback event rewriter.
|
||||||
|
SetSpokenFeedbackEventRewriterDelegate(
|
||||||
|
SpokenFeedbackEventRewriterDelegate delegate);
|
||||||
|
|
||||||
|
// Continue dispatch of key events that were unhandled by ChromeVox.
|
||||||
|
// TODO(crbug.com/839541): ChromeVox should not repost unhandled events.
|
||||||
|
OnUnhandledSpokenFeedbackEvent(ui.mojom.Event event);
|
||||||
|
|
||||||
|
// Discards key events and sends to spoken feedback when true.
|
||||||
|
CaptureAllKeysForSpokenFeedback(bool capture);
|
||||||
|
|
||||||
|
// Sends mouse events to ChromeVox when true.
|
||||||
|
SetSendMouseEventsToDelegate(bool value);
|
||||||
|
};
|
40
src/ash/public/interfaces/first_run_helper.mojom
Normal file
40
src/ash/public/interfaces/first_run_helper.mojom
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
// Allows clients to control pieces of the UI used in first-run tutorials.
|
||||||
|
// Exists because the first-run tutorial is a component extension run by
|
||||||
|
// Chrome. Methods exist here instead of on the Shelf or SystemTray interfaces
|
||||||
|
// due to small behavior differences (all methods only affect the primary
|
||||||
|
// display, opening the system tray bubble is persistent, etc.).
|
||||||
|
interface FirstRunHelper {
|
||||||
|
// Cleans up the ash UI on tutorial start.
|
||||||
|
Start(FirstRunHelperClient client);
|
||||||
|
|
||||||
|
// Restores the ash UI on tutorial stop.
|
||||||
|
Stop();
|
||||||
|
|
||||||
|
// Returns the bounds of the app list button on the primary display in screen
|
||||||
|
// coordinates.
|
||||||
|
GetAppListButtonBounds() => (gfx.mojom.Rect screen_bounds);
|
||||||
|
|
||||||
|
// Opens the system tray bubble menu to show the default view. Does nothing if
|
||||||
|
// the bubble is already open. The bubble stays open until explicitly closed.
|
||||||
|
// Returns bubble bounds in screen coordinates.
|
||||||
|
OpenTrayBubble() => (gfx.mojom.Rect screen_bounds);
|
||||||
|
|
||||||
|
// Closes the system tray bubble menu. Does nothing if the bubble is already
|
||||||
|
// closed.
|
||||||
|
CloseTrayBubble();
|
||||||
|
};
|
||||||
|
|
||||||
|
// The client for the FirstRunHelper interface, e.g. chrome.
|
||||||
|
interface FirstRunHelperClient {
|
||||||
|
// Informs the client that something happened inside ash that should cancel
|
||||||
|
// the tutorial (e.g. the device is shutting down).
|
||||||
|
OnCancelled();
|
||||||
|
};
|
29
src/ash/public/interfaces/highlighter_controller.mojom
Normal file
29
src/ash/public/interfaces/highlighter_controller.mojom
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
// Interface for ash client (e.g. Chrome) to connect to the highlighter
|
||||||
|
// controller, the component implementing on-screen content selection
|
||||||
|
// with a stylus.
|
||||||
|
interface HighlighterController {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(HighlighterControllerClient client);
|
||||||
|
|
||||||
|
// Exits the highlighter mode if it is currently enabled.
|
||||||
|
ExitHighlighterMode();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash to notify the client (e.g. Chrome) about the highlighter
|
||||||
|
// selection and state.
|
||||||
|
interface HighlighterControllerClient {
|
||||||
|
// Called when when a valid selection is made. Selected rectangle is in
|
||||||
|
// screen coordinates, clipped to screen bounds if necessary.
|
||||||
|
HandleSelection(gfx.mojom.Rect rect);
|
||||||
|
|
||||||
|
// Called when the highlighter tool becomes enabled or disabled.
|
||||||
|
HandleEnabledStateChange(bool enabled);
|
||||||
|
};
|
101
src/ash/public/interfaces/ime_controller.mojom
Normal file
101
src/ash/public/interfaces/ime_controller.mojom
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/ime_info.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "ui/base/ime/chromeos/public/interfaces/ime_keyset.mojom";
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
|
||||||
|
// Interface for ash client (e.g. Chrome) to send input method info to ash.
|
||||||
|
interface ImeController {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(ImeControllerClient client);
|
||||||
|
|
||||||
|
// Updates the cached IME information and refreshes the IME menus.
|
||||||
|
// |current_ime_id| is empty when there is no active IME yet.
|
||||||
|
RefreshIme(string current_ime_id,
|
||||||
|
array<ImeInfo> available_imes,
|
||||||
|
array<ImeMenuItem> menu_items);
|
||||||
|
|
||||||
|
// Shows an icon in the IME menu indicating that IMEs are controlled by device
|
||||||
|
// policy.
|
||||||
|
SetImesManagedByPolicy(bool managed);
|
||||||
|
|
||||||
|
// Shows the IME menu on the shelf instead of inside the system tray menu.
|
||||||
|
// Users with multiple IMEs that have multiple configurable properties (e.g.
|
||||||
|
// some Chinese IMEs) prefer this to keeping the IME menu under the primary
|
||||||
|
// system tray menu.
|
||||||
|
ShowImeMenuOnShelf(bool show);
|
||||||
|
|
||||||
|
// Report caps lock state changes from chrome (which is the source of truth)
|
||||||
|
// to the tray.
|
||||||
|
UpdateCapsLockState(bool enabled);
|
||||||
|
|
||||||
|
// Report keyboard layout changes from chrome (which is the source of truth)
|
||||||
|
// This is also called when a connection is first established between
|
||||||
|
// ImeController and ImeControllerClient.
|
||||||
|
// The layout name is a XKB keyboard layout name (e.g. "us").
|
||||||
|
OnKeyboardLayoutNameChanged(string layout_name);
|
||||||
|
|
||||||
|
// Report the enabled state of the various extra input options (currently
|
||||||
|
// emoji, handwriting, and voice input). |is_extra_input_options_enabled| set
|
||||||
|
// to false will disable all extra input option UI regardless of the enabled
|
||||||
|
// state of the individual options (which will be ingored).
|
||||||
|
SetExtraInputOptionsEnabledState(bool is_extra_input_options_enabled,
|
||||||
|
bool is_emoji_enabled,
|
||||||
|
bool is_handwriting_enabled,
|
||||||
|
bool is_voice_enabled);
|
||||||
|
|
||||||
|
// Show the mode indicator view (e.g. a bubble with "DV" for Dvorak).
|
||||||
|
// The view fades out after a delay and close itself.
|
||||||
|
// The anchor bounds is in the universal screen coordinates in DIP.
|
||||||
|
ShowModeIndicator(gfx.mojom.Rect anchor_bounds,
|
||||||
|
mojo_base.mojom.String16 ime_short_name);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash to send input method requests to its client (e.g. Chrome).
|
||||||
|
interface ImeControllerClient {
|
||||||
|
// Switches to the next input method. Does nothing if only one input method
|
||||||
|
// is installed.
|
||||||
|
SwitchToNextIme();
|
||||||
|
|
||||||
|
// Switches to the last used input method. Does nothing if only one input
|
||||||
|
// method is installed.
|
||||||
|
SwitchToLastUsedIme();
|
||||||
|
|
||||||
|
// Switches to an input method by |id|. Does nothing if the input method is
|
||||||
|
// not installed. The ID is usually the output of a call like
|
||||||
|
// chromeos::extension_ime_util::GetInputMethodIDByEngineID("xkb:jp::jpn"),
|
||||||
|
// see that function for details. Shows a bubble with the input method short
|
||||||
|
// name when |show_message| is true.
|
||||||
|
SwitchImeById(string id, bool show_message);
|
||||||
|
|
||||||
|
// Activates an input method menu item. The |key| must be a value from the
|
||||||
|
// ImeMenuItems provided via RefreshIme. Does nothing if the |key| is invalid.
|
||||||
|
ActivateImeMenuItem(string key);
|
||||||
|
|
||||||
|
// When the caps lock state change originates from the tray (i.e. clicking the
|
||||||
|
// caps lock toggle from the settings menu from the caps lock icon), from an
|
||||||
|
// accelerator (e.g. pressing Alt + Search), or from the debug UI (i.e.
|
||||||
|
// toggling the caps lock button), propagate the change to the client without
|
||||||
|
// sending a change notification back.
|
||||||
|
// TODO(crbug/759435): Ideally this interaction should only be to disable the
|
||||||
|
// caps lock.
|
||||||
|
SetCapsLockEnabled(bool enabled);
|
||||||
|
|
||||||
|
// Notifies the mirroring state change to the client where IME lives (e.g.
|
||||||
|
// Chrome), so that the IME can behave according to the state.
|
||||||
|
UpdateMirroringState(bool enabled);
|
||||||
|
|
||||||
|
// Notifies the casting state change to the client where IME lives (e.g.
|
||||||
|
// Chrome), so that the IME can behave according to the state.
|
||||||
|
UpdateCastingState(bool enabled);
|
||||||
|
|
||||||
|
// Overrides the keyboard keyset (emoji, handwriting or voice). If keyset is
|
||||||
|
// 'kNone', we switch to the default keyset. Because this is asynchronous,
|
||||||
|
// any code that needs the keyset to be updated first must use the callback.
|
||||||
|
OverrideKeyboardKeyset(chromeos.input_method.mojom.ImeKeyset keyset) => ();
|
||||||
|
};
|
40
src/ash/public/interfaces/ime_info.mojom
Normal file
40
src/ash/public/interfaces/ime_info.mojom
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
|
||||||
|
// Metadata about an installed input method.
|
||||||
|
struct ImeInfo {
|
||||||
|
// True if the IME is a third-party extension.
|
||||||
|
bool third_party;
|
||||||
|
|
||||||
|
// ID that identifies the IME (e.g., "t:latn-post", "pinyin", "hangul").
|
||||||
|
string id;
|
||||||
|
|
||||||
|
// Long name of the IME, which is used as the user-visible name.
|
||||||
|
mojo_base.mojom.String16 name;
|
||||||
|
|
||||||
|
// Medium name of the IME, which is the same as the short name in most cases.
|
||||||
|
mojo_base.mojom.String16 medium_name;
|
||||||
|
|
||||||
|
// UI indicator for the IME (e.g., "US"). If the IME has no indicator, uses
|
||||||
|
// the first two characters in its preferred keyboard layout or language code
|
||||||
|
// (e.g., "ko", "ja", "en-US").
|
||||||
|
mojo_base.mojom.String16 short_name;
|
||||||
|
};
|
||||||
|
|
||||||
|
// A menu item that sets an IME configuration property.
|
||||||
|
struct ImeMenuItem {
|
||||||
|
// True if the item is selected / enabled.
|
||||||
|
bool checked;
|
||||||
|
|
||||||
|
// The key which identifies the property controlled by the menu item, e.g.
|
||||||
|
// "InputMode.HalfWidthKatakana".
|
||||||
|
string key;
|
||||||
|
|
||||||
|
// The item label, e.g. "Switch to full punctuation mode" or "Hiragana".
|
||||||
|
mojo_base.mojom.String16 label;
|
||||||
|
};
|
122
src/ash/public/interfaces/keyboard_controller.mojom
Normal file
122
src/ash/public/interfaces/keyboard_controller.mojom
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ui/gfx/geometry/mojo/geometry.mojom";
|
||||||
|
import "ui/keyboard/public/keyboard_config.mojom";
|
||||||
|
import "ui/keyboard/public/keyboard_controller_types.mojom";
|
||||||
|
import "mojo/public/mojom/base/unguessable_token.mojom";
|
||||||
|
|
||||||
|
enum HideReason {
|
||||||
|
// Hide requested by an explicit user action.
|
||||||
|
kUser,
|
||||||
|
|
||||||
|
// Hide requested due to a system event (e.g. because it would interfere with
|
||||||
|
// a menu or other on screen UI).
|
||||||
|
kSystem,
|
||||||
|
};
|
||||||
|
|
||||||
|
interface KeyboardControllerObserver {
|
||||||
|
// Called when a keyboard enable flag changes.
|
||||||
|
OnKeyboardEnableFlagsChanged(array<keyboard.mojom.KeyboardEnableFlag> flags);
|
||||||
|
|
||||||
|
// Called when the keyboard is enabled or disabled. If ReloadKeyboard() is
|
||||||
|
// called or other code enables the keyboard while already enabled, this will
|
||||||
|
// be called twice, once when the keyboard is disabled and again when it is
|
||||||
|
// re-enabled.
|
||||||
|
OnKeyboardEnabledChanged(bool is_enabled);
|
||||||
|
|
||||||
|
// Called when the virtual keyboard configuration changes.
|
||||||
|
OnKeyboardConfigChanged(keyboard.mojom.KeyboardConfig config);
|
||||||
|
|
||||||
|
// Called when the visibility of the virtual keyboard changes, e.g. an input
|
||||||
|
// field is focused or blurred, or the user hides the keyboard.
|
||||||
|
OnKeyboardVisibilityChanged(bool visible);
|
||||||
|
|
||||||
|
// Called when the keyboard bounds change. |screen_bounds| is in screen
|
||||||
|
// coordinates.
|
||||||
|
OnKeyboardVisibleBoundsChanged(gfx.mojom.Rect screen_bounds);
|
||||||
|
|
||||||
|
// Called when the keyboard occluded bounds change. |screen_bounds| is in
|
||||||
|
// screen coordinates.
|
||||||
|
OnKeyboardOccludedBoundsChanged(gfx.mojom.Rect screen_bounds);
|
||||||
|
|
||||||
|
// Signals a request to load the keyboard contents. If the contents are
|
||||||
|
// already loaded, requests a reload. Once the contents have loaded,
|
||||||
|
// KeyboardController.KeyboardContentsLoaded is expected to be called by the
|
||||||
|
// client implementation.
|
||||||
|
OnLoadKeyboardContentsRequested();
|
||||||
|
|
||||||
|
// Called when the UI has been destroyed so that the client can reset the
|
||||||
|
// embedded contents and handle.
|
||||||
|
OnKeyboardUIDestroyed();
|
||||||
|
};
|
||||||
|
|
||||||
|
interface KeyboardController {
|
||||||
|
// Informs the controller that the keyboard contents have loaded. Provides a
|
||||||
|
// token for embedding the client window and the size of the contents.
|
||||||
|
KeyboardContentsLoaded(mojo_base.mojom.UnguessableToken token,
|
||||||
|
gfx.mojom.Size size);
|
||||||
|
|
||||||
|
// Retrieves the current keyboard configuration.
|
||||||
|
GetKeyboardConfig() => (keyboard.mojom.KeyboardConfig config);
|
||||||
|
|
||||||
|
// Sets the current keyboard configuration.
|
||||||
|
SetKeyboardConfig(keyboard.mojom.KeyboardConfig config);
|
||||||
|
|
||||||
|
// Returns whether the virtual keyboard has been enabled.
|
||||||
|
IsKeyboardEnabled() => (bool enabled);
|
||||||
|
|
||||||
|
// Sets the provided keyboard enable flag. If the computed enabled state
|
||||||
|
// changes, enables or disables the keyboard to match the new state.
|
||||||
|
SetEnableFlag(keyboard.mojom.KeyboardEnableFlag flag);
|
||||||
|
|
||||||
|
// Clears the provided keyboard enable flag. If the computed enabled state
|
||||||
|
// changes, enables or disables the keyboard to match the new state.
|
||||||
|
ClearEnableFlag(keyboard.mojom.KeyboardEnableFlag flag);
|
||||||
|
|
||||||
|
// Gets the current set of keyboard enable flags.
|
||||||
|
GetEnableFlags() => (array<keyboard.mojom.KeyboardEnableFlag> flags);
|
||||||
|
|
||||||
|
// Reloads the virtual keyboard if it is enabled and the URL has changed, e.g.
|
||||||
|
// the focus has switched from one type of field to another.
|
||||||
|
ReloadKeyboardIfNeeded();
|
||||||
|
|
||||||
|
// Rebuilds (disables and re-enables) the virtual keyboard if it is enabled.
|
||||||
|
// This is used to force a reload of the virtual keyboard when preferences or
|
||||||
|
// other configuration that affects loading the keyboard may have changed.
|
||||||
|
RebuildKeyboardIfEnabled();
|
||||||
|
|
||||||
|
// Returns whether the virtual keyboard is visible.
|
||||||
|
IsKeyboardVisible() => (bool visible);
|
||||||
|
|
||||||
|
// Shows the virtual keyboard on the current display if it is enabled.
|
||||||
|
ShowKeyboard();
|
||||||
|
|
||||||
|
// Hides the virtual keyboard if it is visible.
|
||||||
|
HideKeyboard(HideReason reason);
|
||||||
|
|
||||||
|
// Sets the keyboard container type. If non empty, |target_bounds| provides
|
||||||
|
// the container size. Returns whether the transition succeeded once the
|
||||||
|
// container type changes (or fails to change).
|
||||||
|
SetContainerType(keyboard.mojom.ContainerType container_type,
|
||||||
|
gfx.mojom.Rect? target_bounds) => (bool result);
|
||||||
|
|
||||||
|
// If |locked| is true, the keyboard remains visible even when no window has
|
||||||
|
// input focus.
|
||||||
|
SetKeyboardLocked(bool locked);
|
||||||
|
|
||||||
|
// Sets the regions of the keyboard window that occlude whatever is behind it.
|
||||||
|
SetOccludedBounds(array<gfx.mojom.Rect> bounds);
|
||||||
|
|
||||||
|
// Sets the regions of the keyboard window where events should be handled.
|
||||||
|
SetHitTestBounds(array<gfx.mojom.Rect> bounds);
|
||||||
|
|
||||||
|
// Sets the region of the keyboard window that can be used as a drag handle.
|
||||||
|
SetDraggableArea(gfx.mojom.Rect bounds);
|
||||||
|
|
||||||
|
// Adds a KeyboardControllerObserver.
|
||||||
|
AddObserver(associated KeyboardControllerObserver observer);
|
||||||
|
};
|
24
src/ash/public/interfaces/kiosk_app_info.mojom
Normal file
24
src/ash/public/interfaces/kiosk_app_info.mojom
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "ui/gfx/image/mojo/image.mojom";
|
||||||
|
|
||||||
|
union KioskAppIdentifier {
|
||||||
|
// For chrome kiosk apps only, the extension app id.
|
||||||
|
string app_id;
|
||||||
|
// For ARC kiosk apps only, the account id for the app.
|
||||||
|
signin.mojom.AccountId account_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Metadata about a kiosk app. Used for display in the kiosk app menu in the
|
||||||
|
// login screen shelf.
|
||||||
|
struct KioskAppInfo {
|
||||||
|
KioskAppIdentifier identifier;
|
||||||
|
mojo_base.mojom.String16 name;
|
||||||
|
gfx.mojom.ImageSkia icon;
|
||||||
|
};
|
21
src/ash/public/interfaces/kiosk_next_shell.mojom
Normal file
21
src/ash/public/interfaces/kiosk_next_shell.mojom
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
|
||||||
|
// Performs browser-side functionality for Kiosk Next, e.g. launching the
|
||||||
|
// KioskNextShell.
|
||||||
|
interface KioskNextShellClient {
|
||||||
|
// Launch the Kiosk Next Shell for the user identified by |account_id|.
|
||||||
|
LaunchKioskNextShell(signin.mojom.AccountId account_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows Ash and its consumers to interact with Kiosk Next.
|
||||||
|
// These requests are forwarded to the KioskNextShellClient when necessary.
|
||||||
|
interface KioskNextShellController {
|
||||||
|
// Provides a client for dispatching requests.
|
||||||
|
SetClient(KioskNextShellClient client);
|
||||||
|
};
|
23
src/ash/public/interfaces/locale.mojom
Normal file
23
src/ash/public/interfaces/locale.mojom
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// Sent as the response to LocaleUpdateController.OnLocaleChanged().
|
||||||
|
enum LocaleNotificationResult {
|
||||||
|
ACCEPT,
|
||||||
|
REVERT
|
||||||
|
};
|
||||||
|
|
||||||
|
// Used by Chrome to notify locale change events.
|
||||||
|
interface LocaleUpdateController {
|
||||||
|
// When this is called in OOBE, it returnes ACCEPT immediately after invoking
|
||||||
|
// observer callbacks. |current|, |from|, and |to| are ignored in this case.
|
||||||
|
// Otherwise it displays a notification in ash prompting the user whether to
|
||||||
|
// accept a change in the locale. If the user clicks the accept button (or
|
||||||
|
// closes the notification), OnLocaleChange() returns ACCEPT. If the user
|
||||||
|
// clicks the revert button, returns REVERT.
|
||||||
|
OnLocaleChanged(string current, string from, string to)
|
||||||
|
=> (LocaleNotificationResult result);
|
||||||
|
};
|
362
src/ash/public/interfaces/login_screen.mojom
Normal file
362
src/ash/public/interfaces/login_screen.mojom
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/user_info.mojom";
|
||||||
|
import "ash/public/interfaces/login_user_info.mojom";
|
||||||
|
import "ash/public/interfaces/kiosk_app_info.mojom";
|
||||||
|
import "chromeos/components/proximity_auth/public/interfaces/auth_type.mojom";
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "mojo/public/mojom/base/time.mojom";
|
||||||
|
|
||||||
|
// State of the Oobe UI dialog, which is used to update the visibility of login
|
||||||
|
// shelf buttons.
|
||||||
|
// This comes from SIGNIN_UI_STATE defined in display_manager.js, with an
|
||||||
|
// additional value HIDDEN to indicate the visibility of the oobe ui dialog.
|
||||||
|
enum OobeDialogState {
|
||||||
|
// Showing other screen, which does not impact the visibility of login shelf
|
||||||
|
// buttons.
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
// Showing gaia signin screen.
|
||||||
|
GAIA_SIGNIN = 1,
|
||||||
|
|
||||||
|
// 2 is unused to keep in sync with display_manager.js
|
||||||
|
|
||||||
|
// Showing wrong hardware identification screen.
|
||||||
|
WRONG_HWID_WARNING = 3,
|
||||||
|
|
||||||
|
// Showing supervised user creation screen.
|
||||||
|
SUPERVISED_USER_CREATION_FLOW = 4,
|
||||||
|
|
||||||
|
// Showing SAML password confirmation screen.
|
||||||
|
SAML_PASSWORD_CONFIRM = 5,
|
||||||
|
|
||||||
|
// Showing password changed screen.
|
||||||
|
PASSWORD_CHANGED = 6,
|
||||||
|
|
||||||
|
// Showing device enrollment screen.
|
||||||
|
ENROLLMENT = 7,
|
||||||
|
|
||||||
|
// Showing error screen.
|
||||||
|
ERROR = 8,
|
||||||
|
|
||||||
|
// Showing sync consent screen.
|
||||||
|
SYNC_CONSENT = 9,
|
||||||
|
|
||||||
|
// Oobe UI dialog is currently hidden.
|
||||||
|
HIDDEN = 10,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows clients (e.g. the browser process) to send messages to the ash
|
||||||
|
// login/lock/user-add screens.
|
||||||
|
interface LoginScreen {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(LoginScreenClient client);
|
||||||
|
|
||||||
|
// Displays the lock screen. |did_show| is true iff the lock UI was
|
||||||
|
// successfully displayed.
|
||||||
|
ShowLockScreen() => (bool did_show);
|
||||||
|
|
||||||
|
// Displays the login screen. |did_show| is true iff the login UI was
|
||||||
|
// successfully displayed.
|
||||||
|
ShowLoginScreen() => (bool did_show);
|
||||||
|
|
||||||
|
// Requests to show error message in the ash lock screen.
|
||||||
|
// TODO(xiaoyinh): login_attempts is probably not needed from chrome,
|
||||||
|
// remove it when we start to count the login attempts in ash lock screen.
|
||||||
|
// |login_attempts|: The number of the login authentication attempts.
|
||||||
|
// |error_text|: The error text to be shown in lock screen.
|
||||||
|
// |help_link_text|: The help link to be shown in lock screen.
|
||||||
|
// |help_topic_id|: The id of the help app topic regarding this error.
|
||||||
|
ShowErrorMessage(int32 login_attempts,
|
||||||
|
string error_text,
|
||||||
|
string help_link_text,
|
||||||
|
int32 help_topic_id);
|
||||||
|
|
||||||
|
// Shows a warning banner message on the login screen. A warning banner is
|
||||||
|
// used to notify users of important messages before they log in to their
|
||||||
|
// session. (e.g. Tell the user that an update of the user data will start
|
||||||
|
// on login)
|
||||||
|
// |message|: The message to show.
|
||||||
|
ShowWarningBanner(mojo_base.mojom.String16 message);
|
||||||
|
|
||||||
|
// Hide a warning banner if it is displayed.
|
||||||
|
// TODO(fukino): Ideally chrome-side should not have this level of UI
|
||||||
|
// control. Make the API simpler and let ash determine the UI behavior.
|
||||||
|
HideWarningBanner();
|
||||||
|
|
||||||
|
// Requests to close any displayed error messages in ash lock screen.
|
||||||
|
ClearErrors();
|
||||||
|
|
||||||
|
// Requests to show the custom icon in the user pod.
|
||||||
|
// |account_id|: The account id of the user in the user pod.
|
||||||
|
// |icon|: Information regarding the icon.
|
||||||
|
ShowUserPodCustomIcon(signin.mojom.AccountId account_id,
|
||||||
|
EasyUnlockIconOptions icon);
|
||||||
|
|
||||||
|
// Requests to hide the custom icon in the user pod.
|
||||||
|
// |account_id|: The account id of the user in the user pod.
|
||||||
|
HideUserPodCustomIcon(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Requests to set the authentication type.
|
||||||
|
// |account_id|: The account id of the user in the user pod.
|
||||||
|
// |auth_type|: Authentication type.
|
||||||
|
// |initial_value|: A message shown in the password field of the user pod.
|
||||||
|
SetAuthType(signin.mojom.AccountId account_id,
|
||||||
|
proximity_auth.mojom.AuthType auth_type,
|
||||||
|
mojo_base.mojom.String16 initial_value);
|
||||||
|
|
||||||
|
// Set the users who are displayed on the login UI. |users| is filtered
|
||||||
|
// and does not correspond to every user on the device.
|
||||||
|
SetUserList(array<LoginUserInfo> users);
|
||||||
|
|
||||||
|
// Notification if pin is enabled or disabled for the given user.
|
||||||
|
// |account_id|: The account id of the user in the user pod.
|
||||||
|
// |is_enabled|: True if pin unlock is enabled.
|
||||||
|
SetPinEnabledForUser(signin.mojom.AccountId account_id, bool is_enabled);
|
||||||
|
|
||||||
|
// Update the status of fingerprint for |account_id|.
|
||||||
|
SetFingerprintState(signin.mojom.AccountId account_id,
|
||||||
|
FingerprintState state);
|
||||||
|
|
||||||
|
// Called after a fingerprint authentication attempt has been made. If
|
||||||
|
// |successful| is true, then the fingerprint authentication attempt was
|
||||||
|
// successful and the device should be unlocked. If false, an error message
|
||||||
|
// should be shown to the user.
|
||||||
|
NotifyFingerprintAuthResult(signin.mojom.AccountId account_id,
|
||||||
|
bool successful);
|
||||||
|
|
||||||
|
// Change the user's avatar. Some avatars may take a long time to load and the
|
||||||
|
// login screen may already be visible.
|
||||||
|
SetAvatarForUser(signin.mojom.AccountId account_id, UserAvatar avatar);
|
||||||
|
|
||||||
|
// Called when auth should be enabled or disabled for the given user. When
|
||||||
|
// auth is disabled, the user cannot unlock the device. Auth is enabled by
|
||||||
|
// default.
|
||||||
|
// |account_id|: The account id of the user in the user pod.
|
||||||
|
// |is_enabled|: True if auth is enabled.
|
||||||
|
// |auth_reenabled_time|: A future time when auth will be enabled. Must be
|
||||||
|
// non-null if |is_enabled| is false. This value is
|
||||||
|
// for display purpose only and the client should be
|
||||||
|
// responsible for calling this method again with
|
||||||
|
// is_enabled == true when the time reaches.
|
||||||
|
SetAuthEnabledForUser(signin.mojom.AccountId account_id,
|
||||||
|
bool is_enabled,
|
||||||
|
mojo_base.mojom.Time? auth_reenabled_time);
|
||||||
|
|
||||||
|
// Called when focus is reported to be leaving a lock screen app window.
|
||||||
|
// Requests focus to be handed off to the next suitable widget.
|
||||||
|
// |reverse|: Whether the tab order is reversed.
|
||||||
|
HandleFocusLeavingLockScreenApps(bool reverse);
|
||||||
|
|
||||||
|
// Called when new system information is available.
|
||||||
|
// |show_if_hidden|: If true, the system information should be displayed to
|
||||||
|
// the user if it is currently hidden. If false, the system
|
||||||
|
// information should remain hidden if not already shown.
|
||||||
|
// Hidden system information can be shown by pressing alt-v.
|
||||||
|
// |os_version_label_text|: The OS version.
|
||||||
|
// |enterprise_info_text|: The enterprise info.
|
||||||
|
// |bluetooth_name|: The name of the bluetooth adapter.
|
||||||
|
SetSystemInfo(bool show_if_hidden,
|
||||||
|
string os_version_label_text,
|
||||||
|
string enterprise_info_text,
|
||||||
|
string bluetooth_name);
|
||||||
|
|
||||||
|
// Check if the login/lock screen is ready for a password.
|
||||||
|
IsReadyForPassword() => (bool is_ready);
|
||||||
|
|
||||||
|
// Set the public session display name for user with |account_id|.
|
||||||
|
SetPublicSessionDisplayName(signin.mojom.AccountId account_id,
|
||||||
|
string display_name);
|
||||||
|
|
||||||
|
// Set the public session locales for user with |account_id|.
|
||||||
|
// |locales|: Available locales for this user.
|
||||||
|
// |default_locale|: Default locale for this user.
|
||||||
|
// |show_advanced_view|: True if we should show the advanced expanded user
|
||||||
|
// view for the public session.
|
||||||
|
SetPublicSessionLocales(signin.mojom.AccountId account_id,
|
||||||
|
array<LocaleItem> locales,
|
||||||
|
string default_locale,
|
||||||
|
bool show_advanced_view);
|
||||||
|
|
||||||
|
// Set the public session keyboard layouts for user with |account_id|.
|
||||||
|
// |locale|: The locale that |keyboard_layouts| can be used for.
|
||||||
|
SetPublicSessionKeyboardLayouts(signin.mojom.AccountId account_id,
|
||||||
|
string locale,
|
||||||
|
array<InputMethodItem> keyboard_layouts);
|
||||||
|
|
||||||
|
// Sets whether full management disclosure is needed for the public/managed
|
||||||
|
// session login screen.
|
||||||
|
SetPublicSessionShowFullManagementDisclosure(
|
||||||
|
bool show_full_management_disclosure);
|
||||||
|
|
||||||
|
// Update the kiosk app data for the login screen.
|
||||||
|
SetKioskApps(array<KioskAppInfo> kiosk_apps);
|
||||||
|
|
||||||
|
// Display a toast describing the latest kiosk app launch error.
|
||||||
|
ShowKioskAppError(string message);
|
||||||
|
|
||||||
|
// Called when the dialog hosting oobe has changed state. The oobe dialog
|
||||||
|
// provides support for any part of login that is implemented in JS/HTML, such
|
||||||
|
// as add user or powerwash.
|
||||||
|
NotifyOobeDialogState(OobeDialogState state);
|
||||||
|
|
||||||
|
// Sets whether users can be added from the login screen.
|
||||||
|
SetAddUserButtonEnabled(bool enable);
|
||||||
|
|
||||||
|
// Sets whether shutdown button is enabled in the login screen.
|
||||||
|
SetShutdownButtonEnabled(bool enable);
|
||||||
|
|
||||||
|
// Sets if the guest button on the login shelf can be shown. Even if set to
|
||||||
|
// true the button may still not be visible.
|
||||||
|
SetAllowLoginAsGuest(bool allow_guest);
|
||||||
|
|
||||||
|
// Sets if the guest button on the login shelf can be shown during OOBE.
|
||||||
|
SetShowGuestButtonInOobe(bool show);
|
||||||
|
|
||||||
|
// Sets whether parent access button can be shown on the login shelf.
|
||||||
|
SetShowParentAccessButton(bool show);
|
||||||
|
|
||||||
|
// Sets whether parent access code input dialog is shown on the lock screen.
|
||||||
|
SetShowParentAccessDialog(bool show);
|
||||||
|
|
||||||
|
// Transitions focus to the shelf area. If |reverse|, focuses the status area.
|
||||||
|
FocusLoginShelf(bool reverse);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows ash lock screen to control a client (e.g. Chrome browser). Requests
|
||||||
|
// often involve preferences or talk to cryptohome that is not available to ash.
|
||||||
|
interface LoginScreenClient {
|
||||||
|
// Attempt to authenticate a user with a password or PIN.
|
||||||
|
//
|
||||||
|
// If auth succeeds:
|
||||||
|
// chrome will hide the lock screen and clear any displayed error messages.
|
||||||
|
// If auth fails:
|
||||||
|
// chrome will request lock screen to show error messages.
|
||||||
|
// |account_id|: The AccountId to authenticate against.
|
||||||
|
// |password|: The submitted password.
|
||||||
|
// |authenticated_by_pin|: True if we are using pin to authenticate.
|
||||||
|
//
|
||||||
|
// The result will be set to true if auth was successful, false if not.
|
||||||
|
//
|
||||||
|
// TODO(jdufault): Extract authenticated_by_pin into a separate mojom method,
|
||||||
|
// similar to the other Authenticate* methods
|
||||||
|
AuthenticateUserWithPasswordOrPin(
|
||||||
|
signin.mojom.AccountId account_id,
|
||||||
|
string password,
|
||||||
|
bool authenticated_by_pin) => (bool auth_success);
|
||||||
|
|
||||||
|
// Attempt to authenticate the user with with an external binary.
|
||||||
|
AuthenticateUserWithExternalBinary(signin.mojom.AccountId account_id)
|
||||||
|
=> (bool auth_success);
|
||||||
|
|
||||||
|
// Attempt to enroll a user in the external binary authentication system.
|
||||||
|
EnrollUserWithExternalBinary() => (bool enrollment_success);
|
||||||
|
|
||||||
|
// Try to authenticate |account_id| using easy unlock. This can be used on the
|
||||||
|
// login or lock screen.
|
||||||
|
// |account_id|: The account id of the user we are authenticating.
|
||||||
|
//
|
||||||
|
// TODO(jdufault): Refactor this method to return an auth_success, similar to
|
||||||
|
// the other auth methods above.
|
||||||
|
AuthenticateUserWithEasyUnlock(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Validates parent access code for the user identified by |account_id|.
|
||||||
|
// Passes validation result in the callback.
|
||||||
|
// Note: This should only be used for child user.
|
||||||
|
ValidateParentAccessCode(
|
||||||
|
signin.mojom.AccountId account_id,
|
||||||
|
string access_code) => (bool access_code_valid);
|
||||||
|
|
||||||
|
// Request to hard lock the user pod.
|
||||||
|
// |account_id|: The account id of the user in the user pod.
|
||||||
|
HardlockPod(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Focus user pod of user with |account_id|.
|
||||||
|
OnFocusPod(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Notify that no user pod is focused.
|
||||||
|
OnNoPodFocused();
|
||||||
|
|
||||||
|
// Load wallpaper of user with |account_id|.
|
||||||
|
LoadWallpaper(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Sign out current user.
|
||||||
|
SignOutUser();
|
||||||
|
|
||||||
|
// Close add user screen.
|
||||||
|
CancelAddUser();
|
||||||
|
|
||||||
|
// Launches guest mode.
|
||||||
|
LoginAsGuest();
|
||||||
|
|
||||||
|
// User with |account_id| has reached maximum incorrect password attempts.
|
||||||
|
OnMaxIncorrectPasswordAttempted(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Should pass the focus to the active lock screen app window, if there is
|
||||||
|
// one. This is called when a lock screen app is reported to be active (using
|
||||||
|
// tray_action mojo interface), and is next in the tab order.
|
||||||
|
// |HandleFocusLeavingLockScreenApps| should be called to return focus to the
|
||||||
|
// lock screen.
|
||||||
|
// |reverse|: Whether the tab order is reversed.
|
||||||
|
FocusLockScreenApps(bool reverse);
|
||||||
|
|
||||||
|
// Passes focus to the OOBE dialog if it is showing. No-op otherwise.
|
||||||
|
FocusOobeDialog();
|
||||||
|
|
||||||
|
// Show the gaia sign-in dialog. If |can_close| is true, the dialog can be
|
||||||
|
// closed. The value in |prefilled_account| will be used to prefill the
|
||||||
|
// sign-in dialog so the user does not need to type the account email.
|
||||||
|
ShowGaiaSignin(bool can_close, signin.mojom.AccountId? prefilled_account);
|
||||||
|
|
||||||
|
// Notification that the remove user warning was shown.
|
||||||
|
OnRemoveUserWarningShown();
|
||||||
|
|
||||||
|
// Try to remove |account_id|.
|
||||||
|
RemoveUser(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Launch a public session for user with |account_id|.
|
||||||
|
// |locale|: Locale for this user.
|
||||||
|
// The value is language code like "en-US", "zh-CN"
|
||||||
|
// |input_method|: Input method for this user.
|
||||||
|
// This is the id of InputMethodDescriptor like
|
||||||
|
// "t:latn-post", "pinyin".
|
||||||
|
LaunchPublicSession(signin.mojom.AccountId account_id,
|
||||||
|
string locale,
|
||||||
|
string input_method);
|
||||||
|
|
||||||
|
// Request public session keyboard layouts for user with |account_id|.
|
||||||
|
// This function send a request to chrome and the result will be returned by
|
||||||
|
// SetPublicSessionKeyboardLayouts.
|
||||||
|
// |locale|: Request a list of keyboard layouts that can be used by this
|
||||||
|
// locale.
|
||||||
|
RequestPublicSessionKeyboardLayouts(signin.mojom.AccountId account_id,
|
||||||
|
string locale);
|
||||||
|
|
||||||
|
// Request to show a feedback report dialog in chrome.
|
||||||
|
ShowFeedback();
|
||||||
|
|
||||||
|
// Launch the specific kiosk app.
|
||||||
|
LaunchKioskApp(string app_id);
|
||||||
|
|
||||||
|
// Launch the specific ARC++ kiosk app.
|
||||||
|
LaunchArcKioskApp(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Show the powerwash (device reset) dialog.
|
||||||
|
ShowResetScreen();
|
||||||
|
|
||||||
|
// Show the help app for when users have trouble signing in to their account.
|
||||||
|
ShowAccountAccessHelpApp();
|
||||||
|
|
||||||
|
// Called when the keyboard focus is about to leave from the sytem tray in
|
||||||
|
// the login screen / OOBE. |reverse| is true when the focus moves in the
|
||||||
|
// reversed direction.
|
||||||
|
OnFocusLeavingSystemTray(bool reverse);
|
||||||
|
|
||||||
|
// Used by Ash to signal that user activity occurred on the login screen.
|
||||||
|
OnUserActivity();
|
||||||
|
};
|
161
src/ash/public/interfaces/login_user_info.mojom
Normal file
161
src/ash/public/interfaces/login_user_info.mojom
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/user_info.mojom";
|
||||||
|
import "chromeos/components/proximity_auth/public/interfaces/auth_type.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "mojo/public/mojom/base/values.mojom";
|
||||||
|
|
||||||
|
// Supported multi-profile user behavior values.
|
||||||
|
// Keep in sync with the enum in chromeos_user_pod_row.js and user_pod_row.js
|
||||||
|
enum MultiProfileUserBehavior {
|
||||||
|
UNRESTRICTED = 0,
|
||||||
|
PRIMARY_ONLY = 1,
|
||||||
|
NOT_ALLOWED = 2,
|
||||||
|
OWNER_PRIMARY_ONLY = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Easy unlock icon choices.
|
||||||
|
enum EasyUnlockIconId {
|
||||||
|
// No icon shown.
|
||||||
|
NONE,
|
||||||
|
// The user has clicked the easy unlock icon and disabled easy unlock for this
|
||||||
|
// login/lock session.
|
||||||
|
HARDLOCKED,
|
||||||
|
// Phone could not be found.
|
||||||
|
LOCKED,
|
||||||
|
// Phone found, but it is not unlocked.
|
||||||
|
LOCKED_TO_BE_ACTIVATED,
|
||||||
|
// Phone found, but it is too far away.
|
||||||
|
LOCKED_WITH_PROXIMITY_HINT,
|
||||||
|
// Phone found and unlocked. The user can click to dismiss the login/lock
|
||||||
|
// screen.
|
||||||
|
UNLOCKED,
|
||||||
|
// Scanning for phone.
|
||||||
|
SPINNER,
|
||||||
|
};
|
||||||
|
|
||||||
|
// The status of fingerprint availability.
|
||||||
|
enum FingerprintState {
|
||||||
|
// The user cannot use fingerprint. This may be because:
|
||||||
|
// - they are not the primary user
|
||||||
|
// - they never registered fingerprint
|
||||||
|
// - the device does not have a fingerprint sensor
|
||||||
|
UNAVAILABLE,
|
||||||
|
// Fingerprint can be used to unlock the device.
|
||||||
|
AVAILABLE,
|
||||||
|
// There have been too many attempts, so now fingerprint is disabled.
|
||||||
|
DISABLED_FROM_ATTEMPTS,
|
||||||
|
// It has been too long since the device was last used.
|
||||||
|
DISABLED_FROM_TIMEOUT,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Information about the custom icon in the user pod.
|
||||||
|
struct EasyUnlockIconOptions {
|
||||||
|
// Icon that should be displayed.
|
||||||
|
EasyUnlockIconId icon;
|
||||||
|
// Tooltip that is associated with the icon. This is shown automatically if
|
||||||
|
// |autoshow_tooltip| is true. The user can always see the tooltip if they
|
||||||
|
// hover over the icon. The tooltip should be used for the accessibility label
|
||||||
|
// if it is present.
|
||||||
|
mojo_base.mojom.String16 tooltip;
|
||||||
|
// If true, the tooltip should be displayed (even if the user is not currently
|
||||||
|
// hovering over the icon, ie, this makes |tooltip| act like a little like a
|
||||||
|
// notification).
|
||||||
|
bool autoshow_tooltip;
|
||||||
|
// Accessibility label. Only used if |tooltip| is empty.
|
||||||
|
// TODO(jdufault): Always populate and use |aria_label|, even if |tooltip| is
|
||||||
|
// non-empty.
|
||||||
|
mojo_base.mojom.String16 aria_label;
|
||||||
|
// If true, clicking the easy unlock icon should fire a hardlock event which
|
||||||
|
// will disable easy unlock. The hardlock event will request a new icon
|
||||||
|
// display via a separate EasyUnlockIconsOption update. See
|
||||||
|
// login_screen.mojom::HardlockPod.
|
||||||
|
bool hardlock_on_click;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Infomation of each input method. This is used to populate keyboard layouts
|
||||||
|
// for public account user.
|
||||||
|
struct InputMethodItem {
|
||||||
|
// An id that identifies an input method engine (e.g., "t:latn-post",
|
||||||
|
// "pinyin", "hangul").
|
||||||
|
string ime_id;
|
||||||
|
|
||||||
|
// Title of the imput method.
|
||||||
|
string title;
|
||||||
|
|
||||||
|
// Whether this input method is been selected.
|
||||||
|
bool selected;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Information of each available locale. This is used to populate language
|
||||||
|
// locales for public account user.
|
||||||
|
struct LocaleItem {
|
||||||
|
// Language code of the locale.
|
||||||
|
string language_code;
|
||||||
|
|
||||||
|
// Title of the locale.
|
||||||
|
string title;
|
||||||
|
|
||||||
|
// Optional, group name of the locale.
|
||||||
|
string? group_name;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Infomation about a public account user.
|
||||||
|
struct PublicAccountInfo {
|
||||||
|
// Optional, the domain name displayed in the login screen UI.
|
||||||
|
string? enterprise_domain;
|
||||||
|
|
||||||
|
// A list of available user locales.
|
||||||
|
array<LocaleItem> available_locales;
|
||||||
|
|
||||||
|
// Default locale for this user.
|
||||||
|
string default_locale;
|
||||||
|
|
||||||
|
// Show expanded user view that contains session information/warnings and
|
||||||
|
// locale selection.
|
||||||
|
bool show_expanded_view;
|
||||||
|
|
||||||
|
// Show the advanced expanded user view if there are at least two recommended
|
||||||
|
// locales. This will be the case in multilingual environments where users
|
||||||
|
// are likely to want to choose among locales.
|
||||||
|
bool show_advanced_view;
|
||||||
|
|
||||||
|
// A list of available keyboard layouts.
|
||||||
|
array<InputMethodItem> keyboard_layouts;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Info about a user in login/lock screen.
|
||||||
|
struct LoginUserInfo {
|
||||||
|
// User's basic information including account id, email, avatar etc.
|
||||||
|
UserInfo basic_user_info;
|
||||||
|
|
||||||
|
// What method the user can use to sign in.
|
||||||
|
proximity_auth.mojom.AuthType auth_type;
|
||||||
|
|
||||||
|
// True if this user has already signed in.
|
||||||
|
bool is_signed_in;
|
||||||
|
|
||||||
|
// True if this user is the device owner.
|
||||||
|
bool is_device_owner;
|
||||||
|
|
||||||
|
// The initial fingerprint state. There are other mojom methods (ie,
|
||||||
|
// login_screen.mojom::SetFingerprintState) which update the current state.
|
||||||
|
FingerprintState fingerprint_state;
|
||||||
|
|
||||||
|
// True if multi-profiles sign in is allowed for this user.
|
||||||
|
bool is_multiprofile_allowed;
|
||||||
|
|
||||||
|
// Enforced policy for multi-profiles sign in.
|
||||||
|
MultiProfileUserBehavior multiprofile_policy;
|
||||||
|
|
||||||
|
// True if this user can be removed.
|
||||||
|
bool can_remove;
|
||||||
|
|
||||||
|
// Optional, contains the public account information if user type is
|
||||||
|
// PUBLIC_ACCOUNT.
|
||||||
|
PublicAccountInfo? public_account_info;
|
||||||
|
};
|
46
src/ash/public/interfaces/media.mojom
Normal file
46
src/ash/public/interfaces/media.mojom
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
|
||||||
|
// Describes whether media is currently being captured.
|
||||||
|
enum MediaCaptureState {
|
||||||
|
NONE = 0,
|
||||||
|
AUDIO = 1,
|
||||||
|
VIDEO = 2,
|
||||||
|
AUDIO_VIDEO = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
// Allows clients (e.g. Chrome browser) to interface with the ash media
|
||||||
|
// indicators.
|
||||||
|
interface MediaController {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(associated MediaClient client);
|
||||||
|
|
||||||
|
// Called when the media capture state changes on the client, or in response
|
||||||
|
// to a RequestCaptureState() request. Returns a map from AccountId to
|
||||||
|
// MediaCaptureState representing every user's state.
|
||||||
|
NotifyCaptureState(map<signin.mojom.AccountId,
|
||||||
|
MediaCaptureState> capture_states);
|
||||||
|
};
|
||||||
|
|
||||||
|
// This delegate allows the UI code in ash to forward UI commands.
|
||||||
|
interface MediaClient {
|
||||||
|
// Handles the Next Track Media shortcut key.
|
||||||
|
HandleMediaNextTrack();
|
||||||
|
|
||||||
|
// Handles the Play/Pause Toggle Media shortcut key.
|
||||||
|
HandleMediaPlayPause();
|
||||||
|
|
||||||
|
// Handles the Previous Track Media shortcut key.
|
||||||
|
HandleMediaPrevTrack();
|
||||||
|
|
||||||
|
// Requests that the client resends the NotifyMediaCaptureChanged() message.
|
||||||
|
RequestCaptureState();
|
||||||
|
|
||||||
|
// Suspends all WebContents-associated media sessions to stop managed players.
|
||||||
|
SuspendMediaSessions();
|
||||||
|
};
|
74
src/ash/public/interfaces/menu.mojom
Normal file
74
src/ash/public/interfaces/menu.mojom
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "ui/gfx/image/mojo/image.mojom";
|
||||||
|
|
||||||
|
// The types of menu items shown in shelf context and application list menus.
|
||||||
|
// These values roughly match ui::MenuModel::ItemType (sans TYPE_BUTTON_ITEM).
|
||||||
|
enum MenuItemType {
|
||||||
|
COMMAND, // Performs an action when selected.
|
||||||
|
CHECK, // Can be selected/checked to toggle a boolean state.
|
||||||
|
RADIO, // Can be selected/checked among a group of choices.
|
||||||
|
SEPARATOR, // Shows a horizontal line separator.
|
||||||
|
SUBMENU, // Presents a submenu within another menu.
|
||||||
|
ACTIONABLE_SUBMENU, // A SUBMENU that is also a COMMAND.
|
||||||
|
};
|
||||||
|
|
||||||
|
// For a separator we have the following types.
|
||||||
|
enum MenuSeparatorType {
|
||||||
|
// Normal - top to bottom: Spacing, line, spacing.
|
||||||
|
NORMAL_SEPARATOR = 0,
|
||||||
|
|
||||||
|
// Double thickness - top to bottom: Spacing, line, spacing.
|
||||||
|
DOUBLE_SEPARATOR,
|
||||||
|
|
||||||
|
// Upper - top to bottom: Line, spacing.
|
||||||
|
UPPER_SEPARATOR,
|
||||||
|
|
||||||
|
// Lower - top to bottom: Spacing, line.
|
||||||
|
LOWER_SEPARATOR,
|
||||||
|
|
||||||
|
// Spacing - top to bottom: Spacing only.
|
||||||
|
SPACING_SEPARATOR,
|
||||||
|
|
||||||
|
// Vertical separator within a row.
|
||||||
|
VERTICAL_SEPARATOR,
|
||||||
|
|
||||||
|
// Separator with left padding - top to bottom: Line only,
|
||||||
|
// horizontal: Starts after left padding.
|
||||||
|
PADDED_SEPARATOR,
|
||||||
|
};
|
||||||
|
|
||||||
|
// MenuItems are used to populate application menus for shelf items.
|
||||||
|
// Note: Some menu item types only support a subset of these item features.
|
||||||
|
// Please update comments below (MenuItemType -> [fields expected for usage])
|
||||||
|
// when anything changed to MenuItemType or MenuItem.
|
||||||
|
//
|
||||||
|
// COMMAND -> [command_id, label, image, enabled, checked].
|
||||||
|
// CHECK -> [command_id, label, image, enabled, checked].
|
||||||
|
// RADIO -> [command_id, label, image, enabled, checked, radio_group_id].
|
||||||
|
// SEPARATOR -> [separator_type].
|
||||||
|
// SUBMENU -> [command_id, label, image, enabled, submenu].
|
||||||
|
// ACTIONABLE_SUBMENU -> [command_id, label, image, enabled, submenu].
|
||||||
|
//
|
||||||
|
struct MenuItem {
|
||||||
|
MenuItemType type; // The type of the menu item.
|
||||||
|
int32 command_id; // The client's arbitrary item command id.
|
||||||
|
mojo_base.mojom.String16 label; // The string label, may be empty.
|
||||||
|
gfx.mojom.ImageSkia? image; // The image icon, may be null.
|
||||||
|
array<MenuItem>? submenu; // The optional nested submenu item list.
|
||||||
|
bool enabled; // The enabled state.
|
||||||
|
bool checked; // The checked state.
|
||||||
|
int64 radio_group_id; // The radio group id.
|
||||||
|
MenuSeparatorType separator_type; // The separator type.
|
||||||
|
};
|
||||||
|
|
||||||
|
// An interface implemented by clients to handle interaction with menus run in
|
||||||
|
// Ash.
|
||||||
|
interface MenuDelegate {
|
||||||
|
MenuItemActivated(int32 command_id);
|
||||||
|
};
|
18
src/ash/public/interfaces/menu.typemap
Normal file
18
src/ash/public/interfaces/menu.typemap
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2018 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.
|
||||||
|
|
||||||
|
mojom = "//ash/public/interfaces/menu.mojom"
|
||||||
|
public_headers = [
|
||||||
|
"//ui/base/models/menu_model.h",
|
||||||
|
"//ui/base/models/menu_separator_types.h",
|
||||||
|
]
|
||||||
|
traits_headers = [ "//ash/public/cpp/menu_struct_mojom_traits.h" ]
|
||||||
|
public_deps = [
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/gfx/image/mojo:struct_traits",
|
||||||
|
]
|
||||||
|
type_mappings = [
|
||||||
|
"ash.mojom.MenuItemType=ui::MenuModel::ItemType",
|
||||||
|
"ash.mojom.MenuSeparatorType=ui::MenuSeparatorType",
|
||||||
|
]
|
45
src/ash/public/interfaces/multi_user_window_manager.mojom
Normal file
45
src/ash/public/interfaces/multi_user_window_manager.mojom
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
// Copyright 2018 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
|
||||||
|
// Used to assign windows to user accounts so that ash shows the appropriate set
|
||||||
|
// of windows based on the active user.
|
||||||
|
interface MultiUserWindowManager {
|
||||||
|
SetClient(associated MultiUserWindowManagerClient client);
|
||||||
|
|
||||||
|
// Associates a window with an account. If |show_for_current_user| is true,
|
||||||
|
// the window is associated with |account_id|, but is shown for the currently
|
||||||
|
// active user.
|
||||||
|
SetWindowOwner(uint64 window_id,
|
||||||
|
signin.mojom.AccountId account_id,
|
||||||
|
bool show_for_current_user);
|
||||||
|
|
||||||
|
// Shows a previously registered window for the specified account.
|
||||||
|
ShowWindowForUser(uint64 window_id,
|
||||||
|
signin.mojom.AccountId account_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
interface MultiUserWindowManagerClient {
|
||||||
|
// Called when the owner of a window supplied to SetWindowOwner() changes.
|
||||||
|
// |was_minimized| is true if the window was minimized. |teleported| is true
|
||||||
|
// if the window was not on the desktop of the current user.
|
||||||
|
OnWindowOwnerEntryChanged(uint64 window_id,
|
||||||
|
signin.mojom.AccountId account_id,
|
||||||
|
bool was_minimized,
|
||||||
|
bool teleported);
|
||||||
|
|
||||||
|
// Called when the active account changes. This is followed by
|
||||||
|
// OnTransitionUserShelfToNewAccount() and OnDidSwitchActiveAccount().
|
||||||
|
OnWillSwitchActiveAccount(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Called at the time when the user's shelf should transition to the account
|
||||||
|
// supplied to OnWillSwitchActiveAccount().
|
||||||
|
OnTransitionUserShelfToNewAccount();
|
||||||
|
|
||||||
|
// Called when the active account change is complete.
|
||||||
|
OnDidSwitchActiveAccount();
|
||||||
|
};
|
50
src/ash/public/interfaces/new_window.mojom
Normal file
50
src/ash/public/interfaces/new_window.mojom
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// For GURL.
|
||||||
|
import "url/mojom/url.mojom";
|
||||||
|
|
||||||
|
// An exported object in ash which lets an ash consumer set a client interface.
|
||||||
|
interface NewWindowController {
|
||||||
|
SetClient(associated NewWindowClient client);
|
||||||
|
};
|
||||||
|
|
||||||
|
// A delegate interface that an ash user sends to ash to handle certain window
|
||||||
|
// management responsibilities.
|
||||||
|
interface NewWindowClient {
|
||||||
|
// Invoked when the user uses Ctrl+T to open a new tab.
|
||||||
|
NewTab();
|
||||||
|
|
||||||
|
// Opens a new tab with the specified URL. If the |from_user_interaction|
|
||||||
|
// is true then the page will load with a user activation. This means the
|
||||||
|
// page will be able to autoplay media without restriction.
|
||||||
|
NewTabWithUrl(url.mojom.Url url, bool from_user_interaction);
|
||||||
|
|
||||||
|
// Invoked when the user uses Ctrl-N or Ctrl-Shift-N to open a new window.
|
||||||
|
NewWindow(bool incognito);
|
||||||
|
|
||||||
|
// Invoked when an accelerator is used to open the file manager.
|
||||||
|
OpenFileManager();
|
||||||
|
|
||||||
|
// Invoked when the user opens Crosh.
|
||||||
|
OpenCrosh();
|
||||||
|
|
||||||
|
// Invoked when an accelerator is used to open help center.
|
||||||
|
OpenGetHelp();
|
||||||
|
|
||||||
|
// Invoked when the user uses Shift+Ctrl+T to restore the closed tab.
|
||||||
|
RestoreTab();
|
||||||
|
|
||||||
|
// Show the keyboard shortcut viewer.
|
||||||
|
ShowKeyboardShortcutViewer();
|
||||||
|
|
||||||
|
// Shows the task manager window.
|
||||||
|
ShowTaskManager();
|
||||||
|
|
||||||
|
// Opens the feedback page for "Report Issue". If |from_assistant| is
|
||||||
|
// true then the page is triggered from Assistant.
|
||||||
|
OpenFeedbackPage(bool from_assistant);
|
||||||
|
};
|
52
src/ash/public/interfaces/night_light_controller.mojom
Normal file
52
src/ash/public/interfaces/night_light_controller.mojom
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// Represents a geolocation position fix. It's "simple" because it doesn't
|
||||||
|
// expose all the parameters of the position interface as defined by the
|
||||||
|
// Geolocation API Specification:
|
||||||
|
// (https://dev.w3.org/geo/api/spec-source.html#position_interface).
|
||||||
|
// The NightLightController is only interested in valid latitude and longitude.
|
||||||
|
// It also doesn't require any specific accuracy. The more accurate the
|
||||||
|
// positions, the more accurate sunset and sunrise times calculations. However,
|
||||||
|
// an IP-based geoposition is considered good enough.
|
||||||
|
struct SimpleGeoposition {
|
||||||
|
double latitude;
|
||||||
|
double longitude;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Used by a client (e.g. Chrome) to provide the current user's geoposition.
|
||||||
|
interface NightLightController {
|
||||||
|
// These values are written to logs. New enum values can be added, but
|
||||||
|
// existing enums must never be renumbered or deleted and reused.
|
||||||
|
enum ScheduleType {
|
||||||
|
// Automatic toggling of NightLight is turned off.
|
||||||
|
kNone = 0,
|
||||||
|
|
||||||
|
// Turned automatically on at the user's local sunset time, and off at the
|
||||||
|
// user's local sunrise time.
|
||||||
|
kSunsetToSunrise = 1,
|
||||||
|
|
||||||
|
// Toggled automatically based on the custom set start and end times
|
||||||
|
// selected by the user from the system settings.
|
||||||
|
kCustom = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Sets the client that will be notified of changes in the Night Light
|
||||||
|
// schedule type.
|
||||||
|
SetClient(NightLightClient client);
|
||||||
|
|
||||||
|
// Provides the NightLightController with the user's geoposition so that it
|
||||||
|
// can calculate the sunset and sunrise times. This should only be called when
|
||||||
|
// the schedule type is set to "Sunset to Sunrise".
|
||||||
|
SetCurrentGeoposition(SimpleGeoposition position);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Used by ash to notify a client (e.g. Chrome) of the changes in the Night
|
||||||
|
// Light schedule type.
|
||||||
|
interface NightLightClient {
|
||||||
|
// Notifies the client with the new schedule type whenever it changes.
|
||||||
|
OnScheduleTypeChanged(NightLightController.ScheduleType new_type);
|
||||||
|
};
|
19
src/ash/public/interfaces/note_taking_controller.mojom
Normal file
19
src/ash/public/interfaces/note_taking_controller.mojom
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
// Interface for ash client (e.g. Chrome) to connect to the note taking
|
||||||
|
// controller.
|
||||||
|
interface NoteTakingController {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(NoteTakingControllerClient client);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash to notify the client (e.g. Chrome) about the new note
|
||||||
|
// creation.
|
||||||
|
interface NoteTakingControllerClient {
|
||||||
|
// Called when the controller needs to create a new note.
|
||||||
|
CreateNote();
|
||||||
|
};
|
24
src/ash/public/interfaces/pref_connector.mojom
Normal file
24
src/ash/public/interfaces/pref_connector.mojom
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
import "services/preferences/public/mojom/preferences.mojom";
|
||||||
|
|
||||||
|
const string kPrefConnectorServiceName = "ash_pref_connector";
|
||||||
|
|
||||||
|
// A connector of PrefStoreConnectors. Provides ash with access to per-profile
|
||||||
|
// prefs.
|
||||||
|
interface PrefConnector {
|
||||||
|
// Provides a PrefStoreConnector for the signin screen profile prefs. Once
|
||||||
|
// connected the prefs continue to be available even after the user logs in.
|
||||||
|
GetPrefStoreConnectorForSigninScreen(
|
||||||
|
prefs.mojom.PrefStoreConnector& connector);
|
||||||
|
|
||||||
|
// Provides, via |connector|, a PrefStoreConnector for |account_id|. If
|
||||||
|
// |account_id| is invalid or unknown, |connector| will be closed.
|
||||||
|
GetPrefStoreConnectorForUser(signin.mojom.AccountId account_id,
|
||||||
|
prefs.mojom.PrefStoreConnector& connector);
|
||||||
|
};
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "mojo/public/mojom/base/time.mojom";
|
||||||
|
|
||||||
|
interface ProcessCreationTimeRecorder {
|
||||||
|
// Sets the time the main process was created at, used for logging metrics.
|
||||||
|
SetMainProcessCreationTime(mojo_base.mojom.TimeTicks start_time);
|
||||||
|
};
|
219
src/ash/public/interfaces/session_controller.mojom
Normal file
219
src/ash/public/interfaces/session_controller.mojom
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/user_info.mojom";
|
||||||
|
import "components/account_id/interfaces/account_id.mojom";
|
||||||
|
import "mojo/public/mojom/base/time.mojom";
|
||||||
|
|
||||||
|
// Matches session_manager::SessionState.
|
||||||
|
enum SessionState {
|
||||||
|
// Default value, when session state hasn't been initialized yet.
|
||||||
|
UNKNOWN,
|
||||||
|
|
||||||
|
// Running out of box UI.
|
||||||
|
OOBE,
|
||||||
|
|
||||||
|
// Running login UI (primary user) but user sign in hasn't completed yet.
|
||||||
|
LOGIN_PRIMARY,
|
||||||
|
|
||||||
|
// Running login UI (primary or secondary user), user sign in has been
|
||||||
|
// completed but login UI hasn't been hidden yet. This means that either
|
||||||
|
// some session initialization is happening or user has to go through some
|
||||||
|
// UI flow on the same login UI like select avatar, agree to terms of
|
||||||
|
// service etc.
|
||||||
|
LOGGED_IN_NOT_ACTIVE,
|
||||||
|
|
||||||
|
// A user(s) has logged in *and* login UI is hidden i.e. user session is
|
||||||
|
// not blocked.
|
||||||
|
ACTIVE,
|
||||||
|
|
||||||
|
// The session screen is locked.
|
||||||
|
LOCKED,
|
||||||
|
|
||||||
|
// Same as SESSION_STATE_LOGIN_PRIMARY but for multi-profiles sign in i.e.
|
||||||
|
// when there's at least one user already active in the session.
|
||||||
|
LOGIN_SECONDARY,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Matches ash::CycleUserDirection.
|
||||||
|
enum CycleUserDirection {
|
||||||
|
NEXT, // Cycle to the next user.
|
||||||
|
PREVIOUS, // Cycle to the previous user.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Info about a user session in ash. May be sent repeatedly for a single user
|
||||||
|
// because individual fields may change (e.g. the avatar image or custodians).
|
||||||
|
struct UserSession {
|
||||||
|
// A user session id for the user session. It is generated by session manager
|
||||||
|
// (chrome) when a user session starts and never changes during the lifetime
|
||||||
|
// of the session manager. The number starts at 1 for the first user session
|
||||||
|
// and incremented by one for each subsequent user session.
|
||||||
|
uint32 session_id;
|
||||||
|
|
||||||
|
// Contains general user information state, like the account id, display name,
|
||||||
|
// and avatar.
|
||||||
|
UserInfo user_info;
|
||||||
|
|
||||||
|
// For supervised users only, the email address of the custodian account.
|
||||||
|
// Empty for non-supervised users. Available after profile is loaded.
|
||||||
|
string custodian_email;
|
||||||
|
|
||||||
|
// For supervised users only, the email address of the second custodian
|
||||||
|
// account, if any. Available after profile is loaded.
|
||||||
|
string second_custodian_email;
|
||||||
|
|
||||||
|
// Whether the settings icon should be enabled in the system tray menu.
|
||||||
|
// Usually true after login, but can be false for specialized user sessions
|
||||||
|
// (e.g. adding supervised users).
|
||||||
|
bool should_enable_settings;
|
||||||
|
|
||||||
|
// Similar to |should_show_settings| but for the notification tray.
|
||||||
|
bool should_show_notification_tray;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Matches ash::AddUserSessionPolicy.
|
||||||
|
enum AddUserSessionPolicy {
|
||||||
|
// Adding a user session is allowed.
|
||||||
|
ALLOWED,
|
||||||
|
|
||||||
|
// Disallowed due to primary user's policy.
|
||||||
|
ERROR_NOT_ALLOWED_PRIMARY_USER,
|
||||||
|
|
||||||
|
// Disallowed due to no eligible users.
|
||||||
|
ERROR_NO_ELIGIBLE_USERS,
|
||||||
|
|
||||||
|
// Disallowed due to reaching maximum supported user.
|
||||||
|
ERROR_MAXIMUM_USERS_REACHED,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Info about an ash session.
|
||||||
|
struct SessionInfo {
|
||||||
|
// Whether the screen can be locked.
|
||||||
|
bool can_lock_screen;
|
||||||
|
|
||||||
|
// Whether the screen should be locked automatically before suspending.
|
||||||
|
bool should_lock_screen_automatically;
|
||||||
|
|
||||||
|
// Whether the session is in app mode, which includes a kiosk-like mode for
|
||||||
|
// fullscreen web content or running a single [forced] Chrome or ARC app.
|
||||||
|
bool is_running_in_app_mode;
|
||||||
|
|
||||||
|
// Whether the session is a demo session, which is an ephemeral session for
|
||||||
|
// Demo Mode.
|
||||||
|
bool is_demo_session;
|
||||||
|
|
||||||
|
// Sets whether adding a user session to ash is allowed.
|
||||||
|
AddUserSessionPolicy add_user_session_policy;
|
||||||
|
|
||||||
|
// Current state of the ash session.
|
||||||
|
SessionState state;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash client (e.g. Chrome) to set session info for ash.
|
||||||
|
interface SessionController {
|
||||||
|
// Sets the client interface.
|
||||||
|
SetClient(SessionControllerClient client);
|
||||||
|
|
||||||
|
// Sets the ash session info.
|
||||||
|
SetSessionInfo(SessionInfo info);
|
||||||
|
|
||||||
|
// Updates a user session. This is called when a user session is added or
|
||||||
|
// its meta data (e.g. name, avatar) is changed. There is no method to remove
|
||||||
|
// a user session because ash/chrome does not support that. All users are
|
||||||
|
// logged out at the same time.
|
||||||
|
UpdateUserSession(UserSession user_session);
|
||||||
|
|
||||||
|
// Sets the order of user sessions. The order is keyed by the session id.
|
||||||
|
// Currently, session manager set a LRU order with the first one being the
|
||||||
|
// active user session.
|
||||||
|
SetUserSessionOrder(array<uint32> user_session_ids);
|
||||||
|
|
||||||
|
// Prepares ash for lock screen. Currently this ensures the current active
|
||||||
|
// window could not be used to mimic the lock screen. Lock screen is created
|
||||||
|
// after this call returns.
|
||||||
|
PrepareForLock() => ();
|
||||||
|
|
||||||
|
// Runs the pre-lock animation to start locking ash. When the call returns,
|
||||||
|
// |locked| == true means that the ash post-lock animation is finished and ash
|
||||||
|
// is fully locked. Otherwise |locked| is false, which means something is
|
||||||
|
// wrong for the lock and ash is not locked. When the call returns with a true
|
||||||
|
// |locked|, screen locker runs the post lock jobs such as a11y announcement
|
||||||
|
// etc. Invoked by the screen locker during initialization.
|
||||||
|
StartLock() => (bool locked);
|
||||||
|
|
||||||
|
// Notifies ash that chrome lock animations are finished. This is the last
|
||||||
|
// event for locking. SessionController forwards it to PowerEventObserver.
|
||||||
|
NotifyChromeLockAnimationsComplete();
|
||||||
|
|
||||||
|
// Runs the pre-unlock animation. Invoked by the screen locker before
|
||||||
|
// dismissing. When the mojo call returns, screen locker takes that as a
|
||||||
|
// signal of finished unlock animation and dismisses itself.
|
||||||
|
RunUnlockAnimation() => ();
|
||||||
|
|
||||||
|
// Notifies that chrome is terminating.
|
||||||
|
NotifyChromeTerminating();
|
||||||
|
|
||||||
|
// Adds a countdown timer to the system tray menu and creates or updates a
|
||||||
|
// notification saying the session length is limited (e.g. a public session in
|
||||||
|
// a library). Setting |length_limit| to zero removes the notification.
|
||||||
|
// NOTE: Chrome enforces the limit, not ash. Ash could enforce it if local
|
||||||
|
// state prefs and user activity monitoring were available under mustash.
|
||||||
|
// http://crbug.com/729808
|
||||||
|
SetSessionLengthLimit(mojo_base.mojom.TimeDelta length_limit,
|
||||||
|
mojo_base.mojom.TimeTicks start_time);
|
||||||
|
|
||||||
|
// Returns whether it's ok to switch the active multiprofile user. May affect
|
||||||
|
// or be affected by system state such as window overview mode and screen
|
||||||
|
// casting.
|
||||||
|
CanSwitchActiveUser() => (bool can_switch);
|
||||||
|
|
||||||
|
// Shows a dialog to explain the implications of signing in multiple users.
|
||||||
|
// If |on_accept| is false, |permanently_accept| is ignored.
|
||||||
|
ShowMultiprofilesIntroDialog() => (bool on_accept, bool permanently_accept);
|
||||||
|
|
||||||
|
// Shows a dialog to confirm that the user wants to teleport a window to
|
||||||
|
// another desktop. If |on_accept| is false, |permanently_accept| is ignored.
|
||||||
|
ShowTeleportWarningDialog() => (bool on_accept, bool permanently_accept);
|
||||||
|
|
||||||
|
// Shows a dialog that explains that the given user is no longer allowed in
|
||||||
|
// the session due to a policy change, and aborts the session.
|
||||||
|
ShowMultiprofilesSessionAbortedDialog(string user_email);
|
||||||
|
|
||||||
|
// Adds session activation observer. The observer is called when session
|
||||||
|
// with |account_id| is becoming active or inactive. The observer is
|
||||||
|
// immediately called for upon registration with the current status.
|
||||||
|
AddSessionActivationObserverForAccountId(
|
||||||
|
signin.mojom.AccountId account_id, SessionActivationObserver observer);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash to request session service from its client (e.g. Chrome).
|
||||||
|
interface SessionControllerClient {
|
||||||
|
// Requests to lock screen.
|
||||||
|
RequestLockScreen();
|
||||||
|
|
||||||
|
// Requests signing out all users, ending the current session.
|
||||||
|
RequestSignOut();
|
||||||
|
|
||||||
|
// Switch to the active user with |account_id| (if the user has already signed
|
||||||
|
// in).
|
||||||
|
SwitchActiveUser(signin.mojom.AccountId account_id);
|
||||||
|
|
||||||
|
// Switch the active user to the next or previous user.
|
||||||
|
CycleActiveUser(CycleUserDirection direction);
|
||||||
|
|
||||||
|
// Show the multi-profile login UI to add another user to this session.
|
||||||
|
ShowMultiProfileLogin();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Interface for ash to notify client of sessions status for a specific
|
||||||
|
// |account_id|.
|
||||||
|
interface SessionActivationObserver {
|
||||||
|
// Called the session is becoming active or inactive.
|
||||||
|
OnSessionActivated(bool activated);
|
||||||
|
|
||||||
|
// Called when lock screen state changes.
|
||||||
|
OnLockStateChanged(bool locked);
|
||||||
|
};
|
18
src/ash/public/interfaces/session_controller.typemap
Normal file
18
src/ash/public/interfaces/session_controller.typemap
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2016 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.
|
||||||
|
|
||||||
|
mojom = "//ash/public/interfaces/session_controller.mojom"
|
||||||
|
public_headers = [
|
||||||
|
"//ash/public/cpp/session_types.h",
|
||||||
|
"//components/session_manager/session_manager_types.h",
|
||||||
|
]
|
||||||
|
traits_headers = [ "//ash/public/interfaces/session_controller_traits.h" ]
|
||||||
|
public_deps = [
|
||||||
|
"//components/session_manager:base",
|
||||||
|
]
|
||||||
|
type_mappings = [
|
||||||
|
"ash.mojom.AddUserSessionPolicy=ash::AddUserSessionPolicy",
|
||||||
|
"ash.mojom.CycleUserDirection=ash::CycleUserDirection",
|
||||||
|
"ash.mojom.SessionState=session_manager::SessionState",
|
||||||
|
]
|
147
src/ash/public/interfaces/shelf.mojom
Normal file
147
src/ash/public/interfaces/shelf.mojom
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
// Copyright 2016 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.
|
||||||
|
|
||||||
|
module ash.mojom;
|
||||||
|
|
||||||
|
import "ash/public/interfaces/menu.mojom";
|
||||||
|
import "mojo/public/mojom/base/string16.mojom";
|
||||||
|
import "ui/events/mojo/event.mojom";
|
||||||
|
import "ui/gfx/image/mojo/image.mojom";
|
||||||
|
|
||||||
|
// The actions that may be performed when a shelf item is selected.
|
||||||
|
// These values match ash::ShelfAction.
|
||||||
|
enum ShelfAction {
|
||||||
|
NONE, // No action was taken.
|
||||||
|
WINDOW_CREATED, // A new window was created.
|
||||||
|
WINDOW_ACTIVATED, // An existing inactive window was activated.
|
||||||
|
WINDOW_MINIMIZED, // The currently active window was minimized.
|
||||||
|
APP_LIST_SHOWN, // The app list launcher menu was shown.
|
||||||
|
APP_LIST_DISMISSED,// The app list launcher menu was dismissed.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Represents the status of items in the shelf.
|
||||||
|
// These values match ash::ShelfItemStatus.
|
||||||
|
enum ShelfItemStatus {
|
||||||
|
CLOSED, // A closed shelf item, i.e. has no live instance.
|
||||||
|
RUNNING, // A shelf item that has live instance.
|
||||||
|
ATTENTION, // A shelf item that needs user's attention.
|
||||||
|
};
|
||||||
|
|
||||||
|
// The type of a shelf item.
|
||||||
|
// These values match ash::ShelfItemType.
|
||||||
|
enum ShelfItemType {
|
||||||
|
PINNED_APP, // A pinned app, which may be running or not.
|
||||||
|
APP_LIST, // An item that toggles visiblity of the app list.
|
||||||
|
BROWSER, // The browser shortcut, the browser may be running or not.
|
||||||
|
APP, // An unpinned running app window. Supports these app types:
|
||||||
|
// - Extension "V1" (legacy packaged and hosted) apps,
|
||||||
|
// - Extension "V2" (platform) apps,
|
||||||
|
// - ARC (App Runtime for Chrome - Android Play Store) apps.
|
||||||
|
DIALOG, // An open dialog.
|
||||||
|
BACK_BUTTON, // The back button, which is shown in tablet mode.
|
||||||
|
UNDEFINED, // Default value.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Source of the launch or activation request, for tracking.
|
||||||
|
// These values match ash::ShelfLaunchSource.
|
||||||
|
enum ShelfLaunchSource {
|
||||||
|
UNKNOWN, // The item was launched from elsewhere.
|
||||||
|
APP_LIST, // The item was launched from a generic app list view.
|
||||||
|
APP_LIST_SEARCH, // The item was launched from an app list search view.
|
||||||
|
SHELF, // The item was launched from the shelf.
|
||||||
|
};
|
||||||
|
|
||||||
|
// The Shelf controller allows clients (eg. Chrome) to control the ash shelf.
|
||||||
|
interface ShelfController {
|
||||||
|
// Observers are immediately notified of the current shelf states when added.
|
||||||
|
AddObserver(associated ShelfObserver observer);
|
||||||
|
|
||||||
|
// Note: ShelfObservers are not notified of ShelfModel changes made by the
|
||||||
|
// ShelfItem functions below. Chrome is the solitary ShelfObserver and client
|
||||||
|
// of these functions, so notifications would be cyclical and problematic.
|
||||||
|
|
||||||
|
// Add |item| at |index|, which is clamped to be greater than 0 (AppList's
|
||||||
|
// index) and not exceeding the item count. Use a negative |index| to append.
|
||||||
|
AddShelfItem(int32 index, ShelfItem item);
|
||||||
|
// Remove the item with |id|. Bails if |id| is unknown or for the AppList.
|
||||||
|
RemoveShelfItem(ShelfID id);
|
||||||
|
// Moves item with |id| to |index|, which is in terms of the model after the
|
||||||
|
// item is removed, and is clamped to be greater than 0 (AppList's index) and
|
||||||
|
// not exceeding the item count. Bails if |id| is unknown or for the AppList.
|
||||||
|
MoveShelfItem(ShelfID id, int32 target_index);
|
||||||
|
// Updates |item| via ShelfID. Bails if the id is unknown or for the AppList.
|
||||||
|
// Clients may pass null images to signal no change and avoid transport costs.
|
||||||
|
UpdateShelfItem(ShelfItem item);
|
||||||
|
// Sets the |delegate| for the item with |id|.
|
||||||
|
SetShelfItemDelegate(ShelfID id, ShelfItemDelegate delegate);
|
||||||
|
};
|
||||||
|
|
||||||
|
// A Shelf observer, used to persist profile settings and cache a ShelfModel.
|
||||||
|
interface ShelfObserver {
|
||||||
|
// Called when the |item| has been added at |index|.
|
||||||
|
// This passes null images to avoid transport costs; clients don't use images.
|
||||||
|
OnShelfItemAdded(int32 index, ShelfItem item);
|
||||||
|
// Called when the item with |id| has been removed.
|
||||||
|
OnShelfItemRemoved(ShelfID id);
|
||||||
|
// Called when the item with |id| has been moved to |index|.
|
||||||
|
OnShelfItemMoved(ShelfID id, int32 index);
|
||||||
|
// Called when the |item| with matching ShelfID has been updated.
|
||||||
|
// This passes null images to avoid transport costs; clients don't use images.
|
||||||
|
OnShelfItemUpdated(ShelfItem item);
|
||||||
|
// Called when |delegate| for the item with |id| has been changed.
|
||||||
|
OnShelfItemDelegateChanged(ShelfID id, ShelfItemDelegate delegate);
|
||||||
|
};
|
||||||
|
|
||||||
|
// ShelfItemDelegate handles shelf item selection, menu command execution, etc.
|
||||||
|
interface ShelfItemDelegate {
|
||||||
|
// Called when the user selects a shelf item. The event, display, and source
|
||||||
|
// info should be provided if known; some implementations use these arguments.
|
||||||
|
// Defaults: (nullptr, kInvalidDisplayId, LAUNCH_FROM_UNKNOWN)
|
||||||
|
// The callback reports the action taken and any app menu items to show.
|
||||||
|
//
|
||||||
|
// NOTE: This codepath is not currently used for context menu triggering.
|
||||||
|
// TODO(crbug.com/691099): Remove |display_id| once panels are removed.
|
||||||
|
ItemSelected(ui.mojom.Event event,
|
||||||
|
int64 display_id,
|
||||||
|
ShelfLaunchSource source) => (ShelfAction action,
|
||||||
|
array<MenuItem>? menu_items);
|
||||||
|
|
||||||
|
// Called when spawning a shelf item context menu, returns custom menu items.
|
||||||
|
// TODO(mash): Clients should push context menu items to Ash's shelf model.
|
||||||
|
GetContextMenuItems(int64 display_id) => (array<MenuItem> items);
|
||||||
|
|
||||||
|
// Called on invocation of a shelf item's context or application menu command.
|
||||||
|
// |from_context_menu| is true if the command came from a context menu, or
|
||||||
|
// false if the command came from an application menu. If the |display_id| is
|
||||||
|
// unknown or irrelevant, callers may pass |display::kInvalidDisplayId|.
|
||||||
|
ExecuteCommand(bool from_context_menu,
|
||||||
|
int64 command_id,
|
||||||
|
int32 event_flags,
|
||||||
|
int64 display_id);
|
||||||
|
|
||||||
|
// Closes all windows associated with this shelf item.
|
||||||
|
Close();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Identifier for shelf items and their windows.
|
||||||
|
// This structure matches ash::ShelfID.
|
||||||
|
struct ShelfID {
|
||||||
|
string app_id; // An app id string, used to match app windows.
|
||||||
|
// (eg. extension ids, arc ids, "AppList", etc.)
|
||||||
|
string launch_id; // A string used to support multiple items per app.
|
||||||
|
// (eg. Citrix may use 'Word' or 'Excel' launch ids)
|
||||||
|
};
|
||||||
|
|
||||||
|
// ShelfItems are used to populate the shelf.
|
||||||
|
// This structure matches ash::ShelfItem.
|
||||||
|
struct ShelfItem {
|
||||||
|
ShelfItemType type; // The type of the shelf item.
|
||||||
|
gfx.mojom.ImageSkia? image; // The icon shown on the shelf; null for updates
|
||||||
|
// with no icon change, null for ShelfObservers.
|
||||||
|
ShelfItemStatus status; // The running/closed/etc. status of the item.
|
||||||
|
ShelfID shelf_id; // The id for the shelf item and its windows.
|
||||||
|
mojo_base.mojom.String16 title; // The title to display for tooltips, etc.
|
||||||
|
bool pinned_by_policy; // Whether the item is pinned by policy prefs,
|
||||||
|
// the user cannot un-pin these items.
|
||||||
|
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user