summaryrefslogtreecommitdiffstats
path: root/ash/wm
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 01:42:47 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 01:42:47 +0000
commit80549c15ef5f28bd944dc3fbb1a4089f10146b6f (patch)
tree147c0249fdb9e9d67ea154a02522f029af0c8b2d /ash/wm
parent8244643a07d2d7ffa082d02b22a80d09a621bf65 (diff)
downloadchromium_src-80549c15ef5f28bd944dc3fbb1a4089f10146b6f.zip
chromium_src-80549c15ef5f28bd944dc3fbb1a4089f10146b6f.tar.gz
chromium_src-80549c15ef5f28bd944dc3fbb1a4089f10146b6f.tar.bz2
Cleanup: move AlwaysOnTopController to RootWindowController
remove if (shelf_) as it should always be there. BUG=253991 Review URL: https://chromiumcodereview.appspot.com/18323011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r--ash/wm/stacking_controller.cc23
-rw-r--r--ash/wm/stacking_controller.h4
-rw-r--r--ash/wm/window_properties.cc5
-rw-r--r--ash/wm/window_properties.h6
-rw-r--r--ash/wm/workspace/workspace_layout_manager.cc6
5 files changed, 11 insertions, 33 deletions
diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc
index 3ba9dca..24f38d5 100644
--- a/ash/wm/stacking_controller.cc
+++ b/ash/wm/stacking_controller.cc
@@ -4,11 +4,13 @@
#include "ash/wm/stacking_controller.h"
+#include "ash/root_window_controller.h"
#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/coordinate_conversion.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/window_properties.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
@@ -52,6 +54,11 @@ bool IsPanelAttached(aura::Window* window) {
return window->GetProperty(internal::kPanelAttachedKey);
}
+internal::AlwaysOnTopController*
+GetAlwaysOnTopController(aura::RootWindow* root_window) {
+ return GetRootWindowController(root_window)->always_on_top_controller();
+}
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -144,20 +151,4 @@ aura::Window* StackingController::GetSystemModalContainer(
return container;
}
-// TODO(oshima): Remove this once extended desktop is on by default.
-internal::AlwaysOnTopController*
-StackingController::GetAlwaysOnTopController(aura::RootWindow* root_window) {
- internal::AlwaysOnTopController* controller =
- root_window->GetProperty(internal::kAlwaysOnTopControllerKey);
- if (!controller) {
- controller = new internal::AlwaysOnTopController;
- controller->SetAlwaysOnTopContainer(
- root_window->GetChildById(
- internal::kShellWindowId_AlwaysOnTopContainer));
- // RootWindow owns the AlwaysOnTopController object.
- root_window->SetProperty(internal::kAlwaysOnTopControllerKey, controller);
- }
- return controller;
-}
-
} // namespace ash
diff --git a/ash/wm/stacking_controller.h b/ash/wm/stacking_controller.h
index 21611ed..07003cb 100644
--- a/ash/wm/stacking_controller.h
+++ b/ash/wm/stacking_controller.h
@@ -40,10 +40,6 @@ class ASH_EXPORT StackingController : public aura::client::StackingClient {
aura::Window* GetSystemModalContainer(aura::RootWindow* root,
aura::Window* window) const;
- // Returns the AlwaysOnTopController of the |root_window|.
- internal::AlwaysOnTopController* GetAlwaysOnTopController(
- aura::RootWindow* root_window);
-
DISALLOW_COPY_AND_ASSIGN(StackingController);
};
diff --git a/ash/wm/window_properties.cc b/ash/wm/window_properties.cc
index 64d55a7..9dda0174 100644
--- a/ash/wm/window_properties.cc
+++ b/ash/wm/window_properties.cc
@@ -5,21 +5,16 @@
#include "ash/wm/window_properties.h"
#include "ash/root_window_controller.h"
-#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/frame_painter.h"
#include "ui/aura/window_property.h"
#include "ui/gfx/rect.h"
-DECLARE_WINDOW_PROPERTY_TYPE(ash::internal::AlwaysOnTopController*);
DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(ASH_EXPORT, ash::FramePainter*);
DECLARE_WINDOW_PROPERTY_TYPE(ash::WindowPersistsAcrossAllWorkspacesType)
DECLARE_WINDOW_PROPERTY_TYPE(ash::internal::RootWindowController*);
namespace ash {
namespace internal {
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::internal::AlwaysOnTopController,
- kAlwaysOnTopControllerKey,
- NULL);
DEFINE_WINDOW_PROPERTY_KEY(bool, kContinueDragAfterReparent, false);
DEFINE_WINDOW_PROPERTY_KEY(bool, kCyclingThroughWorkspacesKey, false);
DEFINE_WINDOW_PROPERTY_KEY(bool, kFullscreenUsesMinimalChromeKey, false);
diff --git a/ash/wm/window_properties.h b/ash/wm/window_properties.h
index ae30435..c5bba1f 100644
--- a/ash/wm/window_properties.h
+++ b/ash/wm/window_properties.h
@@ -17,18 +17,12 @@ class Rect;
namespace ash {
class FramePainter;
namespace internal {
-class AlwaysOnTopController;
class RootWindowController;
// Shell-specific window property keys.
// Alphabetical sort.
-// A Key to store AlwaysOnTopController per RootWindow. The value is
-// owned by the RootWindow.
-extern const aura::WindowProperty<internal::AlwaysOnTopController*>* const
- kAlwaysOnTopControllerKey;
-
// A property key to indicate that an in progress drag should be continued
// after the window is reparented to another container.
extern const aura::WindowProperty<bool>* const kContinueDragAfterReparent;
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
index 6e9feca..15052ee 100644
--- a/ash/wm/workspace/workspace_layout_manager.cc
+++ b/ash/wm/workspace/workspace_layout_manager.cc
@@ -5,11 +5,13 @@
#include "ash/wm/workspace/workspace_layout_manager.h"
#include "ash/ash_switches.h"
+#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/wm/always_on_top_controller.h"
#include "ash/wm/base_layout_manager.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
@@ -240,8 +242,8 @@ void WorkspaceLayoutManager::OnWindowPropertyChanged(Window* window,
if (key == aura::client::kAlwaysOnTopKey &&
window->GetProperty(aura::client::kAlwaysOnTopKey)) {
internal::AlwaysOnTopController* controller =
- window->GetRootWindow()->GetProperty(
- internal::kAlwaysOnTopControllerKey);
+ GetRootWindowController(window->GetRootWindow())->
+ always_on_top_controller();
controller->GetContainer(window)->AddChild(window);
}
}