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
referred to as "classic ash". Ash can run in either mode depending on the
--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
-----
Ash supports both per-user prefs and device-wide prefs. These are called
......
......@@ -14,6 +14,7 @@
#include "ash/public/cpp/shelf_types.h"
#include "ash/public/cpp/voice_interaction_state.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 "base/gtest_prod_util.h"
#include "base/macros.h"
......@@ -26,10 +27,6 @@
#include "ui/wm/core/cursor_manager.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 PrefService;
......
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
"+components/bubble",
"+components/favicon/core",
"+components/flags_ui",
......@@ -14,3 +12,16 @@ include_rules = [
"+mash/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 = [
"+ash/public/interfaces",
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
# Use //ui/wm/core/window_util.h when manipulating chrome browser windows.
# 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.
"-ash/wm/window_util.h",
# TODO(ananta): Remove this when we move files which display UI in
# chrome/browser/ui/ash to chrome/browser/ui/views/ash
# crbug.com/728877
"+chrome/browser/ui/views/harmony/chrome_layout_provider.h",
"+components/arc",
"+components/drive",
"+components/session_manager/core",
......
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
]
......@@ -232,10 +232,6 @@
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
#endif
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
using base::TimeDelta;
using base::UserMetricsAction;
using content::NativeWebKeyboardEvent;
......
......@@ -28,7 +28,6 @@
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/signin/signin_promo.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/browser.h"
#include "chrome/browser/ui/browser_commands.h"
......@@ -68,12 +67,9 @@
#include "content/public/browser/gpu_data_manager.h"
#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)
#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_window_manager.h"
#include "chrome/browser/ui/browser_commands_chromeos.h"
......@@ -757,10 +753,8 @@ void BrowserCommandController::InitCommandState() {
UpdateTabRestoreCommandState();
command_updater_.UpdateCommandEnabled(IDC_EXIT, 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)
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_3, true);
#endif
......
......@@ -4,11 +4,11 @@
#include "chrome/browser/ui/browser_commands_chromeos.h"
#include "ash/accelerators/accelerator_controller_delegate_classic.h"
#include "ash/mus/bridge/shell_port_mash.h"
#include "ash/accelerators/accelerator_controller_delegate_classic.h" // mash-ok
#include "ash/mus/bridge/shell_port_mash.h" // mash-ok
#include "ash/public/cpp/config.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_action.h"
#include "chrome/browser/chromeos/ash_config.h"
......@@ -26,6 +26,7 @@ void TakeScreenshot() {
accelerator_controller_delegate =
ash::mus::ShellPortMash::Get()->accelerator_controller_delegate_mus();
} else {
// TODO(mash): Screenshot support. http://crbug.com/557397
NOTIMPLEMENTED();
return;
}
......
......@@ -41,10 +41,6 @@
#include "content/public/browser/notification_service.h"
#endif
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
using content::BrowserThread;
using content::WebContents;
using extensions::Extension;
......
......@@ -68,10 +68,6 @@
#include "net/base/port_util.h"
#include "printing/features/features.h"
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/app_mode/app_launch_utils.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 = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
"+chrome/browser/ui/views",
"+components/constrained_window",
"+services/ui/public/cpp",
......
include_rules = [
# TODO(mash): Remove. http://crbug.com/678705
"+ash",
"+components/about_ui"
"+components/invalidation",
"+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