Commit 0b8b11bf authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Chromium LUCI CQ

Files app: Add JS modules for foreground page

Add JS modules for //ui/file_manager/file_manager/foreground/js/ui/ :
- location_line.js
- banners.js
- providers_menu.js

Bug: 1133186
Change-Id: I6200138fbf3507a38cb08d8ace292c62526e4ba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627208
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarJeremie Boulic <jboulic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842921}
parent 6d696868
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
/** /**
* Returns the volume types for which the holding space feature is allowed. * Returns the volume types for which the holding space feature is allowed.
* @return {!Array<VolumeManagerCommon.VolumeType>} * @return {!Array<?VolumeManagerCommon.VolumeType>}
*/ */
static getAllowedVolumeTypes() { static getAllowedVolumeTypes() {
return [ return [
......
...@@ -26,6 +26,7 @@ js_type_check("closure_compile_jsmodules") { ...@@ -26,6 +26,7 @@ js_type_check("closure_compile_jsmodules") {
":a11y_announce.m", ":a11y_announce.m",
":action_model_ui.m", ":action_model_ui.m",
":actions_submenu.m", ":actions_submenu.m",
":banners.m",
":breadcrumb.m", ":breadcrumb.m",
":combobutton.m", ":combobutton.m",
":commandbutton.m", ":commandbutton.m",
...@@ -47,9 +48,11 @@ js_type_check("closure_compile_jsmodules") { ...@@ -47,9 +48,11 @@ js_type_check("closure_compile_jsmodules") {
":import_crostini_image_dialog.m", ":import_crostini_image_dialog.m",
":install_linux_package_dialog.m", ":install_linux_package_dialog.m",
":list_container.m", ":list_container.m",
":location_line.m",
":multi_menu.m", ":multi_menu.m",
":multi_menu_button.m", ":multi_menu_button.m",
":progress_center_panel.m", ":progress_center_panel.m",
":providers_menu.m",
":suggest_apps_dialog.m", ":suggest_apps_dialog.m",
"table:table.m", "table:table.m",
"table:table_column.m", "table:table_column.m",
...@@ -200,6 +203,27 @@ js_library("banners") { ...@@ -200,6 +203,27 @@ js_library("banners") {
externs_list = [ "//ui/file_manager/externs/chrome_echo_private.js" ] externs_list = [ "//ui/file_manager/externs/chrome_echo_private.js" ]
} }
js_library("banners.m") {
sources = [
"$root_gen_dir/ui/file_manager/file_manager/foreground/js/ui/banners.m.js",
]
deps = [
"//ui/file_manager/base/js:volume_manager_types.m",
"//ui/file_manager/externs:volume_info.m",
"//ui/file_manager/externs:volume_manager.m",
"//ui/file_manager/file_manager/common/js:util.m",
"//ui/file_manager/file_manager/foreground/js:constants.m",
"//ui/file_manager/file_manager/foreground/js:directory_model.m",
"//ui/file_manager/file_manager/foreground/js:holding_space_util.m",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:cr.m",
"//ui/webui/resources/js:util.m",
"//ui/webui/resources/js/cr:event_target.m",
]
extra_deps = [ ":modulize" ]
}
js_library("breadcrumb") { js_library("breadcrumb") {
deps = [ "//ui/webui/resources/cr_elements/cr_action_menu:cr_action_menu" ] deps = [ "//ui/webui/resources/cr_elements/cr_action_menu:cr_action_menu" ]
} }
...@@ -831,6 +855,22 @@ js_library("location_line") { ...@@ -831,6 +855,22 @@ js_library("location_line") {
] ]
} }
js_library("location_line.m") {
sources = [ "$root_gen_dir/ui/file_manager/file_manager/foreground/js/ui/location_line.m.js" ]
deps = [
":list_container.m",
"//ui/file_manager/externs:files_app_entry_interfaces.m",
"//ui/file_manager/externs:volume_manager.m",
"//ui/file_manager/file_manager/common/js:metrics.m",
"//ui/file_manager/file_manager/common/js:util.m",
"//ui/file_manager/file_manager/foreground/elements:files_tooltip.m",
"//ui/file_manager/file_manager/foreground/js:path_component.m",
"//ui/webui/resources/js/cr:event_target.m",
]
extra_deps = [ ":modulize" ]
}
js_library("multi_menu") { js_library("multi_menu") {
deps = [ deps = [
# TODO(files-ng): remove util dep when the files-ng flag is removed. # TODO(files-ng): remove util dep when the files-ng flag is removed.
...@@ -930,6 +970,20 @@ js_library("providers_menu") { ...@@ -930,6 +970,20 @@ js_library("providers_menu") {
externs_list = [ "//ui/file_manager/externs/menu_item_update_event.js" ] externs_list = [ "//ui/file_manager/externs/menu_item_update_event.js" ]
} }
js_library("providers_menu.m") {
sources = [ "$root_gen_dir/ui/file_manager/file_manager/foreground/js/ui/providers_menu.m.js" ]
deps = [
":files_menu.m",
"//ui/file_manager/file_manager/common/js:util.m",
"//ui/file_manager/file_manager/foreground/js:providers_model.m",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js/cr:ui.m",
"//ui/webui/resources/js/cr/ui:menu.m",
]
extra_deps = [ ":modulize" ]
}
js_library("search_box") { js_library("search_box") {
deps = [ deps = [
":autocomplete_list", ":autocomplete_list",
...@@ -1017,6 +1071,9 @@ js_modulizer("modulize") { ...@@ -1017,6 +1071,9 @@ js_modulizer("modulize") {
input_files = [ input_files = [
"a11y_announce.js", "a11y_announce.js",
"action_model_ui.js", "action_model_ui.js",
"actions_submenu.js",
"banners.js",
"breadcrumb.js",
"combobutton.js", "combobutton.js",
"commandbutton.js", "commandbutton.js",
"default_task_dialog.js", "default_task_dialog.js",
...@@ -1033,16 +1090,16 @@ js_modulizer("modulize") { ...@@ -1033,16 +1090,16 @@ js_modulizer("modulize") {
"files_alert_dialog.js", "files_alert_dialog.js",
"files_confirm_dialog.js", "files_confirm_dialog.js",
"files_menu.js", "files_menu.js",
"gear_menu.js",
"import_crostini_image_dialog.js",
"install_linux_package_dialog.js",
"list_container.js", "list_container.js",
"location_line.js",
"multi_menu.js", "multi_menu.js",
"multi_menu_button.js", "multi_menu_button.js",
"progress_center_panel.js", "progress_center_panel.js",
"providers_menu.js",
"suggest_apps_dialog.js", "suggest_apps_dialog.js",
"actions_submenu.js",
"breadcrumb.js",
"gear_menu.js",
"import_crostini_image_dialog.js",
"install_linux_package_dialog.js",
] ]
namespace_rewrites = cr_namespace_rewrites namespace_rewrites = cr_namespace_rewrites
......
...@@ -2,6 +2,21 @@ ...@@ -2,6 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// clang-format off
// #import {VolumeInfo} from '../../../../externs/volume_info.m.js';
// #import {VolumeManager} from '../../../../externs/volume_manager.m.js';
// #import {DirectoryModel} from '../directory_model.m.js';
// #import {VolumeManagerCommon} from '../../../../base/js/volume_manager_types.m.js';
// #import {constants} from '../constants.m.js';
// #import {HoldingSpaceUtil} from '../holding_space_util.m.js';
// #import {queryRequiredElement} from 'chrome://resources/js/util.m.js';
// #import {util, str, strf} from '../../../common/js/util.m.js';
// #import {NativeEventTarget as EventTarget} from 'chrome://resources/js/cr/event_target.m.js';
// #import {dispatchSimpleEvent} from 'chrome://resources/js/cr.m.js';
// #import {assert} from 'chrome://resources/js/assert.m.js';
// clang-format on
/** /**
* Key in localStorage to keep number of times the Drive Welcome * Key in localStorage to keep number of times the Drive Welcome
* banner has shown. * banner has shown.
...@@ -76,7 +91,7 @@ const OFFLINE_INFO_BANNER_COUNTER_LIMIT = 3; ...@@ -76,7 +91,7 @@ const OFFLINE_INFO_BANNER_COUNTER_LIMIT = 3;
* - WelcomeBanner * - WelcomeBanner
* - AuthFailBanner * - AuthFailBanner
*/ */
class Banners extends cr.EventTarget { /* #export */ class Banners extends cr.EventTarget {
/** /**
* @param {DirectoryModel} directoryModel The model. * @param {DirectoryModel} directoryModel The model.
* @param {!VolumeManager} volumeManager The manager. * @param {!VolumeManager} volumeManager The manager.
......
...@@ -2,10 +2,21 @@ ...@@ -2,10 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// clang-format off
// #import {FakeEntry} from '../../../../externs/files_app_entry_interfaces.m.js';
// #import {FilesTooltip} from '../../elements/files_tooltip.m.js';
// #import {ListContainer} from './list_container.m.js';
// #import {VolumeManager} from '../../../../externs/volume_manager.m.js';
// #import {util} from '../../../common/js/util.m.js';
// #import {PathComponent} from '../path_component.m.js';
// #import {NativeEventTarget as EventTarget} from 'chrome://resources/js/cr/event_target.m.js';
// #import {metrics} from '../../../common/js/metrics.m.js';
// clang-format on
/** /**
* Location line. * Location line.
*/ */
class LocationLine extends cr.EventTarget { /* #export */ class LocationLine extends cr.EventTarget {
/** /**
* @param {!Element} breadcrumbs Container element for breadcrumbs. * @param {!Element} breadcrumbs Container element for breadcrumbs.
* @param {!VolumeManager} volumeManager Volume manager. * @param {!VolumeManager} volumeManager Volume manager.
......
...@@ -2,10 +2,17 @@ ...@@ -2,10 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// #import {Menu} from 'chrome://resources/js/cr/ui/menu.m.js';
// #import {ProvidersModel} from '../providers_model.m.js';
// #import {util} from '../../../common/js/util.m.js';
// #import {FilesMenuItem} from './files_menu.m.js';
// #import {decorate} from 'chrome://resources/js/cr/ui.m.js';
// #import {assert} from 'chrome://resources/js/assert.m.js';
/** /**
* Fills out the menu for mounting or installing new providers. * Fills out the menu for mounting or installing new providers.
*/ */
class ProvidersMenu { /* #export */ class ProvidersMenu {
/** /**
* @param {!ProvidersModel} model * @param {!ProvidersModel} model
* @param {!cr.ui.Menu} menu * @param {!cr.ui.Menu} menu
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment