Skip to content

Commit

Permalink
mustash: Break dependency of //ash/public/interfaces on //ash
Browse files Browse the repository at this point in the history
In a future CL I need to use ash's mojom interfaces within ash. Trying
to do that now creates a dependency cycle due to typemaps.

* Create //ash/public/cpp and move shelf_types.h there, since it is a
public header used outside of ash
* Make //ash/public/interfaces typemaps depend on //ash/public/cpp instead
of //ash

The file move was mechanical:
tools/git/move_source_file.py ash/common/shelf/shelf_types.h \
    ash/public/cpp

BUG=none
TEST=compiles, checkdeps, gn check

Review-Url: https://codereview.chromium.org/2376103005
Cr-Commit-Position: refs/heads/master@{#422149}
  • Loading branch information
jamescook authored and Commit bot committed Sep 30, 2016
1 parent 82b8e50 commit d4649fa
Show file tree
Hide file tree
Showing 47 changed files with 62 additions and 47 deletions.
5 changes: 4 additions & 1 deletion ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ component("ash") {
"common/shelf/shelf_model_observer.h",
"common/shelf/shelf_tooltip_manager.cc",
"common/shelf/shelf_tooltip_manager.h",
"common/shelf/shelf_types.h",
"common/shelf/shelf_view.cc",
"common/shelf/shelf_view.h",
"common/shelf/shelf_widget.cc",
Expand Down Expand Up @@ -823,6 +822,7 @@ component("ash") {
]
deps = [
"//ash/autoclick/common:autoclick",
"//ash/public/cpp",
"//ash/touch_hud",
"//base",
"//base:i18n",
Expand Down Expand Up @@ -1254,6 +1254,7 @@ static_library("ash_shell_lib") {
":ash_with_content",
":test_support_without_content",
"//ash/common/strings",
"//ash/public/cpp",
"//ash/resources",
"//base",
"//base:i18n",
Expand Down Expand Up @@ -1339,6 +1340,7 @@ test("ash_content_unittests") {
":ash_with_aura_test_support",
":ash_with_content",
":test_support_with_content",
"//ash/public/cpp",
"//base",
"//base/test:test_support",
"//components/signin/core/account_id",
Expand Down Expand Up @@ -1542,6 +1544,7 @@ test("ash_unittests") {
":test_support_without_content",
"//ash/autoclick/common:autoclick",
"//ash/common/strings",
"//ash/public/cpp",
"//ash/resources",
"//ash/touch_hud",
"//base",
Expand Down
2 changes: 1 addition & 1 deletion ash/app_list/app_list_presenter_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "ash/common/ash_switches.h"
#include "ash/common/shelf/app_list_button.h"
#include "ash/common/shelf/shelf_layout_manager.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
Expand All @@ -18,6 +17,7 @@
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/root_window_controller.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
Expand Down
1 change: 1 addition & 0 deletions ash/common/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include_rules = [
"-ash",
"+ash/ash_export.h",
"+ash/common",
"+ash/public",
"+ash/resources",
"+ash/shared",
"+ui",
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/app_list_button.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#include "ash/common/shelf/ink_drop_button_listener.h"
#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/shelf_item_types.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/shelf_view.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "base/command_line.h"
#include "grit/ash_resources.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/shelf_alignment_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "ash/common/shelf/shelf_alignment_menu.h"

#include "ash/common/metrics/user_metrics_action.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shelf_types.h"
#include "grit/ash_strings.h"

namespace ash {
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/shelf_background_animator.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <vector>

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf_observer.h"
#include "ash/common/wm/background_animator.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "base/observer_list.h"

Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/shelf_layout_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "ash/ash_export.h"
#include "ash/common/session/session_state_observer.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/shelf_widget.h"
#include "ash/common/shell_observer.h"
#include "ash/common/wm/background_animator.h"
Expand All @@ -18,6 +17,7 @@
#include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
#include "ash/common/wm/workspace/workspace_types.h"
#include "ash/common/wm_activation_observer.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "base/observer_list.h"
#include "base/timer/timer.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/shelf_layout_manager_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/wm/background_animator.h"
#include "ash/public/cpp/shelf_types.h"

namespace aura {
class Window;
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/shelf_locking_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#include "ash/ash_export.h"
#include "ash/common/session/session_state_observer.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shell_observer.h"
#include "ash/common/wm/lock_state_observer.h"
#include "ash/public/cpp/shelf_types.h"

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/shelf_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "ash/common/shelf/shelf_background_animator.h"
#include "ash/common/shelf/shelf_background_animator_observer.h"
#include "ash/common/shelf/shelf_layout_manager_observer.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/wm_shelf.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_layout_manager_observer.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/observer_list.h"

namespace gfx {
Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/wm_shelf_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define ASH_COMMON_SHELF_WM_SHELF_OBSERVER_H_

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/wm/background_animator.h"
#include "ash/public/cpp/shelf_types.h"

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/common/shelf/wm_shelf_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define ASH_COMMON_SHELF_WM_SHELF_UTIL_H_

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"

namespace ash {

Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/cast/tray_cast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/chromeos/screen_security/screen_tray_item.h"
#include "ash/common/system/tray/fixed_sized_image_view.h"
Expand All @@ -21,6 +20,7 @@
#include "ash/common/system/tray/tray_item_view.h"
#include "ash/common/system/tray/tray_popup_label_button.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "base/bind.h"
#include "grit/ash_resources.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/chromeos/session/logout_button_tray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
#include <utility>

#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/system/chromeos/session/logout_confirmation_controller.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/system_tray_notifier.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_utils.h"
#include "ash/common/system/user/login_status.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/logging.h"
#include "grit/ash_resources.h"
#include "third_party/skia/include/core/SkColor.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/overview/overview_button_tray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_utils.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/overview/window_selector_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shelf_types.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/status_area_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ash/ash_export.h"
#include "ash/common/login_status.h"
#include "ash/common/shelf/shelf_background_animator_observer.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "ui/views/widget/widget.h"

Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/status_area_widget_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/accessible_pane_view.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/tray/system_tray_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "ash/ash_export.h"
#include "ash/common/login_status.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"

namespace views {
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/tray/tray_background_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_background_animator_observer.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/system/tray/actionable_view.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/views/bubble/tray_bubble_view.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/tray/tray_item_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include "ash/common/system/tray/tray_item_view.h"

#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/tray/system_tray.h"
#include "ash/common/system/tray/system_tray_item.h"
#include "ash/public/cpp/shelf_types.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/views/controls/image_view.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/system/tray/tray_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <vector>

#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/strings/string16.h"

namespace views {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include "ash/common/system/web_notification/ash_popup_alignment_delegate.h"

#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/i18n/rtl.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <stdint.h>

#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf_observer.h"
#include "ash/common/shell_observer.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/macros.h"
#include "ui/display/display_observer.h"
#include "ui/gfx/geometry/rect.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/common/wm/overview/window_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "ash/common/ash_switches.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/overview/cleanup_animation_observer.h"
Expand All @@ -26,6 +25,7 @@
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_window.h"
#include "ash/public/cpp/shelf_types.h"
#include "base/command_line.h"
#include "base/i18n/string_search.h"
#include "base/memory/scoped_vector.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "ash/content/keyboard_overlay/keyboard_overlay_delegate.h"

#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/context_menu_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include "ash/mus/context_menu_mus.h"

#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/wallpaper/wallpaper_delegate.h"
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shelf_types.h"
#include "grit/ash_strings.h"

namespace ash {
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/shelf_delegate_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <string>

#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/public/interfaces/shelf.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
Expand Down
10 changes: 10 additions & 0 deletions ash/public/cpp/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# C++ headers and sources that can be used outside ash.
source_set("cpp") {
sources = [
"shelf_types.h",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_COMMON_SHELF_SHELF_TYPES_H_
#define ASH_COMMON_SHELF_SHELF_TYPES_H_
#ifndef ASH_PUBLIC_CPP_SHELF_TYPES_H_
#define ASH_PUBLIC_CPP_SHELF_TYPES_H_

namespace ash {

Expand Down Expand Up @@ -57,4 +57,4 @@ enum ShelfBackgroundType {

} // namespace ash

#endif // ASH_COMMON_SHELF_SHELF_TYPES_H_
#endif // ASH_PUBLIC_CPP_SHELF_TYPES_H_
4 changes: 2 additions & 2 deletions ash/public/interfaces/shelf.typemap
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# found in the LICENSE file.

mojom = "//ash/public/interfaces/shelf.mojom"
public_headers = [ "//ash/common/shelf/shelf_types.h" ]
public_headers = [ "//ash/public/cpp/shelf_types.h" ]
traits_headers = [ "//ash/public/interfaces/shelf_enum_traits.h" ]
public_deps = [
"//ash",
"//ash/public/cpp",
]
type_mappings = [
"ash.mojom.ShelfAlignment=ash::ShelfAlignment",
Expand Down
Loading

0 comments on commit d4649fa

Please sign in to comment.