Commit e5af41e6 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Move shortcut viewer to ash/

Next step:
* Consolidate string grd file into single shortcut_viewer_strings.grd
* Remove NewWindowDelegate::ShowKeyboardShortcutViewer
  and open it directly.
* Remove KSV_EXPORT

TBR=thakis@chromium.org

Bug: 1046624
Change-Id: I86f8aecea09d67d3f1e5ee6234c5c6792bb87063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2094760Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749363}
parent 8c4446dc
...@@ -1658,8 +1658,8 @@ static_library("ash_shell_lib_with_content") { ...@@ -1658,8 +1658,8 @@ static_library("ash_shell_lib_with_content") {
deps = [ deps = [
":test_support", ":test_support",
"//ash/components/shortcut_viewer",
"//ash/public/cpp", "//ash/public/cpp",
"//ash/shortcut_viewer",
"//base:i18n", "//base:i18n",
"//chrome:packed_resources", "//chrome:packed_resources",
...@@ -2102,7 +2102,6 @@ test("ash_unittests") { ...@@ -2102,7 +2102,6 @@ test("ash_unittests") {
"//ash/assistant/ui", "//ash/assistant/ui",
"//ash/assistant/ui:constants", "//ash/assistant/ui:constants",
"//ash/assistant/util", "//ash/assistant/util",
"//ash/components/shortcut_viewer:unit_tests",
"//ash/keyboard/arc", "//ash/keyboard/arc",
"//ash/keyboard/ui", "//ash/keyboard/ui",
"//ash/keyboard/ui:test_support", "//ash/keyboard/ui:test_support",
...@@ -2111,6 +2110,7 @@ test("ash_unittests") { ...@@ -2111,6 +2110,7 @@ test("ash_unittests") {
"//ash/public/cpp:unit_tests", "//ash/public/cpp:unit_tests",
"//ash/public/cpp/vector_icons", "//ash/public/cpp/vector_icons",
"//ash/resources/vector_icons", "//ash/resources/vector_icons",
"//ash/shortcut_viewer:unit_tests",
"//ash/strings", "//ash/strings",
"//ash/system/machine_learning:user_settings_event_proto", "//ash/system/machine_learning:user_settings_event_proto",
"//ash/system/message_center/arc", "//ash/system/message_center/arc",
...@@ -2299,7 +2299,7 @@ static_library("test_support") { ...@@ -2299,7 +2299,7 @@ static_library("test_support") {
testonly = true testonly = true
friend = [ friend = [
":*", ":*",
"//ash/components/shortcut_viewer:*", "//ash/shortcut_viewer:*",
"//components/exo:*", "//components/exo:*",
"//components/exo/wayland:*", "//components/exo/wayland:*",
] ]
......
# Components must declare all dependencies explicitly. They do not inherit
# from //ash/DEPS.
noparent = True
include_rules = [
# Components can use some common things.
"+base",
"+build",
"+testing",
# Components can be mojo services.
"+mojo/public",
# Components support views UI with aura.
"+cc/paint",
"+ui/aura",
"+ui/base",
"+ui/display",
"+ui/events",
"+ui/gfx",
"+ui/views",
# Components may directly access ash.
"+ash",
# Individual components must explicitly declare their dependencies
# on other components. Cycles in the dependency graph within
# components/ are not allowed.
"-ash/components",
# Components sit below chrome.
"-chrome",
]
# grdp files
per-file shortcut_viewer_strings.grdp=file://ash/components/shortcut_viewer/OWNERS
//ash/components
----------------
This directory is for medium-sized UI "components" or "modules" or "mini-apps"
that run on Chrome OS. In the long term, some of these mini-apps may become
their own mojo applications and run independently, instead of as part of the
browser or as part of ash.
Generally these mini-apps depend on //base, //chromeos, //ui and low-level
components like //components/prefs.
Code here should not depend on //ash, except for the public mojo IPC interfaces
in //ash/public. Likewise, //ash should not depend on these components, except
for possibly for a header that allows launching the mini-app.
If the mini-app contains webui it might depend on //content, but in general
//content dependencies should be avoided.
Code in //ash/components/foo should be in "namespace foo" not "namespace ash".
//ash is only used on Chrome OS. If a component is used on other platforms the
code should move to //components.
include_rules = [
"+ash/components/strings",
"+ui/accessibility",
"+ui/chromeos/events",
"+ui/chromeos/search_box",
]
specific_include_rules = {
"keyboard_shortcut_view_unittest\.cc": [
"+ash/shell.h",
"+ash/test/ash_test_base.h",
"+ui/compositor",
],
}
...@@ -26,10 +26,10 @@ source_set("shortcut_viewer") { ...@@ -26,10 +26,10 @@ source_set("shortcut_viewer") {
deps = [ deps = [
"//ash", "//ash",
"//ash/components/shortcut_viewer/vector_icons",
"//ash/components/strings",
"//ash/public/cpp", "//ash/public/cpp",
"//ash/public/cpp/resources:ash_public_unscaled_resources", "//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/shortcut_viewer/strings",
"//ash/shortcut_viewer/vector_icons",
"//cc/paint", "//cc/paint",
"//ui/accessibility", "//ui/accessibility",
"//ui/aura", "//ui/aura",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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.
#include "ash/components/shortcut_viewer/keyboard_shortcut_item.h" #include "ash/shortcut_viewer/keyboard_shortcut_item.h"
#include <tuple> #include <tuple>
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// 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.
#ifndef ASH_COMPONENTS_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_ITEM_H_ #ifndef ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_ITEM_H_
#define ASH_COMPONENTS_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_ITEM_H_ #define ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_ITEM_H_
#include <vector> #include <vector>
#include "ash/components/shortcut_viewer/ksv_export.h" #include "ash/shortcut_viewer/ksv_export.h"
#include "base/macros.h" #include "base/macros.h"
#include "ui/events/keycodes/keyboard_codes.h" #include "ui/events/keycodes/keyboard_codes.h"
...@@ -103,4 +103,4 @@ struct KSV_EXPORT KeyboardShortcutItem { ...@@ -103,4 +103,4 @@ struct KSV_EXPORT KeyboardShortcutItem {
} // namespace keyboard_shortcut_viewer } // namespace keyboard_shortcut_viewer
#endif // ASH_COMPONENTS_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_ITEM_H_ #endif // ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_ITEM_H_
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// 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.
#include "ash/components/shortcut_viewer/keyboard_shortcut_viewer_metadata.h" #include "ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.h"
#include "ash/components/shortcut_viewer/keyboard_shortcut_item.h" #include "ash/shortcut_viewer/keyboard_shortcut_item.h"
#include "ash/components/shortcut_viewer/vector_icons/vector_icons.h" #include "ash/shortcut_viewer/strings/grit/ash_components_strings.h"
#include "ash/components/strings/grit/ash_components_strings.h" #include "ash/shortcut_viewer/vector_icons/vector_icons.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// 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.
#ifndef ASH_COMPONENTS_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_ #ifndef ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_
#define ASH_COMPONENTS_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_ #define ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_
#include <vector> #include <vector>
#include "ash/components/shortcut_viewer/ksv_export.h" #include "ash/shortcut_viewer/ksv_export.h"
#include "base/containers/span.h" #include "base/containers/span.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
...@@ -48,4 +48,4 @@ const gfx::VectorIcon* GetVectorIconForKeyboardCode(ui::KeyboardCode key_code); ...@@ -48,4 +48,4 @@ const gfx::VectorIcon* GetVectorIconForKeyboardCode(ui::KeyboardCode key_code);
} // namespace keyboard_shortcut_viewer } // namespace keyboard_shortcut_viewer
#endif // ASH_COMPONENTS_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_ #endif // ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// 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.
#ifndef ASH_COMPONENTS_SHORTCUT_VIEWER_KSV_EXPORT_H_ #ifndef ASH_SHORTCUT_VIEWER_KSV_EXPORT_H_
#define ASH_COMPONENTS_SHORTCUT_VIEWER_KSV_EXPORT_H_ #define ASH_SHORTCUT_VIEWER_KSV_EXPORT_H_
// Defines KSV_EXPORT so that functionality implemented by // Defines KSV_EXPORT so that functionality implemented by
// the keyboard shortcut viewer module can be exported to consumers. // the keyboard shortcut viewer module can be exported to consumers.
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
#define KSV_EXPORT #define KSV_EXPORT
#endif #endif
#endif // ASH_COMPONENTS_SHORTCUT_VIEWER_KSV_EXPORT_H_ #endif // ASH_SHORTCUT_VIEWER_KSV_EXPORT_H_
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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