Skip to content

Commit

Permalink
chromeos: moves ash/shared to ash/public/cpp
Browse files Browse the repository at this point in the history
The two should be combined given they share the same
role. ash/shared/immersive needs a cleanup (it predates the switch
back to aura), but I'm holding off on that until it becomes clear as
to which direction we want to take immersive going forward.

BUG=704615
TEST=none

Change-Id: Ie805238757577a07570815234e7908d15c647673
Reviewed-on: https://chromium-review.googlesource.com/548959
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482397}
  • Loading branch information
Scott Violet authored and Commit Bot committed Jun 26, 2017
1 parent 07e062e commit 1be0306
Show file tree
Hide file tree
Showing 55 changed files with 112 additions and 134 deletions.
12 changes: 0 additions & 12 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,6 @@ component("ash") {
"session/session_controller.h",
"session/session_observer.cc",
"session/session_observer.h",
"shared/immersive_context.cc",
"shared/immersive_context.h",
"shared/immersive_focus_watcher.h",
"shared/immersive_fullscreen_controller.cc",
"shared/immersive_fullscreen_controller.h",
"shared/immersive_fullscreen_controller_delegate.h",
"shared/immersive_gesture_handler.h",
"shared/immersive_handler_factory.cc",
"shared/immersive_handler_factory.h",
"shared/immersive_revealed_lock.cc",
"shared/immersive_revealed_lock.h",
"shelf/app_list_button.cc",
"shelf/app_list_button.h",
"shelf/app_list_shelf_item_delegate.cc",
Expand Down Expand Up @@ -827,7 +816,6 @@ component("ash") {
public_deps = [
"//ash/resources",
"//ash/resources/vector_icons",
"//ash/shared:app_types",
"//ash/strings",
]
deps = [
Expand Down
2 changes: 1 addition & 1 deletion ash/ash_touch_exploration_manager_chromeos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "ash/accessibility_delegate.h"
#include "ash/keyboard/keyboard_observer_register.h"
#include "ash/public/cpp/app_types.h"
#include "ash/root_window_controller.h"
#include "ash/shared/app_types.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/wm/window_util.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/aura/shell_port_classic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "ash/laser/laser_pointer_controller.h"
#include "ash/magnifier/partial_magnification_controller.h"
#include "ash/public/cpp/config.h"
#include "ash/shared/immersive_fullscreen_controller.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller.h"
#include "ash/shell.h"
#include "ash/virtual_keyboard_controller.h"
#include "ash/wm/drag_window_resizer.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "ash/ash_switches.h"
#include "ash/content/shell_content_state.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/shared/app_types.h"
#include "ash/public/cpp/app_types.h"
#include "ash/shell.h"
#include "ash/system/screen_layout_observer.h"
#include "ash/test/ash_test_base.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/display/display_manager_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "ash/display/mirror_window_controller.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/public/cpp/app_types.h"
#include "ash/screen_util.h"
#include "ash/shared/app_types.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/test/ash_test_base.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/display/screen_orientation_controller_chromeos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "ash/ash_switches.h"
#include "ash/display/display_configuration_controller.h"
#include "ash/shared/app_types.h"
#include "ash/public/cpp/app_types.h"
#include "ash/shell.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/wm/mru_window_tracker.h"
Expand Down
4 changes: 2 additions & 2 deletions ash/frame/custom_frame_view_ash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
#include "ash/frame/frame_border_hit_test.h"
#include "ash/frame/header_view.h"
#include "ash/shared/immersive_fullscreen_controller.h"
#include "ash/shared/immersive_fullscreen_controller_delegate.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_delegate.h"
#include "ash/shell_port.h"
#include "ash/wm/resize_handle_window_targeter.h"
#include "ash/wm/window_state.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/frame/header_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <memory>

#include "ash/ash_export.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_delegate.h"
#include "ash/public/interfaces/window_style.mojom.h"
#include "ash/shared/immersive_fullscreen_controller_delegate.h"
#include "ash/shell_observer.h"
#include "base/macros.h"
#include "third_party/skia/include/core/SkColor.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/metrics/pointer_metrics_recorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "ash/metrics/pointer_metrics_recorder.h"

#include "ash/shared/app_types.h"
#include "ash/public/cpp/app_types.h"
#include "ash/shell.h"
#include "ash/shell_port.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/metrics/pointer_metrics_recorder_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "ash/metrics/pointer_metrics_recorder.h"

#include "ash/public/cpp/app_types.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shared/app_types.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
Expand Down
4 changes: 2 additions & 2 deletions ash/mus/bridge/immersive_handler_factory_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "ash/mus/bridge/immersive_handler_factory_mus.h"

#include "ash/shared/immersive_focus_watcher.h"
#include "ash/shared/immersive_gesture_handler.h"
#include "ash/public/cpp/immersive/immersive_focus_watcher.h"
#include "ash/public/cpp/immersive/immersive_gesture_handler.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"

Expand Down
2 changes: 1 addition & 1 deletion ash/mus/bridge/immersive_handler_factory_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef ASH_MUS_BRIDGE_IMMERSIVE_HANDLER_FACTORY_MUS_H_
#define ASH_MUS_BRIDGE_IMMERSIVE_HANDLER_FACTORY_MUS_H_

#include "ash/shared/immersive_handler_factory.h"
#include "ash/public/cpp/immersive/immersive_handler_factory.h"
#include "base/macros.h"

namespace ash {
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/bridge/shell_port_mash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#include "ash/mus/touch_transform_setter_mus.h"
#include "ash/mus/window_manager.h"
#include "ash/public/cpp/config.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
#include "ash/root_window_settings.h"
#include "ash/shared/immersive_fullscreen_controller.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/virtual_keyboard_controller.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/non_client_frame_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "ash/mus/property_util.h"
#include "ash/mus/window_manager.h"
#include "ash/mus/window_properties.h"
#include "ash/shared/immersive_fullscreen_controller_delegate.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_delegate.h"
#include "ash/wm/panels/panel_frame_view.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
Expand Down
12 changes: 12 additions & 0 deletions ash/public/cpp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@
# C++ headers and sources that can be used outside ash.
component("ash_public_cpp") {
sources = [
"app_types.h",
"ash_pref_names.cc",
"ash_pref_names.h",
"ash_public_export.h",
"ash_typography.cc",
"ash_typography.h",
"config.h",
"immersive/immersive_context.cc",
"immersive/immersive_context.h",
"immersive/immersive_focus_watcher.h",
"immersive/immersive_fullscreen_controller.cc",
"immersive/immersive_fullscreen_controller.h",
"immersive/immersive_fullscreen_controller_delegate.h",
"immersive/immersive_gesture_handler.h",
"immersive/immersive_handler_factory.cc",
"immersive/immersive_handler_factory.h",
"immersive/immersive_revealed_lock.cc",
"immersive/immersive_revealed_lock.h",
"mus_property_mirror_ash.cc",
"mus_property_mirror_ash.h",
"remote_shelf_item_delegate.cc",
Expand Down
6 changes: 3 additions & 3 deletions ash/shared/app_types.h → ash/public/cpp/app_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_SHARED_APP_TYPES_H_
#define ASH_SHARED_APP_TYPES_H_
#ifndef ASH_PUBLIC_CPP_APP_TYPES_H_
#define ASH_PUBLIC_CPP_APP_TYPES_H_

namespace ash {

Expand All @@ -22,4 +22,4 @@ const int kAppCount = static_cast<int>(AppType::APP_TYPE_LAST) + 1;

} // namespace ash

#endif // ASH_SHARED_APP_TYPES_H_
#endif // ASH_PUBLIC_CPP_APP_TYPES_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ash/shared/immersive_context.h"
#include "ash/public/cpp/immersive/immersive_context.h"

#include "base/logging.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_SHARED_IMMERSIVE_CONTEXT_H_
#define ASH_SHARED_IMMERSIVE_CONTEXT_H_
#ifndef ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_CONTEXT_H_
#define ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_CONTEXT_H_

#include "ash/ash_export.h"
#include "ash/public/cpp/ash_public_export.h"

namespace gfx {
class Rect;
Expand All @@ -14,7 +14,7 @@ namespace views {
class PointerWatcher;
enum class PointerWatcherEventTypes;
class Widget;
}
} // namespace views

namespace ash {

Expand All @@ -28,7 +28,7 @@ class ImmersiveFullscreenController;
// depend upon aura, mus or ash.
//
// ImmersiveContext is a singleton.
class ASH_EXPORT ImmersiveContext {
class ASH_PUBLIC_EXPORT ImmersiveContext {
public:
static ImmersiveContext* Get() { return instance_; }

Expand Down Expand Up @@ -68,4 +68,4 @@ class ASH_EXPORT ImmersiveContext {

} // namespace ash

#endif // ASH_SHARED_IMMERSIVE_CONTEXT_H_
#endif // ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_CONTEXT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_SHARED_IMMERSIVE_FOCUS_WATCHER_H_
#define ASH_SHARED_IMMERSIVE_FOCUS_WATCHER_H_
#ifndef ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FOCUS_WATCHER_H_
#define ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FOCUS_WATCHER_H_

#include "ash/ash_export.h"
#include "ash/public/cpp/ash_public_export.h"

namespace ash {

// ImmersiveFocusWatcher is responsible for grabbing a reveal lock based on
// activation and/or focus.
class ASH_EXPORT ImmersiveFocusWatcher {
class ASH_PUBLIC_EXPORT ImmersiveFocusWatcher {
public:
virtual ~ImmersiveFocusWatcher() {}

Expand All @@ -26,4 +26,4 @@ class ASH_EXPORT ImmersiveFocusWatcher {

} // namespace ash

#endif // ASH_SHARED_IMMERSIVE_FOCUS_WATCHER_H_
#endif // ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FOCUS_WATCHER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ash/shared/immersive_fullscreen_controller.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller.h"

#include <set>

#include "ash/shared/immersive_context.h"
#include "ash/shared/immersive_focus_watcher.h"
#include "ash/shared/immersive_fullscreen_controller_delegate.h"
#include "ash/shared/immersive_gesture_handler.h"
#include "ash/shared/immersive_handler_factory.h"
#include "ash/public/cpp/immersive/immersive_context.h"
#include "ash/public/cpp/immersive/immersive_focus_watcher.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_delegate.h"
#include "ash/public/cpp/immersive/immersive_gesture_handler.h"
#include "ash/public/cpp/immersive/immersive_handler_factory.h"
#include "base/metrics/histogram_macros.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 @@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
#define ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
#ifndef ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
#define ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FULLSCREEN_CONTROLLER_H_

#include <memory>
#include <vector>

#include "ash/ash_export.h"
#include "ash/shared/immersive_revealed_lock.h"
#include "ash/public/cpp/ash_public_export.h"
#include "ash/public/cpp/immersive/immersive_revealed_lock.h"
#include "base/macros.h"
#include "base/timer/timer.h"
#include "ui/gfx/animation/animation_delegate.h"
Expand All @@ -19,19 +19,19 @@
namespace gfx {
class Point;
class SlideAnimation;
}
} // namespace gfx

namespace ui {
class GestureEvent;
class LocatedEvent;
class MouseEvent;
class TouchEvent;
}
} // namespace ui

namespace views {
class View;
class Widget;
}
} // namespace views

namespace ash {

Expand All @@ -40,7 +40,7 @@ class ImmersiveFullscreenControllerDelegate;
class ImmersiveFullscreenControllerTestApi;
class ImmersiveGestureHandler;

class ASH_EXPORT ImmersiveFullscreenController
class ASH_PUBLIC_EXPORT ImmersiveFullscreenController
: public gfx::AnimationDelegate,
public views::PointerWatcher,
public views::WidgetObserver,
Expand Down Expand Up @@ -271,4 +271,4 @@ class ASH_EXPORT ImmersiveFullscreenController

} // namespace ash

#endif // ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
#endif // ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FULLSCREEN_CONTROLLER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
#define ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
#ifndef ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
#define ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_

#include <vector>

#include "ash/ash_export.h"
#include "ash/public/cpp/ash_public_export.h"

namespace gfx {
class Rect;
}

namespace ash {

class ASH_EXPORT ImmersiveFullscreenControllerDelegate {
class ASH_PUBLIC_EXPORT ImmersiveFullscreenControllerDelegate {
public:
// Called when a reveal of the top-of-window views starts.
virtual void OnImmersiveRevealStarted() = 0;
Expand Down Expand Up @@ -44,4 +44,4 @@ class ASH_EXPORT ImmersiveFullscreenControllerDelegate {

} // namespace ash

#endif // ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
#endif // ASH_PUBLIC_CPP_IMMERSIVE_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
Loading

0 comments on commit 1be0306

Please sign in to comment.