Commit a3c45128 authored by msw's avatar msw Committed by Commit bot

mash: Partially migrate ShelfLayoutManager to ash common types.

ActivationChangeObserver -> WmActivationObserver.
Always create RootWindowControllerObserverImpl.
Make RootWindowControllerObserverImpl add/remove itself.

Compare display ids instead of root windows.
Use wm::GetWindowForFullscreenMode instead of ash::RWC.
Use WmLookup instead of WmWindowAura::Get.
Use Widget::IsMouseEventsEnabled instead of CursorClient.
Fix IWYU issues; remove unused forward decls/friends.

BUG=631215
TEST=Automated tests; no behavior changes.
R=jamescook@chromium.org

Review-Url: https://codereview.chromium.org/2187513003
Cr-Commit-Position: refs/heads/master@{#408271}
parent 6d88fd6a
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "ash/display/window_tree_host_manager.h" #include "ash/display/window_tree_host_manager.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/root_window_settings.h" #include "ash/root_window_settings.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "base/logging.h" #include "base/logging.h"
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "ash/high_contrast/high_contrast_controller.h" #include "ash/high_contrast/high_contrast_controller.h"
#include "ash/host/ash_window_tree_host.h" #include "ash/host/ash_window_tree_host.h"
#include "ash/root_window_settings.h" #include "ash/root_window_settings.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "ash/display/display_manager.h" #include "ash/display/display_manager.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "base/logging.h" #include "base/logging.h"
......
...@@ -6,13 +6,8 @@ ...@@ -6,13 +6,8 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <cstring>
#include <string>
#include <vector> #include <vector>
#include "ash/aura/wm_window_aura.h"
#include "ash/common/accelerators/accelerator_commands.h"
#include "ash/common/ash_switches.h"
#include "ash/common/material_design/material_design_controller.h" #include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h" #include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/shelf_constants.h" #include "ash/common/shelf/shelf_constants.h"
...@@ -20,43 +15,35 @@ ...@@ -20,43 +15,35 @@
#include "ash/common/shelf/wm_shelf_util.h" #include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h" #include "ash/common/shell_window_ids.h"
#include "ash/common/system/status_area_widget.h" #include "ash/common/system/status_area_widget.h"
#include "ash/common/wm/fullscreen_window_finder.h"
#include "ash/common/wm/mru_window_tracker.h" #include "ash/common/wm/mru_window_tracker.h"
#include "ash/common/wm/window_state.h" #include "ash/common/wm/window_state.h"
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_root_window_controller.h" #include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_root_window_controller_observer.h" #include "ash/common/wm_root_window_controller_observer.h"
#include "ash/common/wm_shell.h" #include "ash/common/wm_shell.h"
#include "ash/root_window_controller.h" #include "ash/common/wm_window.h"
#include "ash/screen_util.h" #include "ash/screen_util.h"
#include "ash/shelf/shelf.h" #include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_bezel_event_filter.h" #include "ash/shelf/shelf_bezel_event_filter.h"
#include "ash/shelf/shelf_layout_manager_observer.h" #include "ash/shelf/shelf_layout_manager_observer.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/gestures/shelf_gesture_handler.h" #include "ash/wm/gestures/shelf_gesture_handler.h"
#include "ash/wm/window_animations.h" #include "ash/wm/window_animations.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller.h" #include "ash/wm/workspace_controller.h"
#include "base/auto_reset.h" #include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/i18n/rtl.h" #include "base/i18n/rtl.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/ui_base_switches.h"
#include "ui/compositor/layer.h" #include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_observer.h" #include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/layer_animator.h" #include "ui/compositor/layer_animator.h"
#include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/display/display.h"
#include "ui/display/screen.h" #include "ui/display/screen.h"
#include "ui/events/event.h" #include "ui/events/event.h"
#include "ui/events/event_handler.h" #include "ui/events/event_handler.h"
#include "ui/keyboard/keyboard_util.h" #include "ui/keyboard/keyboard_util.h"
#include "ui/views/border.h" #include "ui/views/border.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
#include "ui/wm/public/activation_client.h"
namespace ash { namespace ash {
namespace { namespace {
...@@ -137,7 +124,7 @@ void ShelfLayoutManager::AutoHideEventFilter::OnGestureEvent( ...@@ -137,7 +124,7 @@ void ShelfLayoutManager::AutoHideEventFilter::OnGestureEvent(
shelf_->UpdateAutoHideForGestureEvent(event); shelf_->UpdateAutoHideForGestureEvent(event);
} }
// ShelfLayoutManager:UpdateShelfObserver -------------------------------------- // ShelfLayoutManager::UpdateShelfObserver -------------------------------------
// UpdateShelfObserver is used to delay updating the background until the // UpdateShelfObserver is used to delay updating the background until the
// animation completes. // animation completes.
...@@ -181,8 +168,16 @@ class ShelfLayoutManager::RootWindowControllerObserverImpl ...@@ -181,8 +168,16 @@ class ShelfLayoutManager::RootWindowControllerObserverImpl
public: public:
explicit RootWindowControllerObserverImpl( explicit RootWindowControllerObserverImpl(
ShelfLayoutManager* shelf_layout_manager) ShelfLayoutManager* shelf_layout_manager)
: shelf_layout_manager_(shelf_layout_manager) {} : shelf_layout_manager_(shelf_layout_manager),
~RootWindowControllerObserverImpl() override {} root_window_controller_(
WmLookup::Get()
->GetWindowForWidget(shelf_layout_manager->shelf_widget())
->GetRootWindowController()) {
root_window_controller_->AddObserver(this);
}
~RootWindowControllerObserverImpl() override {
root_window_controller_->RemoveObserver(this);
}
// WmRootWindowControllerObserver: // WmRootWindowControllerObserver:
void OnShelfAlignmentChanged() override { void OnShelfAlignmentChanged() override {
...@@ -191,6 +186,7 @@ class ShelfLayoutManager::RootWindowControllerObserverImpl ...@@ -191,6 +186,7 @@ class ShelfLayoutManager::RootWindowControllerObserverImpl
private: private:
ShelfLayoutManager* shelf_layout_manager_; ShelfLayoutManager* shelf_layout_manager_;
WmRootWindowController* root_window_controller_;
DISALLOW_COPY_AND_ASSIGN(RootWindowControllerObserverImpl); DISALLOW_COPY_AND_ASSIGN(RootWindowControllerObserverImpl);
}; };
...@@ -211,18 +207,12 @@ ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf_widget) ...@@ -211,18 +207,12 @@ ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf_widget)
gesture_drag_auto_hide_state_(SHELF_AUTO_HIDE_SHOWN), gesture_drag_auto_hide_state_(SHELF_AUTO_HIDE_SHOWN),
update_shelf_observer_(NULL), update_shelf_observer_(NULL),
chromevox_panel_height_(0), chromevox_panel_height_(0),
duration_override_in_ms_(0) { duration_override_in_ms_(0),
root_window_controller_observer_(
new RootWindowControllerObserverImpl(this)) {
WmShell::Get()->AddShellObserver(this); WmShell::Get()->AddShellObserver(this);
if (!Shell::GetInstance()->in_mus()) {
root_window_controller_observer_.reset(
new RootWindowControllerObserverImpl(this));
WmWindowAura::Get(root_window_)
->GetRootWindowController()
->AddObserver(root_window_controller_observer_.get());
}
WmShell::Get()->AddLockStateObserver(this); WmShell::Get()->AddLockStateObserver(this);
aura::client::GetActivationClient(root_window_)->AddObserver(this); WmShell::Get()->AddActivationObserver(this);
WmShell::Get()->GetSessionStateDelegate()->AddSessionStateObserver(this); WmShell::Get()->GetSessionStateDelegate()->AddSessionStateObserver(this);
} }
...@@ -234,13 +224,7 @@ ShelfLayoutManager::~ShelfLayoutManager() { ...@@ -234,13 +224,7 @@ ShelfLayoutManager::~ShelfLayoutManager() {
WillDeleteShelfLayoutManager()); WillDeleteShelfLayoutManager());
WmShell::Get()->RemoveShellObserver(this); WmShell::Get()->RemoveShellObserver(this);
WmShell::Get()->RemoveLockStateObserver(this); WmShell::Get()->RemoveLockStateObserver(this);
WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver( WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver(this);
this);
if (root_window_controller_observer_) {
WmWindowAura::Get(root_window_)
->GetRootWindowController()
->RemoveObserver(root_window_controller_observer_.get());
}
} }
void ShelfLayoutManager::PrepareForShutdown() { void ShelfLayoutManager::PrepareForShutdown() {
...@@ -250,9 +234,8 @@ void ShelfLayoutManager::PrepareForShutdown() { ...@@ -250,9 +234,8 @@ void ShelfLayoutManager::PrepareForShutdown() {
set_workspace_controller(NULL); set_workspace_controller(NULL);
auto_hide_event_filter_.reset(); auto_hide_event_filter_.reset();
bezel_event_filter_.reset(); bezel_event_filter_.reset();
// Stop observing window change, otherwise we can attempt to update a // Stop observing changes to avoid updating a partially destructed shelf.
// partially destructed shelf. WmShell::Get()->RemoveActivationObserver(this);
aura::client::GetActivationClient(root_window_)->RemoveObserver(this);
} }
bool ShelfLayoutManager::IsVisible() const { bool ShelfLayoutManager::IsVisible() const {
...@@ -320,11 +303,10 @@ void ShelfLayoutManager::UpdateVisibilityState() { ...@@ -320,11 +303,10 @@ void ShelfLayoutManager::UpdateVisibilityState() {
workspace_controller_->GetWindowState()); workspace_controller_->GetWindowState());
switch (window_state) { switch (window_state) {
case wm::WORKSPACE_WINDOW_STATE_FULL_SCREEN: { case wm::WORKSPACE_WINDOW_STATE_FULL_SCREEN: {
const aura::Window* fullscreen_window = const WmWindow* fullscreen_window = wm::GetWindowForFullscreenMode(
GetRootWindowController(root_window_)->GetWindowForFullscreenMode(); WmLookup::Get()->GetWindowForWidget(shelf_widget_));
if (fullscreen_window && if (fullscreen_window &&
wm::GetWindowState(fullscreen_window) fullscreen_window->GetWindowState()->hide_shelf_when_fullscreen()) {
->hide_shelf_when_fullscreen()) {
SetState(SHELF_HIDDEN); SetState(SHELF_HIDDEN);
} else { } else {
// The shelf is sometimes not hidden when in immersive fullscreen. // The shelf is sometimes not hidden when in immersive fullscreen.
...@@ -558,10 +540,8 @@ void ShelfLayoutManager::OnPinnedStateChanged(WmWindow* pinned_window) { ...@@ -558,10 +540,8 @@ void ShelfLayoutManager::OnPinnedStateChanged(WmWindow* pinned_window) {
UpdateVisibilityState(); UpdateVisibilityState();
} }
void ShelfLayoutManager::OnWindowActivated( void ShelfLayoutManager::OnWindowActivated(WmWindow* gained_active,
aura::client::ActivationChangeObserver::ActivationReason reason, WmWindow* lost_active) {
aura::Window* gained_active,
aura::Window* lost_active) {
UpdateAutoHideStateNow(); UpdateAutoHideStateNow();
} }
...@@ -1031,15 +1011,17 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState( ...@@ -1031,15 +1011,17 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
!shelf_widget_->shelf()) !shelf_widget_->shelf())
return SHELF_AUTO_HIDE_HIDDEN; return SHELF_AUTO_HIDE_HIDDEN;
const int64_t shelf_display_id = WmLookup::Get()
->GetWindowForWidget(shelf_widget_)
->GetDisplayNearestWindow()
.id();
// Unhide the shelf only on the active screen when the AppList is shown // Unhide the shelf only on the active screen when the AppList is shown
// (crbug.com/312445). // (crbug.com/312445).
if (WmShell::Get()->GetAppListTargetVisibility()) { if (WmShell::Get()->GetAppListTargetVisibility()) {
aura::Window* active_window = wm::GetActiveWindow(); WmWindow* window = WmShell::Get()->GetActiveWindow();
aura::Window* shelf_window = shelf_widget_->GetNativeWindow(); if (window && window->GetDisplayNearestWindow().id() == shelf_display_id)
if (active_window && shelf_window &&
active_window->GetRootWindow() == shelf_window->GetRootWindow()) {
return SHELF_AUTO_HIDE_SHOWN; return SHELF_AUTO_HIDE_SHOWN;
}
} }
if (shelf_widget_->status_area_widget() && if (shelf_widget_->status_area_widget() &&
...@@ -1068,8 +1050,7 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState( ...@@ -1068,8 +1050,7 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
for (size_t i = 0; i < windows.size(); ++i) { for (size_t i = 0; i < windows.size(); ++i) {
if (windows[i] && windows[i]->IsVisible() && if (windows[i] && windows[i]->IsVisible() &&
!windows[i]->GetWindowState()->IsMinimized() && !windows[i]->GetWindowState()->IsMinimized() &&
root_window_ == windows[i]->GetDisplayNearestWindow().id() == shelf_display_id) {
WmWindowAura::GetAuraWindow(windows[i]->GetRootWindow())) {
visible_window = true; visible_window = true;
break; break;
} }
...@@ -1087,9 +1068,7 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState( ...@@ -1087,9 +1068,7 @@ ShelfAutoHideState ShelfLayoutManager::CalculateAutoHideState(
return SHELF_AUTO_HIDE_HIDDEN; return SHELF_AUTO_HIDE_HIDDEN;
// Ignore the mouse position if mouse events are disabled. // Ignore the mouse position if mouse events are disabled.
aura::client::CursorClient* cursor_client = aura::client::GetCursorClient( if (!shelf_widget_->IsMouseEventsEnabled())
shelf_widget_->GetNativeWindow()->GetRootWindow());
if (!cursor_client->IsMouseEventsEnabled())
return SHELF_AUTO_HIDE_HIDDEN; return SHELF_AUTO_HIDE_HIDDEN;
gfx::Rect shelf_region = shelf_widget_->GetWindowBoundsInScreen(); gfx::Rect shelf_region = shelf_widget_->GetWindowBoundsInScreen();
......
...@@ -6,52 +6,38 @@ ...@@ -6,52 +6,38 @@
#define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
#include <memory> #include <memory>
#include <vector>
#include "ash/ash_export.h" #include "ash/ash_export.h"
#include "ash/common/session/session_state_observer.h" #include "ash/common/session/session_state_observer.h"
#include "ash/common/shelf/shelf_types.h" #include "ash/common/shelf/shelf_types.h"
#include "ash/common/shell_observer.h" #include "ash/common/shell_observer.h"
#include "ash/common/system/status_area_widget.h"
#include "ash/common/wm/background_animator.h" #include "ash/common/wm/background_animator.h"
#include "ash/common/wm/dock/docked_window_layout_manager_observer.h" #include "ash/common/wm/dock/docked_window_layout_manager_observer.h"
#include "ash/common/wm/lock_state_observer.h" #include "ash/common/wm/lock_state_observer.h"
#include "ash/common/wm/workspace/workspace_types.h" #include "ash/common/wm/workspace/workspace_types.h"
#include "ash/shelf/shelf.h" #include "ash/common/wm_activation_observer.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/snap_to_pixel_layout_manager.h" #include "ash/snap_to_pixel_layout_manager.h"
#include "ash/wm/gestures/shelf_gesture_handler.h" #include "ash/wm/gestures/shelf_gesture_handler.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/keyboard/keyboard_controller.h"
#include "ui/keyboard/keyboard_controller_observer.h" #include "ui/keyboard/keyboard_controller_observer.h"
#include "ui/wm/public/activation_change_observer.h"
namespace aura {
class RootWindow;
}
namespace ui { namespace ui {
class GestureEvent;
class ImplicitAnimationObserver; class ImplicitAnimationObserver;
} }
namespace ash { namespace ash {
class PanelLayoutManagerTest; class PanelLayoutManagerTest;
class ScreenAsh;
class ShelfBezelEventFilter; class ShelfBezelEventFilter;
class ShelfLayoutManagerObserver; class ShelfLayoutManagerObserver;
class ShelfLayoutManagerTest; class ShelfLayoutManagerTest;
class ShelfWidget; class ShelfWidget;
class StatusAreaWidget;
class WorkspaceController; class WorkspaceController;
FORWARD_DECLARE_TEST(AshPopupAlignmentDelegateTest, AutoHide);
FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen);
// ShelfLayoutManager is the layout manager responsible for the shelf and // ShelfLayoutManager is the layout manager responsible for the shelf and
// status widgets. The shelf is given the total available width and told the // status widgets. The shelf is given the total available width and told the
...@@ -61,8 +47,8 @@ FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen); ...@@ -61,8 +47,8 @@ FORWARD_DECLARE_TEST(WebNotificationTrayTest, PopupAndFullscreen);
// closely with ShelfLayoutManager. // closely with ShelfLayoutManager.
// On mus, widget bounds management is handled by the window manager. // On mus, widget bounds management is handled by the window manager.
class ASH_EXPORT ShelfLayoutManager class ASH_EXPORT ShelfLayoutManager
: public ash::ShellObserver, : public ShellObserver,
public aura::client::ActivationChangeObserver, public WmActivationObserver,
public DockedWindowLayoutManagerObserver, public DockedWindowLayoutManagerObserver,
public keyboard::KeyboardControllerObserver, public keyboard::KeyboardControllerObserver,
public LockStateObserver, public LockStateObserver,
...@@ -150,25 +136,23 @@ class ASH_EXPORT ShelfLayoutManager ...@@ -150,25 +136,23 @@ class ASH_EXPORT ShelfLayoutManager
void SetChildBounds(aura::Window* child, void SetChildBounds(aura::Window* child,
const gfx::Rect& requested_bounds) override; const gfx::Rect& requested_bounds) override;
// Overridden from ash::ShellObserver: // Overridden from ShellObserver:
void OnLockStateChanged(bool locked) override; void OnLockStateChanged(bool locked) override;
void OnShelfAlignmentChanged(WmWindow* root_window) override; void OnShelfAlignmentChanged(WmWindow* root_window) override;
void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override; void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override;
void OnPinnedStateChanged(WmWindow* pinned_window) override; void OnPinnedStateChanged(WmWindow* pinned_window) override;
// Overriden from aura::client::ActivationChangeObserver: // Overridden from WmActivationObserver:
void OnWindowActivated( void OnWindowActivated(WmWindow* gained_active,
aura::client::ActivationChangeObserver::ActivationReason reason, WmWindow* lost_active) override;
aura::Window* gained_active,
aura::Window* lost_active) override;
// Overridden from keyboard::KeyboardControllerObserver: // Overridden from keyboard::KeyboardControllerObserver:
void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
// Overridden from ash::LockStateObserver: // Overridden from LockStateObserver:
void OnLockStateEvent(LockStateObserver::EventType event) override; void OnLockStateEvent(LockStateObserver::EventType event) override;
// Overridden from ash::SessionStateObserver: // Overridden from SessionStateObserver:
void SessionStateChanged(SessionStateDelegate::SessionState state) override; void SessionStateChanged(SessionStateDelegate::SessionState state) override;
// TODO(msw): Remove these accessors, kept temporarily to simplify changes. // TODO(msw): Remove these accessors, kept temporarily to simplify changes.
...@@ -207,13 +191,8 @@ class ASH_EXPORT ShelfLayoutManager ...@@ -207,13 +191,8 @@ class ASH_EXPORT ShelfLayoutManager
class AutoHideEventFilter; class AutoHideEventFilter;
class RootWindowControllerObserverImpl; class RootWindowControllerObserverImpl;
class UpdateShelfObserver; class UpdateShelfObserver;
friend class AshPopupAlignmentDelegateTest;
friend class ash::ScreenAsh;
friend class PanelLayoutManagerTest; friend class PanelLayoutManagerTest;
friend class ShelfLayoutManagerTest; friend class ShelfLayoutManagerTest;
friend class ToastManagerTest;
FRIEND_TEST_ALL_PREFIXES(ash::AshPopupAlignmentDelegateTest, AutoHide);
FRIEND_TEST_ALL_PREFIXES(ash::WebNotificationTrayTest, PopupAndFullscreen);
struct TargetBounds { struct TargetBounds {
TargetBounds(); TargetBounds();
......
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
#include "ash/common/shelf/shelf_model.h" #include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/wm_shelf_util.h" #include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h" #include "ash/common/shell_window_ids.h"
#include "ash/common/system/status_area_widget.h"
#include "ash/common/system/tray/system_tray_delegate.h" #include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm_root_window_controller.h" #include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h" #include "ash/common/wm_shell.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_util.h" #include "ash/shelf/shelf_util.h"
#include "ash/shelf/shelf_view.h" #include "ash/shelf/shelf_view.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "ash/common/material_design/material_design_controller.h" #include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/shelf_delegate.h" #include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/system/status_area_widget.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/shelf/shelf.h" #include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "ash/common/shelf/shelf_menu_model.h" #include "ash/common/shelf/shelf_menu_model.h"
#include "ash/common/shelf/shelf_model.h" #include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/shelf_types.h" #include "ash/common/shelf/shelf_types.h"
#include "ash/common/system/status_area_widget.h"
#include "ash/common/wm_shell.h" #include "ash/common/wm_shell.h"
#include "ash/shelf/shelf.h" #include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
......
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
#include "ash/common/wm/dock/docked_window_layout_manager.h" #include "ash/common/wm/dock/docked_window_layout_manager.h"
#include "ash/aura/wm_window_aura.h" #include "ash/aura/wm_window_aura.h"
#include "ash/common/ash_switches.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/shelf_types.h"
#include "ash/common/shell_window_ids.h" #include "ash/common/shell_window_ids.h"
#include "ash/common/wm/panels/panel_layout_manager.h" #include "ash/common/wm/panels/panel_layout_manager.h"
#include "ash/common/wm/window_resizer.h" #include "ash/common/wm/window_resizer.h"
...@@ -15,8 +12,6 @@ ...@@ -15,8 +12,6 @@
#include "ash/display/display_manager.h" #include "ash/display/display_manager.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/shelf/shelf.h" #include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/test/ash_test_base.h" #include "ash/test/ash_test_base.h"
#include "ash/test/display_manager_test_api.h" #include "ash/test/display_manager_test_api.h"
...@@ -26,7 +21,6 @@ ...@@ -26,7 +21,6 @@
#include "ash/test/test_shelf_delegate.h" #include "ash/test/test_shelf_delegate.h"
#include "ash/wm/window_state_aura.h" #include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "ui/aura/client/aura_constants.h" #include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h" #include "ui/aura/test/test_window_delegate.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "ash/aura/wm_window_aura.h" #include "ash/aura/wm_window_aura.h"
#include "ash/common/ash_switches.h" #include "ash/common/ash_switches.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/shelf_types.h" #include "ash/common/shelf/shelf_types.h"
#include "ash/common/shell_window_ids.h" #include "ash/common/shell_window_ids.h"
#include "ash/common/wm/dock/docked_window_layout_manager.h" #include "ash/common/wm/dock/docked_window_layout_manager.h"
...@@ -18,7 +17,6 @@ ...@@ -18,7 +17,6 @@
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/screen_util.h" #include "ash/screen_util.h"
#include "ash/shelf/shelf.h" #include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/test/ash_test_base.h" #include "ash/test/ash_test_base.h"
...@@ -45,13 +43,12 @@ class DockedWindowResizerTest ...@@ -45,13 +43,12 @@ class DockedWindowResizerTest
: public test::AshTestBase, : public test::AshTestBase,
public testing::WithParamInterface<ui::wm::WindowType> { public testing::WithParamInterface<ui::wm::WindowType> {
public: public:
DockedWindowResizerTest() : model_(NULL), window_type_(GetParam()) {} DockedWindowResizerTest() : window_type_(GetParam()) {}
virtual ~DockedWindowResizerTest() {} virtual ~DockedWindowResizerTest() {}
void SetUp() override { void SetUp() override {
AshTestBase::SetUp(); AshTestBase::SetUp();
UpdateDisplay("600x400"); UpdateDisplay("600x400");
model_ = WmShell::Get()->shelf_model();
} }
void TearDown() override { AshTestBase::TearDown(); } void TearDown() override { AshTestBase::TearDown(); }
...@@ -234,7 +231,6 @@ class DockedWindowResizerTest ...@@ -234,7 +231,6 @@ class DockedWindowResizerTest
private: private:
std::unique_ptr<WindowResizer> resizer_; std::unique_ptr<WindowResizer> resizer_;
ShelfModel* model_;
ui::wm::WindowType window_type_; ui::wm::WindowType window_type_;
aura::test::TestWindowDelegate delegate_; aura::test::TestWindowDelegate delegate_;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "ash/common/wm/workspace/workspace_window_resizer.h" #include "ash/common/wm/workspace/workspace_window_resizer.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/screen_util.h" #include "ash/screen_util.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "ash/common/wm_shell.h" #include "ash/common/wm_shell.h"
#include "ash/desktop_background/user_wallpaper_delegate.h" #include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
......
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