Commit 6b2d4a0b authored by oshima@chromium.org's avatar oshima@chromium.org

Move GetRootWindowController to root_window_controller.h

Remove unnecessary includes, forward decls

BUG=272460

Review URL: https://chromiumcodereview.appspot.com/24020002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221605 0039d316-1c4b-4281-b951-d872f2087c98
parent 3ea42918
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/shell_factory.h" #include "ash/shell_factory.h"
#include "ash/shell_window_ids.h" #include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "ash/wm/root_window_layout_manager.h" #include "ash/wm/root_window_layout_manager.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
...@@ -414,10 +413,11 @@ void DesktopBackgroundController::InstallDesktopController( ...@@ -414,10 +413,11 @@ void DesktopBackgroundController::InstallDesktopController(
NOTREACHED(); NOTREACHED();
return; return;
} }
GetRootWindowController(root_window)->SetAnimatingWallpaperController( internal::GetRootWindowController(root_window)->
new internal::AnimatingDesktopController(component)); SetAnimatingWallpaperController(
new internal::AnimatingDesktopController(component));
component->StartAnimating(GetRootWindowController(root_window)); component->StartAnimating(internal::GetRootWindowController(root_window));
} }
void DesktopBackgroundController::InstallDesktopControllerForAllWindows() { void DesktopBackgroundController::InstallDesktopControllerForAllWindows() {
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "ash/session_state_delegate.h" #include "ash/session_state_delegate.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/shell_window_ids.h" #include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_animations.h" #include "ash/wm/window_animations.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "ash/screen_ash.h" #include "ash/screen_ash.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/coordinate_conversion.h" #include "ash/wm/coordinate_conversion.h"
#include "ash/wm/property_util.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "third_party/skia/include/utils/SkMatrix44.h" #include "third_party/skia/include/utils/SkMatrix44.h"
...@@ -260,7 +259,7 @@ void DisplayController::Shutdown() { ...@@ -260,7 +259,7 @@ void DisplayController::Shutdown() {
for (std::map<int64, aura::RootWindow*>::const_reverse_iterator it = for (std::map<int64, aura::RootWindow*>::const_reverse_iterator it =
root_windows_.rbegin(); it != root_windows_.rend(); ++it) { root_windows_.rbegin(); it != root_windows_.rend(); ++it) {
internal::RootWindowController* controller = internal::RootWindowController* controller =
GetRootWindowController(it->second); internal::GetRootWindowController(it->second);
DCHECK(controller); DCHECK(controller);
delete controller; delete controller;
} }
...@@ -322,7 +321,7 @@ void DisplayController::CloseChildWindows() { ...@@ -322,7 +321,7 @@ void DisplayController::CloseChildWindows() {
root_windows_.begin(); it != root_windows_.end(); ++it) { root_windows_.begin(); it != root_windows_.end(); ++it) {
aura::RootWindow* root_window = it->second; aura::RootWindow* root_window = it->second;
internal::RootWindowController* controller = internal::RootWindowController* controller =
GetRootWindowController(root_window); internal::GetRootWindowController(root_window);
if (controller) { if (controller) {
controller->CloseChildWindows(); controller->CloseChildWindows();
} else { } else {
...@@ -339,7 +338,7 @@ std::vector<aura::RootWindow*> DisplayController::GetAllRootWindows() { ...@@ -339,7 +338,7 @@ std::vector<aura::RootWindow*> DisplayController::GetAllRootWindows() {
for (std::map<int64, aura::RootWindow*>::const_iterator it = for (std::map<int64, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) { root_windows_.begin(); it != root_windows_.end(); ++it) {
DCHECK(it->second); DCHECK(it->second);
if (GetRootWindowController(it->second)) if (internal::GetRootWindowController(it->second))
windows.push_back(it->second); windows.push_back(it->second);
} }
return windows; return windows;
...@@ -360,7 +359,7 @@ DisplayController::GetAllRootWindowControllers() { ...@@ -360,7 +359,7 @@ DisplayController::GetAllRootWindowControllers() {
for (std::map<int64, aura::RootWindow*>::const_iterator it = for (std::map<int64, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) { root_windows_.begin(); it != root_windows_.end(); ++it) {
internal::RootWindowController* controller = internal::RootWindowController* controller =
GetRootWindowController(it->second); internal::GetRootWindowController(it->second);
if (controller) if (controller)
controllers.push_back(controller); controllers.push_back(controller);
} }
...@@ -684,7 +683,7 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) { ...@@ -684,7 +683,7 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
GetDisplayManager()->GetDisplayForId(primary_display_id)); GetDisplayManager()->GetDisplayForId(primary_display_id));
} }
internal::RootWindowController* controller = internal::RootWindowController* controller =
GetRootWindowController(root_to_delete); internal::GetRootWindowController(root_to_delete);
DCHECK(controller); DCHECK(controller);
controller->MoveWindowsTo(GetPrimaryRootWindow()); controller->MoveWindowsTo(GetPrimaryRootWindow());
// Delete most of root window related objects, but don't delete // Delete most of root window related objects, but don't delete
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "ash/system/tray/system_tray.h" #include "ash/system/tray/system_tray.h"
#include "ash/test/ash_test_base.h" #include "ash/test/ash_test_base.h"
#include "ash/wm/coordinate_conversion.h" #include "ash/wm/coordinate_conversion.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_cycle_controller.h" #include "ash/wm/window_cycle_controller.h"
#include "ash/wm/window_properties.h" #include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
...@@ -168,7 +167,7 @@ TEST_F(ExtendedDesktopTest, Basic) { ...@@ -168,7 +167,7 @@ TEST_F(ExtendedDesktopTest, Basic) {
ASSERT_EQ(2U, root_windows.size()); ASSERT_EQ(2U, root_windows.size());
for (Shell::RootWindowList::const_iterator iter = root_windows.begin(); for (Shell::RootWindowList::const_iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter) { iter != root_windows.end(); ++iter) {
EXPECT_TRUE(GetRootWindowController(*iter) != NULL); EXPECT_TRUE(internal::GetRootWindowController(*iter) != NULL);
} }
// Make sure root windows share the same controllers. // Make sure root windows share the same controllers.
EXPECT_EQ(aura::client::GetFocusClient(root_windows[0]), EXPECT_EQ(aura::client::GetFocusClient(root_windows[0]),
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "ash/wm/dock/docked_window_layout_manager.h" #include "ash/wm/dock/docked_window_layout_manager.h"
#include "ash/wm/panels/panel_layout_manager.h" #include "ash/wm/panels/panel_layout_manager.h"
#include "ash/wm/panels/panel_window_event_handler.h" #include "ash/wm/panels/panel_window_event_handler.h"
#include "ash/wm/property_util.h"
#include "ash/wm/root_window_layout_manager.h" #include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/screen_dimmer.h" #include "ash/wm/screen_dimmer.h"
#include "ash/wm/stacking_controller.h" #include "ash/wm/stacking_controller.h"
...@@ -219,7 +218,7 @@ RootWindowController::RootWindowController(aura::RootWindow* root_window) ...@@ -219,7 +218,7 @@ RootWindowController::RootWindowController(aura::RootWindow* root_window)
panel_layout_manager_(NULL), panel_layout_manager_(NULL),
touch_hud_debug_(NULL), touch_hud_debug_(NULL),
touch_hud_projection_(NULL) { touch_hud_projection_(NULL) {
SetRootWindowController(root_window, this); GetRootWindowSettings(root_window)->controller = this;
screen_dimmer_.reset(new ScreenDimmer(root_window)); screen_dimmer_.reset(new ScreenDimmer(root_window));
stacking_controller_.reset(new StackingController); stacking_controller_.reset(new StackingController);
...@@ -248,7 +247,7 @@ RootWindowController* RootWindowController::ForWindow( ...@@ -248,7 +247,7 @@ RootWindowController* RootWindowController::ForWindow(
// static // static
RootWindowController* RootWindowController::ForActiveRootWindow() { RootWindowController* RootWindowController::ForActiveRootWindow() {
return GetRootWindowController(Shell::GetActiveRootWindow()); return internal::GetRootWindowController(Shell::GetActiveRootWindow());
} }
void RootWindowController::SetWallpaperController( void RootWindowController::SetWallpaperController(
...@@ -282,7 +281,7 @@ void RootWindowController::Shutdown() { ...@@ -282,7 +281,7 @@ void RootWindowController::Shutdown() {
} }
CloseChildWindows(); CloseChildWindows();
SetRootWindowController(root_window_.get(), NULL); GetRootWindowSettings(root_window_.get())->controller = NULL;
screen_dimmer_.reset(); screen_dimmer_.reset();
workspace_controller_.reset(); workspace_controller_.reset();
// Forget with the display ID so that display lookup // Forget with the display ID so that display lookup
...@@ -819,5 +818,10 @@ void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { ...@@ -819,5 +818,10 @@ void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
DisableTouchHudProjection(); DisableTouchHudProjection();
} }
RootWindowController* GetRootWindowController(
const aura::RootWindow* root_window) {
return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
}
} // namespace internal } // namespace internal
} // namespace ash } // namespace ash
...@@ -286,6 +286,11 @@ class ASH_EXPORT RootWindowController : public ShellObserver { ...@@ -286,6 +286,11 @@ class ASH_EXPORT RootWindowController : public ShellObserver {
DISALLOW_COPY_AND_ASSIGN(RootWindowController); DISALLOW_COPY_AND_ASSIGN(RootWindowController);
}; };
// Gets the RootWindowController for |root_window|.
ASH_EXPORT RootWindowController* GetRootWindowController(
const aura::RootWindow* root_window);
} // namespace internal } // namespace internal
} // ash } // ash
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#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"
#include "ash/wm/property_util.h"
#include "ash/wm/coordinate_conversion.h" #include "ash/wm/coordinate_conversion.h"
#include "base/logging.h" #include "base/logging.h"
#include "ui/aura/client/screen_position_client.h" #include "ui/aura/client/screen_position_client.h"
...@@ -44,7 +43,7 @@ gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { ...@@ -44,7 +43,7 @@ gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) {
// static // static
gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) {
if (GetRootWindowController(window->GetRootWindow())->shelf()) if (internal::GetRootWindowController(window->GetRootWindow())->shelf())
return GetDisplayWorkAreaBoundsInParent(window); return GetDisplayWorkAreaBoundsInParent(window);
else else
return GetDisplayBoundsInParent(window); return GetDisplayBoundsInParent(window);
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "ash/system/status_area_widget.h" #include "ash/system/status_area_widget.h"
#include "ash/wm/gestures/shelf_gesture_handler.h" #include "ash/wm/gestures/shelf_gesture_handler.h"
#include "ash/wm/mru_window_tracker.h" #include "ash/wm/mru_window_tracker.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_animations.h" #include "ash/wm/window_animations.h"
#include "ash/wm/window_properties.h" #include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "ash/wm/overlay_event_filter.h" #include "ash/wm/overlay_event_filter.h"
#include "ash/wm/overview/window_selector_controller.h" #include "ash/wm/overview/window_selector_controller.h"
#include "ash/wm/power_button_controller.h" #include "ash/wm/power_button_controller.h"
#include "ash/wm/property_util.h"
#include "ash/wm/resize_shadow_controller.h" #include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/root_window_layout_manager.h" #include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/screen_dimmer.h" #include "ash/wm/screen_dimmer.h"
...@@ -368,7 +367,7 @@ void Shell::DeleteInstance() { ...@@ -368,7 +367,7 @@ void Shell::DeleteInstance() {
// static // static
internal::RootWindowController* Shell::GetPrimaryRootWindowController() { internal::RootWindowController* Shell::GetPrimaryRootWindowController() {
return GetRootWindowController(GetPrimaryRootWindow()); return internal::GetRootWindowController(GetPrimaryRootWindow());
} }
// static // static
...@@ -646,7 +645,7 @@ void Shell::ShowContextMenu(const gfx::Point& location_in_screen, ...@@ -646,7 +645,7 @@ void Shell::ShowContextMenu(const gfx::Point& location_in_screen,
// NULL even for the out-of-bounds |location_in_screen| (It should // NULL even for the out-of-bounds |location_in_screen| (It should
// return the primary root). Investigate why/how this is // return the primary root). Investigate why/how this is
// happening. crbug.com/165214. // happening. crbug.com/165214.
internal::RootWindowController* rwc = GetRootWindowController(root); internal::RootWindowController* rwc = internal::GetRootWindowController(root);
CHECK(rwc) << "root=" << root CHECK(rwc) << "root=" << root
<< ", location:" << location_in_screen.ToString(); << ", location:" << location_in_screen.ToString();
if (rwc) if (rwc)
...@@ -796,7 +795,7 @@ void Shell::SetShelfAlignment(ShelfAlignment alignment, ...@@ -796,7 +795,7 @@ void Shell::SetShelfAlignment(ShelfAlignment alignment,
} }
ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) {
return GetRootWindowController(root_window)-> return internal::GetRootWindowController(root_window)->
GetShelfLayoutManager()->GetAlignment(); GetShelfLayoutManager()->GetAlignment();
} }
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "ash/system/tray/tray_bubble_wrapper.h" #include "ash/system/tray/tray_bubble_wrapper.h"
#include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_event_filter.h" #include "ash/system/tray/tray_event_filter.h"
#include "ash/wm/property_util.h"
#include "ui/aura/client/screen_position_client.h" #include "ui/aura/client/screen_position_client.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
...@@ -57,10 +56,10 @@ bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) { ...@@ -57,10 +56,10 @@ bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) {
if (event->target()) { if (event->target()) {
aura::Window* target = static_cast<aura::Window*>(event->target()); aura::Window* target = static_cast<aura::Window*>(event->target());
// Don't process events that occurred inside an embedded menu. // Don't process events that occurred inside an embedded menu.
ash::internal::RootWindowController* root_controller = internal::RootWindowController* root_controller =
ash::GetRootWindowController(target->GetRootWindow()); internal::GetRootWindowController(target->GetRootWindow());
if (root_controller && root_controller->GetContainer( if (root_controller && root_controller->GetContainer(
ash::internal::kShellWindowId_MenuContainer)->Contains(target)) { internal::kShellWindowId_MenuContainer)->Contains(target)) {
return false; return false;
} }
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,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/shell.h" #include "ash/shell.h"
#include "ash/wm/property_util.h"
#include "base/json/json_string_value_serializer.h" #include "base/json/json_string_value_serializer.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "ash/root_window_settings.h" #include "ash/root_window_settings.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/shell_window_ids.h" #include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/gfx/display.h" #include "ui/gfx/display.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#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"
#include "ash/touch/touch_hud_debug.h" #include "ash/touch/touch_hud_debug.h"
#include "ash/wm/property_util.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/format_macros.h" #include "base/format_macros.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/shell_delegate.h" #include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h" #include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "ui/app_list/app_list_constants.h" #include "ui/app_list/app_list_constants.h"
#include "ui/app_list/pagination_model.h" #include "ui/app_list/pagination_model.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/shell_window_ids.h" #include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
...@@ -26,6 +25,8 @@ ...@@ -26,6 +25,8 @@
#include "ui/views/view.h" #include "ui/views/view.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
namespace ash {
namespace internal {
namespace { namespace {
const int kAffordanceOuterRadius = 60; const int kAffordanceOuterRadius = 60;
...@@ -69,9 +70,8 @@ views::Widget* CreateAffordanceWidget(aura::RootWindow* root_window) { ...@@ -69,9 +70,8 @@ views::Widget* CreateAffordanceWidget(aura::RootWindow* root_window) {
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
widget->Init(params); widget->Init(params);
widget->SetOpacity(0xFF); widget->SetOpacity(0xFF);
ash::GetRootWindowController(root_window)->GetContainer( GetRootWindowController(root_window)->GetContainer(
ash::internal::kShellWindowId_OverlayContainer)->AddChild( kShellWindowId_OverlayContainer)->AddChild(widget->GetNativeWindow());
widget->GetNativeWindow());
return widget; return widget;
} }
...@@ -133,9 +133,6 @@ void PaintAffordanceGlow(gfx::Canvas* canvas, ...@@ -133,9 +133,6 @@ void PaintAffordanceGlow(gfx::Canvas* canvas,
} // namespace } // namespace
namespace ash {
namespace internal {
// View of the LongPressAffordanceHandler. Draws the actual contents and // View of the LongPressAffordanceHandler. Draws the actual contents and
// updates as the animation proceeds. It also maintains the views::Widget that // updates as the animation proceeds. It also maintains the views::Widget that
// the animation is shown in. // the animation is shown in.
...@@ -297,7 +294,7 @@ void LongPressAffordanceHandler::StartAnimation() { ...@@ -297,7 +294,7 @@ void LongPressAffordanceHandler::StartAnimation() {
aura::RootWindow* root_window = NULL; aura::RootWindow* root_window = NULL;
switch (current_animation_type_) { switch (current_animation_type_) {
case GROW_ANIMATION: case GROW_ANIMATION:
root_window = ash::Shell::GetInstance()->display_controller()-> root_window = Shell::GetInstance()->display_controller()->
GetRootWindowForDisplayId(tap_down_display_id_); GetRootWindowForDisplayId(tap_down_display_id_);
if (!root_window) { if (!root_window) {
StopAnimation(); StopAnimation();
......
...@@ -4,13 +4,9 @@ ...@@ -4,13 +4,9 @@
#include "ash/wm/property_util.h" #include "ash/wm/property_util.h"
#include "ash/ash_export.h"
#include "ash/root_window_settings.h"
#include "ash/screen_ash.h" #include "ash/screen_ash.h"
#include "ash/wm/window_properties.h" #include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
#include "ui/aura/client/aura_constants.h" #include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/base/ui_base_types.h" #include "ui/base/ui_base_types.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
...@@ -65,15 +61,4 @@ bool GetWindowAlwaysRestoresToRestoreBounds(const aura::Window* window) { ...@@ -65,15 +61,4 @@ bool GetWindowAlwaysRestoresToRestoreBounds(const aura::Window* window) {
return window->GetProperty(internal::kWindowRestoresToRestoreBounds); return window->GetProperty(internal::kWindowRestoresToRestoreBounds);
} }
internal::RootWindowController* GetRootWindowController(
const aura::RootWindow* root_window) {
return root_window ?
internal::GetRootWindowSettings(root_window)->controller : NULL;
}
void SetRootWindowController(aura::RootWindow* root_window,
internal::RootWindowController* controller) {
internal::GetRootWindowSettings(root_window)->controller = controller;
}
} // namespace ash } // namespace ash
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "ash/ash_export.h" #include "ash/ash_export.h"
namespace aura { namespace aura {
class RootWindow;
class Window; class Window;
} }
...@@ -17,9 +16,6 @@ class Rect; ...@@ -17,9 +16,6 @@ class Rect;
} }
namespace ash { namespace ash {
namespace internal {
class RootWindowController;
}
// Sets the restore bounds property on |window| in the virtual screen // Sets the restore bounds property on |window| in the virtual screen
// coordinates. Deletes existing bounds value if exists. // coordinates. Deletes existing bounds value if exists.
...@@ -63,13 +59,6 @@ ASH_EXPORT bool GetWindowAlwaysRestoresToRestoreBounds( ...@@ -63,13 +59,6 @@ ASH_EXPORT bool GetWindowAlwaysRestoresToRestoreBounds(
ASH_EXPORT void SetTrackedByWorkspace(aura::Window* window, bool value); ASH_EXPORT void SetTrackedByWorkspace(aura::Window* window, bool value);
ASH_EXPORT bool GetTrackedByWorkspace(const aura::Window* window); ASH_EXPORT bool GetTrackedByWorkspace(const aura::Window* window);
// Sets/Gets the RootWindowController for |root_window|. } // namespace ash
ASH_EXPORT void SetRootWindowController(
aura::RootWindow* root_window,
internal::RootWindowController* controller);
ASH_EXPORT internal::RootWindowController* GetRootWindowController(
const aura::RootWindow* root_window);
}
#endif // ASH_WM_PROPERTY_UTIL_H_ #endif // ASH_WM_PROPERTY_UTIL_H_
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "ash/desktop_background/desktop_background_widget_controller.h" #include "ash/desktop_background/desktop_background_widget_controller.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/wm/property_util.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/compositor/layer.h" #include "ui/compositor/layer.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "ash/shell_window_ids.h" #include "ash/shell_window_ids.h"
#include "ash/wm/always_on_top_controller.h" #include "ash/wm/always_on_top_controller.h"
#include "ash/wm/coordinate_conversion.h" #include "ash/wm/coordinate_conversion.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_properties.h" #include "ash/wm/window_properties.h"
#include "ui/aura/client/aura_constants.h" #include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
...@@ -56,7 +55,8 @@ bool IsPanelAttached(aura::Window* window) { ...@@ -56,7 +55,8 @@ bool IsPanelAttached(aura::Window* window) {
internal::AlwaysOnTopController* internal::AlwaysOnTopController*
GetAlwaysOnTopController(aura::RootWindow* root_window) { GetAlwaysOnTopController(aura::RootWindow* root_window) {
return GetRootWindowController(root_window)->always_on_top_controller(); return internal::GetRootWindowController(root_window)->
always_on_top_controller();
} }
} // namespace } // namespace
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "ash/wm/gestures/long_press_affordance_handler.h" #include "ash/wm/gestures/long_press_affordance_handler.h"
#include "ash/wm/gestures/system_pinch_handler.h" #include "ash/wm/gestures/system_pinch_handler.h"
#include "ash/wm/gestures/two_finger_drag_handler.h" #include "ash/wm/gestures/two_finger_drag_handler.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "ui/base/ui_base_types.h" #include "ui/base/ui_base_types.h"
namespace aura { namespace aura {
class RootWindow;
class Window; class Window;
} }
...@@ -20,7 +19,6 @@ class Rect; ...@@ -20,7 +19,6 @@ class Rect;
namespace ui { namespace ui {
class Event; class Event;
class Layer;
} }
namespace ash { namespace ash {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "ash/wm/always_on_top_controller.h" #include "ash/wm/always_on_top_controller.h"
#include "ash/wm/base_layout_manager.h" #include "ash/wm/base_layout_manager.h"
#include "ash/wm/frame_painter.h" #include "ash/wm/frame_painter.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_animations.h" #include "ash/wm/window_animations.h"
#include "ash/wm/window_properties.h" #include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.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