Commit 74ee693e authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Chromium LUCI CQ

Files app: Move global entities used from foreground

Move launchFileManager() from `launcher` namespace and registerDialog()
from global namespace to the interface FileBrowserBackgroundFull.

This keeps consistent all access from foreground page going through this
interface.

Bug: 1133186
Change-Id: I91157545620013baeef6eaa0143a5758a289a8ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612254
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarJeremie Boulic <jboulic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840950}
parent 34fb6073
...@@ -90,6 +90,7 @@ js_type_check("closure_compile_jsmodules") { ...@@ -90,6 +90,7 @@ js_type_check("closure_compile_jsmodules") {
":media_import_handler.m", ":media_import_handler.m",
":media_scanner.m", ":media_scanner.m",
":metadata_proxy.m", ":metadata_proxy.m",
":metrics_start.m",
":mock_drive_sync_handler.m", ":mock_drive_sync_handler.m",
":mock_file_operation_manager.m", ":mock_file_operation_manager.m",
":mock_progress_center.m", ":mock_progress_center.m",
...@@ -662,6 +663,13 @@ js_unittest("metadata_proxy_unittest.m") { ...@@ -662,6 +663,13 @@ js_unittest("metadata_proxy_unittest.m") {
] ]
} }
js_library("metrics_start.m") {
sources = [ "$root_gen_dir/ui/file_manager/file_manager/background/js/metrics_start.m.js" ]
deps = [ "//ui/file_manager/file_manager/common/js:metrics.m" ]
extra_deps = [ ":modulize" ]
}
js_library("import_history") { js_library("import_history") {
deps = [ deps = [
":metadata_proxy", ":metadata_proxy",
...@@ -1043,6 +1051,22 @@ js_library("test_util_base.m") { ...@@ -1043,6 +1051,22 @@ js_library("test_util_base.m") {
extra_deps = [ ":modulize" ] extra_deps = [ ":modulize" ]
} }
js_library("test_util.m") {
sources = [
"$root_gen_dir/ui/file_manager/file_manager/background/js/test_util.m.js",
]
deps = [
":background.m",
":launcher.m",
":test_util_base.m",
"//ui/file_manager/file_manager/common/js:progress_center_common.m",
"//ui/file_manager/file_manager/common/js:util.m",
]
extra_deps = [ ":modulize" ]
}
js_library("test_import_history") { js_library("test_import_history") {
testonly = true testonly = true
deps = [ deps = [
...@@ -1269,8 +1293,10 @@ js_modulizer("modulize") { ...@@ -1269,8 +1293,10 @@ js_modulizer("modulize") {
"mock_file_operation_manager.js", "mock_file_operation_manager.js",
"mock_progress_center.js", "mock_progress_center.js",
"mount_metrics.js", "mount_metrics.js",
"metrics_start.js",
"task_queue.js", "task_queue.js",
"test_import_history.js", "test_import_history.js",
"test_util.js",
"import_history.js", "import_history.js",
"drive_sync_handler.js", "drive_sync_handler.js",
"media_scanner.js", "media_scanner.js",
......
...@@ -8,4 +8,6 @@ ...@@ -8,4 +8,6 @@
* scripts that define the metrics namespace). * scripts that define the metrics namespace).
*/ */
// #import {metrics} from '../../common/js/metrics.m.js';
metrics.startInterval('Load.BackgroundScript'); metrics.startInterval('Load.BackgroundScript');
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
// 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 {background} from './background.m.js';
// #import {test} from './test_util_base.m.js';
// #import {launcher} from './launcher.m.js';
// #import {util} from '../../common/js/util.m.js';
// #import {ProgressCenterItem} from '../../common/js/progress_center_common.m.js';
// clang-format on
/** /**
* Opens the main Files app's window and waits until it is ready. * Opens the main Files app's window and waits until it is ready.
* *
......
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