Skip to content

Commit

Permalink
WebUI cleanup: Delete unused cr.ui.ContextMenuButton.
Browse files Browse the repository at this point in the history
c/b/r/ntp4/: Was including context_menu_button.js at runtime, but still
does not seem it was actually used anywhere.

ui/file_manager: Was declaring context_menu_button as a dependency for
type-checking purposes, but the file was never included in the page at
runtime.

Bug: None
Change-Id: I1e4c0b1c5ddac9e71c280d3ea8d47bb1636f14f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1513084
Reviewed-by: Luciano Pacheco <[email protected]>
Reviewed-by: Dan Beam <[email protected]>
Commit-Queue: Dan Beam <[email protected]>
Auto-Submit: Demetrios Papadopoulos <[email protected]>
Cr-Commit-Position: refs/heads/master@{#639776}
  • Loading branch information
freshp86 authored and Commit Bot committed Mar 12, 2019
1 parent 37fe521 commit 41610f2
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 117 deletions.
1 change: 0 additions & 1 deletion chrome/browser/resources/ntp4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ js_library("apps_page") {
"//ui/webui/resources/js/cr/ui/bubble.js",
"//ui/webui/resources/js/cr/ui/card_slider.js",
"//ui/webui/resources/js/cr/ui/command.js",
"//ui/webui/resources/js/cr/ui/context_menu_button.js",
"//ui/webui/resources/js/cr/ui/context_menu_handler.js",
"//ui/webui/resources/js/cr/ui/drag_wrapper.js",
"//ui/webui/resources/js/cr/ui/expandable_bubble.js",
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/resources/ntp4/new_tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<script src="../../../../ui/webui/resources/js/cr/ui/menu.js"></script>
<script src="../../../../ui/webui/resources/js/cr/ui/position_util.js"></script>
<script src="../../../../ui/webui/resources/js/cr/ui/menu_button.js"></script>
<script src="../../../../ui/webui/resources/js/cr/ui/context_menu_button.js"></script>
<script src="../../../../ui/webui/resources/js/cr/ui/touch_handler.js"></script>

<script src="tile_page.js"></script>
Expand Down
2 changes: 0 additions & 2 deletions ui/file_manager/file_manager/foreground/js/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ js_library("gear_menu_controller") {
":file_manager_commands",
"../elements:files_toggle_ripple",
"ui:gear_menu",
"//ui/webui/resources/js/cr/ui:context_menu_button",
]
}

Expand Down Expand Up @@ -679,7 +678,6 @@ js_library("sort_menu_controller") {
deps = [
":file_list_model",
"../elements:files_toggle_ripple",
"//ui/webui/resources/js/cr/ui:context_menu_button",
]
}

Expand Down
8 changes: 3 additions & 5 deletions ui/file_manager/file_manager/foreground/js/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ js_library("directory_tree") {
"../../../common/js:util",
"../metadata:metadata_model",
"//ui/file_manager/base/js:volume_manager_types",
"//ui/webui/resources/js/cr/ui:context_menu_button",
"//ui/webui/resources/js/cr/ui:context_menu_handler",
"//ui/webui/resources/js/cr/ui:menu",
"//ui/webui/resources/js/cr/ui:tree",
Expand Down Expand Up @@ -254,7 +253,6 @@ js_library("file_manager_ui") {
"//ui/file_manager/file_manager/foreground/js:launch_param",
"//ui/file_manager/file_manager/foreground/js:providers_model",
"//ui/webui/resources/js:util",
"//ui/webui/resources/js/cr/ui:context_menu_button",
"//ui/webui/resources/js/cr/ui:dialogs",
"//ui/webui/resources/js/cr/ui:menu",
]
Expand Down Expand Up @@ -301,13 +299,13 @@ js_library("file_table_list") {

js_unittest("file_table_list_unittest") {
deps = [
":file_table_list",
":file_table",
":file_table_list",
"../../../common/js:util",
"//ui/file_manager/base/js:test_error_reporting",
"//ui/webui/resources/js:webui_resource_test",
"//ui/file_manager/file_manager/background/js:mock_volume_manager",
"//ui/file_manager/file_manager/foreground/js/metadata:mock_metadata",
"//ui/webui/resources/js:webui_resource_test",
]
}

Expand Down Expand Up @@ -473,10 +471,10 @@ js_unit_tests("unit_tests") {
":actions_submenu_unittest",
":directory_tree_unittest",
":file_list_selection_model_unittest",
":file_table_list_unittest",
":file_table_unittest",
":file_tap_handler_unittest",
":list_container_unittest",
":file_table_list_unittest",
":multi_menu_unittest",
]
}
1 change: 0 additions & 1 deletion ui/webui/resources/html/cr/ui/context_menu_button.html

This file was deleted.

7 changes: 0 additions & 7 deletions ui/webui/resources/js/cr/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ js_type_check("ui_resources") {
":array_data_model",
":autocomplete_list",
":command",
":context_menu_button",
":context_menu_handler",
":dialogs",
":drag_wrapper",
Expand Down Expand Up @@ -77,12 +76,6 @@ js_library("command") {
]
}

js_library("context_menu_button") {
deps = [
":menu_button",
]
}

js_library("context_menu_handler") {
deps = [
":menu",
Expand Down
94 changes: 0 additions & 94 deletions ui/webui/resources/js/cr/ui/context_menu_button.js

This file was deleted.

6 changes: 0 additions & 6 deletions ui/webui/resources/webui_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,6 @@ without changes to the corresponding grd file. -->
<structure name="IDR_WEBUI_HTML_CR_UI_COMMAND"
file="html/cr/ui/command.html" type="chrome_html"
compress="gzip" />
<structure name="IDR_WEBUI_HTML_CR_UI_CONTEXT_MENU_BUTTON"
file="html/cr/ui/context_menu_button.html"
type="chrome_html" compress="gzip" />
<structure name="IDR_WEBUI_HTML_CR_UI_CONTEXT_MENU_HANDLER"
file="html/cr/ui/context_menu_handler.html"
type="chrome_html" compress="gzip" />
Expand Down Expand Up @@ -406,9 +403,6 @@ without changes to the corresponding grd file. -->
<structure name="IDR_WEBUI_JS_CR_UI_COMMAND"
file="js/cr/ui/command.js" type="chrome_html"
compress="gzip" />
<structure name="IDR_WEBUI_JS_CR_UI_CONTEXT_MENU_BUTTON"
file="js/cr/ui/context_menu_button.js"
type="chrome_html" compress="gzip" />
<structure name="IDR_WEBUI_JS_CR_UI_CONTEXT_MENU_HANDLER"
file="js/cr/ui/context_menu_handler.js"
type="chrome_html" compress="gzip" />
Expand Down

0 comments on commit 41610f2

Please sign in to comment.