Commit d066ded8 authored by Jérémie Boulic's avatar Jérémie Boulic Committed by Commit Bot

Audio player: Convert last dependencies in //ui/.../background/js/

In //ui/file_manager/file_manager/background/js:
- app_window.js
- app_window_wrapper.js
- background_base.js

Bug: 1133186
Change-Id: I5d90323c2f330eb4967c4710141d52ce9cd26b87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2525885
Commit-Queue: Jeremie Boulic <jboulic@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825717}
parent d9689b0f
...@@ -72,6 +72,9 @@ js_type_check("closure_compile_module") { ...@@ -72,6 +72,9 @@ js_type_check("closure_compile_module") {
js_type_check("closure_compile_jsmodules") { js_type_check("closure_compile_jsmodules") {
uses_js_modules = true uses_js_modules = true
deps = [ deps = [
":app_window_wrapper.m",
":app_windows.m",
":background_base.m",
":entry_location_impl.m", ":entry_location_impl.m",
":volume_info_impl.m", ":volume_info_impl.m",
":volume_info_list_impl.m", ":volume_info_list_impl.m",
...@@ -134,9 +137,30 @@ js_library("app_window_wrapper") { ...@@ -134,9 +137,30 @@ js_library("app_window_wrapper") {
] ]
} }
js_library("app_window_wrapper.m") {
visibility += related_apps
sources = [ "$root_gen_dir/ui/file_manager/file_manager/background/js/app_window_wrapper.m.js" ]
deps = [
":app_windows.m",
"//ui/file_manager/base/js:app_util.m",
"//ui/file_manager/file_manager/common/js:async_util.m",
"//ui/webui/resources/js:assert.m",
]
extra_deps = [ ":modulize" ]
}
js_library("app_windows") { js_library("app_windows") {
} }
js_library("app_windows.m") {
sources = [
"$root_gen_dir/ui/file_manager/file_manager/background/js/app_windows.m.js",
]
extra_deps = [ ":modulize" ]
}
js_library("background") { js_library("background") {
deps = [ deps = [
":app_windows", ":app_windows",
...@@ -172,6 +196,19 @@ js_library("background_base") { ...@@ -172,6 +196,19 @@ js_library("background_base") {
] ]
} }
js_library("background_base.m") {
visibility += related_apps
sources = [ "$root_gen_dir/ui/file_manager/file_manager/background/js/background_base.m.js" ]
deps = [
":volume_manager_factory.m",
"//ui/file_manager/file_manager/common/js:util.m",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:load_time_data.m",
]
extra_deps = [ ":modulize" ]
}
js_library("crostini") { js_library("crostini") {
deps = [ deps = [
"//ui/file_manager/base/js:volume_manager_types", "//ui/file_manager/base/js:volume_manager_types",
...@@ -745,6 +782,9 @@ js_test_gen_html("js_test_gen_html") { ...@@ -745,6 +782,9 @@ js_test_gen_html("js_test_gen_html") {
js_modulizer("modulize") { js_modulizer("modulize") {
input_files = [ input_files = [
"app_windows.js",
"app_window_wrapper.js",
"background_base.js",
"entry_location_impl.js", "entry_location_impl.js",
"mock_volume_manager.js", "mock_volume_manager.js",
"volume_info_impl.js", "volume_info_impl.js",
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
// 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 './app_windows.m.js';
// #import * as wrappedAsyncUtil from '../../common/js/async_util.m.js'; const {AsyncUtil} = wrappedAsyncUtil;
// #import * as wrappedAppUtil from '../../../base/js/app_util.m.js'; const {appUtil} = wrappedAppUtil;
// #import {assertInstanceof} from 'chrome://resources/js/assert.m.js';
// clang-format on
/** /**
* Wrapper for an app window. * Wrapper for an app window.
* *
...@@ -13,7 +20,7 @@ ...@@ -13,7 +20,7 @@
* 3. The app may have |unload| function to persist the app state that does not * 3. The app may have |unload| function to persist the app state that does not
* fit into |window.appState|. * fit into |window.appState|.
*/ */
class AppWindowWrapper { /* #export */ class AppWindowWrapper {
/** /**
* @param {string} url App window content url. * @param {string} url App window content url.
* @param {string} id App window id. * @param {string} id App window id.
...@@ -313,7 +320,7 @@ AppWindowWrapper.SHIFT_DISTANCE = 40; ...@@ -313,7 +320,7 @@ AppWindowWrapper.SHIFT_DISTANCE = 40;
* have |reload| method that re-initializes the app based on a changed * have |reload| method that re-initializes the app based on a changed
* |window.appState|. * |window.appState|.
*/ */
class SingletonAppWindowWrapper extends AppWindowWrapper { /* #export */ class SingletonAppWindowWrapper extends AppWindowWrapper {
/** /**
* @param {string} url App window content url. * @param {string} url App window content url.
* @param {Object|function()} options Options object or a function to return * @param {Object|function()} options Options object or a function to return
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Map of all currently open file dialogs. The key is an app ID. * Map of all currently open file dialogs. The key is an app ID.
* @type {!Object<!chrome.app.window.AppWindow>} * @type {!Object<!chrome.app.window.AppWindow>}
*/ */
window.appWindows = {}; window.appWindows = window.appWindows || {};
/** /**
* Gets similar windows, it means with the same initial url. * Gets similar windows, it means with the same initial url.
......
...@@ -2,13 +2,20 @@ ...@@ -2,13 +2,20 @@
// 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 * as wrappedVolumeManagerFactory from './volume_manager_factory.m.js'; const {volumeManagerFactory} = wrappedVolumeManagerFactory;
// #import * as wrappedUtil from '../../common/js/util.m.js'; const {util} = wrappedUtil;
// #import {assert} from 'chrome://resources/js/assert.m.js';
// #import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
// clang-format on
/** @typedef {function(!Array<string>):!Promise} */ /** @typedef {function(!Array<string>):!Promise} */
let LaunchHandler; let LaunchHandler;
/** /**
* Root class of the background page. * Root class of the background page.
*/ */
class BackgroundBase { /* #export */ class BackgroundBase {
constructor() { constructor() {
/** /**
* Map of all currently open file dialogs. The key is an app ID. * Map of all currently open file dialogs. The key is an app ID.
......
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