Commit 934abaf5 authored by James Cook's avatar James Cook Committed by Commit Bot

cros: Tighten //ash DEPS restrictions in //chrome/browser/ui

For go/mustash code in chrome/brower cannot call directly into ash.

Push the +ash DEPS allowance down into subdirectories that haven't
been converted yet.

Tag a few includes used only in classic ash as "mash-ok".

Remove some unused includes. Convert some USE_ASH to OS_CHROMES to
allow some nogncheck tags to be removed.

Bug: 651557, 678705
Test: tools/checkdeps.py, gn check, compiles
Change-Id: I1d324c3df319a8099029b926f35b7571ea4d7077
Reviewed-on: https://chromium-review.googlesource.com/673163
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502970}
parent a4b7dcc8
...@@ -38,6 +38,11 @@ Out-of-process Ash is referred to as "mash" (mojo ash). In-process ash is ...@@ -38,6 +38,11 @@ Out-of-process Ash is referred to as "mash" (mojo ash). In-process ash is
referred to as "classic ash". Ash can run in either mode depending on the referred to as "classic ash". Ash can run in either mode depending on the
--mash command line flag. --mash command line flag.
In the few cases where chrome code is allowed to call into ash (e.g. code that
will only ever run in classic ash) the #include lines have "// mash-ok"
appended. This makes it easier to use grep to determine which parts of chrome
have not yet been adapted to mash.
Prefs Prefs
----- -----
Ash supports both per-user prefs and device-wide prefs. These are called Ash supports both per-user prefs and device-wide prefs. These are called
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "ash/public/cpp/shelf_types.h" #include "ash/public/cpp/shelf_types.h"
#include "ash/public/cpp/voice_interaction_state.h" #include "ash/public/cpp/voice_interaction_state.h"
#include "ash/session/session_observer.h" #include "ash/session/session_observer.h"
#include "ash/wm/cursor_manager_chromeos.h"
#include "ash/wm/system_modal_container_event_filter_delegate.h" #include "ash/wm/system_modal_container_event_filter_delegate.h"
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/macros.h" #include "base/macros.h"
...@@ -26,10 +27,6 @@ ...@@ -26,10 +27,6 @@
#include "ui/wm/core/cursor_manager.h" #include "ui/wm/core/cursor_manager.h"
#include "ui/wm/public/activation_change_observer.h" #include "ui/wm/public/activation_change_observer.h"
#if defined(OS_CHROMEOS)
#include "ash/wm/cursor_manager_chromeos.h"
#endif // defined(OS_CHROMEOS)
class PrefRegistrySimple; class PrefRegistrySimple;
class PrefService; class PrefService;
......
include_rules = [ include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
"+components/bubble", "+components/bubble",
"+components/favicon/core", "+components/favicon/core",
"+components/flags_ui", "+components/flags_ui",
...@@ -14,3 +12,16 @@ include_rules = [ ...@@ -14,3 +12,16 @@ include_rules = [
"+mash/public/interfaces", "+mash/public/interfaces",
"+services/device/public/interfaces", "+services/device/public/interfaces",
] ]
specific_include_rules = {
"browser_command_controller\.cc": [
"+ash/accelerators/accelerator_commands_classic.h",
],
"browser_commands_chromeos\.cc": [
"+ash/accelerators/accelerator_controller_delegate_classic.h",
"+ash/mus/bridge/shell_port_mash.h",
# TODO(mash): Screenshot support. http://crbug.com/557397
"+ash/screenshot_delegate.h",
"+ash/shell_port_classic.h",
]
}
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
]
specific_include_rules = {
# TODO(mash): Remove. http://crbug.com/678705
"chrome_app_delegate\.cc": [
"+ash/shelf/shelf_constants.h",
],
}
\ No newline at end of file
include_rules = [ include_rules = [
"+ash/public/interfaces", # TODO(mash): Remove. http://crbug.com/678705
"+ash",
# Use //ui/wm/core/window_util.h when manipulating chrome browser windows. # Use //ui/wm/core/window_util.h when manipulating chrome browser windows.
# Consult mustash-team@ if you need to manipulate non-browser windows because # Consult mustash-team@ if you need to manipulate non-browser windows because
# those are owned by the ash process under mash. See //ash/README.md. # those are owned by the ash process under mash. See //ash/README.md.
"-ash/wm/window_util.h", "-ash/wm/window_util.h",
# TODO(ananta): Remove this when we move files which display UI in # TODO(ananta): Remove this when we move files which display UI in
# chrome/browser/ui/ash to chrome/browser/ui/views/ash # chrome/browser/ui/ash to chrome/browser/ui/views/ash
# crbug.com/728877 # crbug.com/728877
"+chrome/browser/ui/views/harmony/chrome_layout_provider.h", "+chrome/browser/ui/views/harmony/chrome_layout_provider.h",
"+components/arc", "+components/arc",
"+components/drive", "+components/drive",
"+components/session_manager/core", "+components/session_manager/core",
......
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
]
...@@ -232,10 +232,6 @@ ...@@ -232,10 +232,6 @@
#include "chrome/browser/ui/settings_window_manager_chromeos.h" #include "chrome/browser/ui/settings_window_manager_chromeos.h"
#endif #endif
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
using base::TimeDelta; using base::TimeDelta;
using base::UserMetricsAction; using base::UserMetricsAction;
using content::NativeWebKeyboardEvent; using content::NativeWebKeyboardEvent;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "chrome/browser/shell_integration.h" #include "chrome/browser/shell_integration.h"
#include "chrome/browser/signin/signin_promo.h" #include "chrome/browser/signin/signin_promo.h"
#include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_commands.h"
...@@ -68,12 +67,9 @@ ...@@ -68,12 +67,9 @@
#include "content/public/browser/gpu_data_manager.h" #include "content/public/browser/gpu_data_manager.h"
#endif #endif
#if defined(USE_ASH)
#include "ash/accelerators/accelerator_commands_classic.h" // nogncheck
#include "chrome/browser/ui/ash/ash_util.h" // nogncheck
#endif
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "ash/accelerators/accelerator_commands_classic.h" // mash-ok
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h" #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
#include "chrome/browser/ui/browser_commands_chromeos.h" #include "chrome/browser/ui/browser_commands_chromeos.h"
...@@ -757,10 +753,8 @@ void BrowserCommandController::InitCommandState() { ...@@ -757,10 +753,8 @@ void BrowserCommandController::InitCommandState() {
UpdateTabRestoreCommandState(); UpdateTabRestoreCommandState();
command_updater_.UpdateCommandEnabled(IDC_EXIT, true); command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true);
#if defined(USE_ASH)
command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true);
#endif
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true);
command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true); command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true);
command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true); command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true);
#endif #endif
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
#include "chrome/browser/ui/browser_commands_chromeos.h" #include "chrome/browser/ui/browser_commands_chromeos.h"
#include "ash/accelerators/accelerator_controller_delegate_classic.h" #include "ash/accelerators/accelerator_controller_delegate_classic.h" // mash-ok
#include "ash/mus/bridge/shell_port_mash.h" #include "ash/mus/bridge/shell_port_mash.h" // mash-ok
#include "ash/public/cpp/config.h" #include "ash/public/cpp/config.h"
#include "ash/screenshot_delegate.h" #include "ash/screenshot_delegate.h"
#include "ash/shell_port_classic.h" #include "ash/shell_port_classic.h" // mash-ok
#include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h" #include "base/metrics/user_metrics_action.h"
#include "chrome/browser/chromeos/ash_config.h" #include "chrome/browser/chromeos/ash_config.h"
...@@ -26,6 +26,7 @@ void TakeScreenshot() { ...@@ -26,6 +26,7 @@ void TakeScreenshot() {
accelerator_controller_delegate = accelerator_controller_delegate =
ash::mus::ShellPortMash::Get()->accelerator_controller_delegate_mus(); ash::mus::ShellPortMash::Get()->accelerator_controller_delegate_mus();
} else { } else {
// TODO(mash): Screenshot support. http://crbug.com/557397
NOTIMPLEMENTED(); NOTIMPLEMENTED();
return; return;
} }
......
...@@ -41,10 +41,6 @@ ...@@ -41,10 +41,6 @@
#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_service.h"
#endif #endif
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
using content::BrowserThread; using content::BrowserThread;
using content::WebContents; using content::WebContents;
using extensions::Extension; using extensions::Extension;
......
...@@ -68,10 +68,6 @@ ...@@ -68,10 +68,6 @@
#include "net/base/port_util.h" #include "net/base/port_util.h"
#include "printing/features/features.h" #include "printing/features/features.h"
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/app_mode/app_launch_utils.h" #include "chrome/browser/chromeos/app_mode/app_launch_utils.h"
#include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
......
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
]
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
]
include_rules = [ include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
"+chrome/browser/ui/views", "+chrome/browser/ui/views",
"+components/constrained_window", "+components/constrained_window",
"+services/ui/public/cpp", "+services/ui/public/cpp",
......
include_rules = [ include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
"+components/about_ui" "+components/about_ui"
"+components/invalidation", "+components/invalidation",
"+components/onc", "+components/onc",
......
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
]
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